mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-21 23:33:26 +01:00
Join env var options with "=" instead of " "
Joining them with a space was causing certain styles (e.g. `-grid`) to be misinterpreted as a separate option.
This commit is contained in:
parent
6e91ba83b7
commit
93b25d75a0
@ -146,8 +146,11 @@ pub fn get_args_from_env_vars() -> Vec<OsString> {
|
||||
("--style", "BAT_STYLE"),
|
||||
]
|
||||
.iter()
|
||||
.filter_map(|(flag, key)| env::var(key).ok().map(|var| [flag.to_string(), var]))
|
||||
.flatten()
|
||||
.filter_map(|(flag, key)| {
|
||||
env::var(key)
|
||||
.ok()
|
||||
.map(|var| [flag.to_string(), var].join("="))
|
||||
})
|
||||
.map(|a| a.into())
|
||||
.collect()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user