mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 18:22:45 +08:00
ls.fish: remove for loop
`command -s` can take multiple arguments to try.
This commit is contained in:
parent
3cc581fbb0
commit
5dc0ff0a90
|
@ -12,13 +12,7 @@ if command ls --version >/dev/null 2>/dev/null
|
|||
end
|
||||
|
||||
if not set -q LS_COLORS
|
||||
set -l dircolors
|
||||
for d in gdircolors dircolors
|
||||
if command -sq $d
|
||||
set dircolors $d
|
||||
break
|
||||
end
|
||||
end
|
||||
set -l dircolors (command -s {g,}dircolors)[1]
|
||||
|
||||
if set -q dircolors[1]
|
||||
set -l colorfile
|
||||
|
|
Loading…
Reference in New Issue
Block a user