aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/ll.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-21 14:48:13 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-21 14:48:13 +1200
commitbf86a2f939651b691a2ee814de7853424455c813 (patch)
tree29febe40833f4c1af6741c77bec01e5ce920233e /sh/shrc.d/ll.sh
parentAdjust ordering of ls() and grep() options (diff)
downloaddotfiles-bf86a2f939651b691a2ee814de7853424455c813.tar.gz
dotfiles-bf86a2f939651b691a2ee814de7853424455c813.zip
Add la(), ll()
Diffstat (limited to 'sh/shrc.d/ll.sh')
-rw-r--r--sh/shrc.d/ll.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/shrc.d/ll.sh b/sh/shrc.d/ll.sh
new file mode 100644
index 00000000..c8c95d3b
--- /dev/null
+++ b/sh/shrc.d/ll.sh
@@ -0,0 +1,10 @@
+# Run ls -Al if we can (-A is not POSIX), ls -al otherwise
+ll() {
+ # Prefer -A/--almost-all (exclude "." and "..") if available
+ if [ -e "$HOME"/.cache/ls/almost-all ] ; then
+ set -- -Al "$@"
+ else
+ set -- -al "$@"
+ fi
+ ls "$@"
+}