X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=f5b943f34ad5c88bb2d19cc60fef76534894eada;hb=828d43a5f8414c8b0bd90c5ac353f498d2353f7c;hp=175f32d93cd76f6b3640dd900a62d31e9403c95b;hpb=143008f5dab82989e83a0fd46cc11ba40691f64f;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 175f32d..f5b943f 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2268,29 +2268,29 @@ alias j='jobs -l' #a2# Execute \kbd{ls -lSrah} alias dir="ls -lSrah" #a2# Only show dot-directories -alias lad='ls -d .*(/)' # only show dot-directories +alias lad='ls -d .*(/)' #a2# Only show dot-files -alias lsa='ls -a .*(.)' # only show dot-files +alias lsa='ls -a .*(.)' #a2# Only files with setgid/setuid/sticky flag -alias lss='ls -l *(s,S,t)' # only files with setgid/setuid/sticky flag +alias lss='ls -l *(s,S,t)' #a2# Only show symlinks -alias lsl='ls -l *(@)' # only symlinks +alias lsl='ls -l *(@)' #a2# Display only executables -alias lsx='ls -l *(*)' # only executables +alias lsx='ls -l *(*)' #a2# Display world-{readable,writable,executable} files -alias lsw='ls -ld *(R,W,X.^ND/)' # world-{readable,writable,executable} files +alias lsw='ls -ld *(R,W,X.^ND/)' #a2# Display the ten biggest files -alias lsbig="ls -flh *(.OL[1,10])" # display the biggest files +alias lsbig="ls -flh *(.OL[1,10])" #a2# Only show directories -alias lsd='ls -d *(/)' # only show directories +alias lsd='ls -d *(/)' #a2# Only show empty directories -alias lse='ls -d *(/^F)' # only show empty directories +alias lse='ls -d *(/^F)' #a2# Display the ten newest files -alias lsnew="ls -rtlh *(D.om[1,10])" # display the newest files +alias lsnew="ls -rtlh *(D.om[1,10])" #a2# Display the ten oldest files -alias lsold="ls -rtlh *(D.Om[1,10])" # display the oldest files +alias lsold="ls -rtlh *(D.Om[1,10])" #a2# Display the ten smallest files -alias lssmall="ls -Srl *(.oL[1,10])" # display the smallest files +alias lssmall="ls -Srl *(.oL[1,10])" #a2# Display the ten newest directories and ten newest .directories alias lsnewdir="ls -rthdl *(/om[1,10]) .*(D/om[1,10])" #a2# Display the ten oldest directories and ten oldest .directories @@ -2349,7 +2349,16 @@ cd() { #f5# Create Directoy and \kbd{cd} to it mkcd() { - mkdir -p "$@" && cd "$@" + if (( ARGC != 1 )); then + printf 'usage: mkcd \n' + return 1; + fi + if [[ ! -d "$1" ]]; then + command mkdir -p "$1" + else + printf '`%s'\'' already exists: cd-ing.\n' "$1" + fi + builtin cd "$1" } #f5# Create temporary directory and \kbd{cd} to it