aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/ls.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-11 22:57:13 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-11 22:57:13 +1300
commit2b3dccc9e8c7e921f546c61d1a1a8fc052b30515 (patch)
tree6e7e6f74e1c84c6425d47216fe137d6d09a126b2 /sh/shrc.d/ls.sh
parentDon't let OpenBSD alias `ls` in ksh (diff)
downloaddotfiles-2b3dccc9e8c7e921f546c61d1a1a8fc052b30515.tar.gz
dotfiles-2b3dccc9e8c7e921f546c61d1a1a8fc052b30515.zip
Have ls() func undo aliases in its way
Diffstat (limited to 'sh/shrc.d/ls.sh')
-rw-r--r--sh/shrc.d/ls.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh
index 11ab15b4..1aca767e 100644
--- a/sh/shrc.d/ls.sh
+++ b/sh/shrc.d/ls.sh
@@ -2,6 +2,10 @@
# options for us; if not, we won't be wrapping ls(1) with a function at all
[ -d "$HOME"/.cache/ls ] || return
+# If the system has already aliased ls(1) for us, like Slackware or OpenBSD
+# does, just get rid of it
+unalias ls >/dev/null 2>&1
+
# Define function proper
ls() {