aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/ls.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-12 09:51:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-12 09:51:27 +1200
commitefd95c34c7db7686600571243ca00196276fa0ad (patch)
treee4e1fcbadf294b68ef29fb9d485390daca28a500 /sh/shrc.d/ls.sh
parentFix up .PHONY targets (diff)
downloaddotfiles-efd95c34c7db7686600571243ca00196276fa0ad.tar.gz
dotfiles-efd95c34c7db7686600571243ca00196276fa0ad.zip
Use more logical ~/.cache subpath
Diffstat (limited to 'sh/shrc.d/ls.sh')
-rw-r--r--sh/shrc.d/ls.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh
index 18f50a8b..b5acfcf9 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' "$@"
# Run ls(1) with the concluded arguments