From 2b3dccc9e8c7e921f546c61d1a1a8fc052b30515 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 11 Jan 2017 22:57:13 +1300 Subject: Have ls() func undo aliases in its way --- sh/shrc.d/ls.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sh') 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() { -- cgit v1.2.3