mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-17 10:18:44 +00:00
color ls support under FreeBSD and OS X
darcs-hash:20060117172005-ac50b-6fddf68de744cfe42cab7237325025ab27fc17ad.gz
This commit is contained in:
parent
d5f4df15d4
commit
90fbe5eb0b
1 changed files with 10 additions and 1 deletions
|
@ -168,10 +168,19 @@ end
|
||||||
#
|
#
|
||||||
# Make ls use colors if we are on a system that supports this
|
# Make ls use colors if we are on a system that supports this
|
||||||
#
|
#
|
||||||
if ls --help 1>/dev/null 2>/dev/null
|
|
||||||
|
if ls --version 1>/dev/null 2>/dev/null
|
||||||
|
# This is GNU ls
|
||||||
function ls -d "List contents of directory"
|
function ls -d "List contents of directory"
|
||||||
command ls --color=auto --indicator-style=classify $argv
|
command ls --color=auto --indicator-style=classify $argv
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
# BSD, OS X and a few more support colors through the -G switch instead
|
||||||
|
if ls / -G 1>/dev/null 2>/dev/null
|
||||||
|
function ls -d "List contents of directory"
|
||||||
|
command ls -G $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue