diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 14:52:48 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 14:52:48 +1300 |
commit | bf0ecba8f23d89c9f04f17676aced1da83bd6a96 (patch) | |
tree | f0ef90c4e095cc0693bd2253326d9d3bbe7172e7 | |
parent | Rename .markdown files to .md (diff) | |
parent | Merge branch 'master' into port/bsd/freebsd (diff) | |
download | dotfiles-bf0ecba8f23d89c9f04f17676aced1da83bd6a96.tar.gz dotfiles-bf0ecba8f23d89c9f04f17676aced1da83bd6a96.zip |
Merge branch 'port/bsd/freebsd'
This small block of OS-dependent code seems to be the only thing that
FreeBSD requires to use all of these dotfiles safely, so I think I can
merge this branch now.
-rw-r--r-- | sh/shrc.d/ls.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh index d58c64f9..7e843cc7 100644 --- a/sh/shrc.d/ls.sh +++ b/sh/shrc.d/ls.sh @@ -33,6 +33,16 @@ ls() { [ -e "$HOME"/.cache/sh/opt/ls/time-style ] && set -- --time-style='+%Y-%m-%d %H:%M:%S' "$@" + # If the operating system is FreeBSD, there are some specific options we + # can add that might mean different things to e.g. GNU ls(1) + case $OS in + FreeBSD) + # -D: Timestamp format + # -G: Use color + set -- -D '%Y-%m-%d %H:%M:%S' -G "$@" + ;; + esac + # Run ls(1) with the concluded arguments command ls "$@" } |