mirror of
https://github.com/sharkdp/bat
synced 2026-08-02 18:41:42 +00:00
Reverse precedence of syntax mappings specified on CLI
This commit is contained in:
+3
-1
@@ -130,7 +130,9 @@ impl App {
|
||||
}
|
||||
|
||||
if let Some(values) = self.matches.get_many::<String>("map-syntax") {
|
||||
for from_to in values {
|
||||
// later args take precedence over earlier ones, hence `.rev()`
|
||||
// see: https://github.com/sharkdp/bat/pull/2755#discussion_r1456416875
|
||||
for from_to in values.rev() {
|
||||
let parts: Vec<_> = from_to.split(':').collect();
|
||||
|
||||
if parts.len() != 2 {
|
||||
|
||||
Reference in New Issue
Block a user