diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-19 20:35:26 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-19 20:35:26 +1200 |
commit | a3ddf9e5799a4727625c0676d6e32c055640b9c5 (patch) | |
tree | 3e22a57ea4ae600cf9ec39b521b4b7cc7c407a46 /sh/shrc.d/ls.sh | |
parent | Merge branch 'master' into port/bsd/freebsd (diff) | |
parent | Just use whichever vi(1) we need as VISUAL (diff) | |
download | dotfiles-a3ddf9e5799a4727625c0676d6e32c055640b9c5.tar.gz dotfiles-a3ddf9e5799a4727625c0676d6e32c055640b9c5.zip |
Merge branch 'master' into port/bsd/freebsd
Diffstat (limited to 'sh/shrc.d/ls.sh')
-rw-r--r-- | sh/shrc.d/ls.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh index 05e7a06c..40a0a5ce 100644 --- a/sh/shrc.d/ls.sh +++ b/sh/shrc.d/ls.sh @@ -1,6 +1,6 @@ # Our ~/.profile should already have made a directory with the supported # options for us; if not, we won't be wrapping ls(1) with a function at all -[ -d "$HOME"/.cache/ls ] || return +[ -d "$HOME"/.cache/sh/opt/ls ] || return # If the system has already aliased ls(1) for us, like Slackware or OpenBSD # does, just get rid of it @@ -20,17 +20,17 @@ ls() { [ -t 1 ] && set -- -x "$@" # Add --block-size=K to always show the filesize in kibibytes - [ -e "$HOME"/.cache/ls/block-size ] && + [ -e "$HOME"/.cache/sh/opt/ls/block-size ] && set -- --block-size=1024 "$@" # Add --color if the terminal has at least 8 colors - [ -e "$HOME"/.cache/ls/color ] && + [ -e "$HOME"/.cache/sh/opt/ls/color ] && [ "$({ tput colors || tput Co ; } 2>/dev/null)" -ge 8 ] && set -- --color=auto "$@" # Add --time-style='+%Y-%m-%d %H:%M:%S' to show the date in my preferred # (fixed) format - [ -e "$HOME"/.cache/ls/time-style ] && + [ -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 |