From bf86a2f939651b691a2ee814de7853424455c813 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 21 Aug 2016 14:48:13 +1200 Subject: Add la(), ll() --- sh/shrc.d/la.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sh/shrc.d/la.sh (limited to 'sh/shrc.d/la.sh') diff --git a/sh/shrc.d/la.sh b/sh/shrc.d/la.sh new file mode 100644 index 00000000..e21ad8fb --- /dev/null +++ b/sh/shrc.d/la.sh @@ -0,0 +1,10 @@ +# Run ls -A if we can (-A is not POSIX), ls -a otherwise +la() { + # Prefer --almost-all (exclude "." and "..") if available + if [ -e "$HOME"/.cache/ls/almost-all ] ; then + set -- -A "$@" + else + set -- -a "$@" + fi + ls "$@" +} -- cgit v1.2.3