mirror of
https://github.com/hcartiaux/dotfiles.git
synced 2024-10-18 09:15:24 +02:00
[bash] ls parameter --group-directories-first does not exist on *BSD
This commit is contained in:
parent
1013ca7dcf
commit
9ebd2172ad
1 changed files with 3 additions and 3 deletions
|
@ -7,17 +7,17 @@
|
|||
# ----------------------------------------------------------------------
|
||||
|
||||
# we always pass these to ls(1)
|
||||
LS_COMMON="-F --group-directories-first -h"
|
||||
LS_COMMON="-F -h"
|
||||
|
||||
if [ "$UNAME" = Darwin ]; then
|
||||
# check if you're using gnu core-utils then use --color
|
||||
if [[ "$(which ls)" == "/opt/local/bin/ls" ]]; then
|
||||
LS_COMMON="$LS_COMMON --color"
|
||||
LS_COMMON="$LS_COMMON --group-directories-first --color"
|
||||
else
|
||||
LS_COMMON="$LS_COMMON -G"
|
||||
fi
|
||||
elif [ "$UNAME" = Linux ]; then
|
||||
LS_COMMON="$LS_COMMON --color"
|
||||
LS_COMMON="$LS_COMMON --group-directories-first --color"
|
||||
fi
|
||||
|
||||
# setup the main ls alias if we've established common args
|
||||
|
|
Loading…
Reference in a new issue