mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-06 07:57:48 +00:00
ls: fix --color behaviour
This commit is contained in:
parent
0717a5f301
commit
5d7a851471
1 changed files with 3 additions and 3 deletions
|
@ -56,7 +56,7 @@ lazy_static! {
|
|||
let codes = LS_COLORS.split(':');
|
||||
let mut map = HashMap::new();
|
||||
for c in codes {
|
||||
let p: Vec<_> = c.splitn(1, '=').collect();
|
||||
let p: Vec<_> = c.splitn(2, '=').collect();
|
||||
if p.len() == 2 {
|
||||
map.insert(p[0], p[1]);
|
||||
}
|
||||
|
@ -337,9 +337,9 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
|||
Arg::with_name(options::COLOR)
|
||||
.long(options::COLOR)
|
||||
.help("Color output based on file type.")
|
||||
.possible_values(&["always", "yes", "force", "tty", "if-tty", "auto", "never", "no", "none"])
|
||||
.takes_value(true)
|
||||
.require_equals(true)
|
||||
.empty_values(true),
|
||||
.min_values(0),
|
||||
)
|
||||
.arg(Arg::with_name(options::PATHS).multiple(true).takes_value(true))
|
||||
.get_matches_from(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue