aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc.d/ls.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh
index 18f50a8b..05e7a06c 100644
--- a/sh/shrc.d/ls.sh
+++ b/sh/shrc.d/ls.sh
@@ -33,6 +33,16 @@ ls() {
[ -e "$HOME"/.cache/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 "$@"
}