summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-06-09 18:28:58 +0200
committerAnton Khirnov <anton@khirnov.net>2021-06-09 18:28:58 +0200
commit847c2ec629ffcaf736c5c84362668b8625161619 (patch)
tree0182c4631f66f32a36b03be12c471c009b5d8186
parenteb967c3a9d4949dba17e326ec17c9e96e9ac86a0 (diff)
bashrc: convert ls aliases to functions
This allows them to be used as parameters to other functions.
-rw-r--r--bash/bashrc13
1 files changed, 7 insertions, 6 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 18364ac..0d90635 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -26,17 +26,18 @@ fi
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
-alias ll='ls -l'
-alias la='ls -A'
-alias lh='ls -lh'
-alias lla='ls -lA'
-alias llh='ls -lAh'
-alias lt='ls -lt'
# disable flow control
# XXX should this be here?
stty -ixon
+ll() { ls -l "$@"; }
+lt() { ls -lt "$@"; }
+la() { ls -A "$@"; }
+lh() { ls -lh "$@"; }
+lla() { ls -lA "$@"; }
+llh() { ls -lAh "$@"; }
+
cu()
{
local lvl=$1