From b32171f6be813a01954003d940e0a3fbe8cf3c78 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 6 Dec 2016 12:39:48 -0500 Subject: [PATCH] shell aliases: cd + ls; +cdl --- shell/aliases.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shell/aliases.sh b/shell/aliases.sh index b1a2a3a8..0cfb674d 100644 --- a/shell/aliases.sh +++ b/shell/aliases.sh @@ -6,10 +6,11 @@ alias q='exit' alias clr='clear' alias sudo='sudo ' -alias ..='cd ..' -alias ...='cd ../..' -alias ....='cd ../../..' -alias -- -='cd -' +alias ..='cd .. && ls' +alias ...='cd ../.. && ls' +alias ....='cd ../../.. && ls' +alias -- -='cd - && ls' +cdl() { cd "$1" && ls -l; } alias ln="${aliases[ln]:-ln} -v" # verbose ln alias l='ls -l' @@ -44,12 +45,11 @@ alias exe='exercism' alias map="xargs -n1" o() { open "${1:-.}" } -c() { cd "$1" && ls -l; } take() { mkdir "$1" && cd "$1"; } hex() { echo -n $@ | xxd -psdu; } if command -v compdef >/dev/null; then + compdef cdl=cd compdef o=open - compdef c=cd compdef take=mkdir fi