color ls support under FreeBSD and OS X

darcs-hash:20060117172005-ac50b-6fddf68de744cfe42cab7237325025ab27fc17ad.gz
This commit is contained in:
axel 2006-01-18 03:20:05 +10:00
parent d5f4df15d4
commit 90fbe5eb0b

View file

@ -168,10 +168,19 @@ end
#
# 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"
command ls --color=auto --indicator-style=classify $argv
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
#