X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=b0c7a068016344550f7823cfd8436c83f012bd54;hb=344a5c51384fc3acead84167c96a0acfc61be474;hp=eefb29d780026bd30c9caa41e2984c341363c0d4;hpb=0ffab22e438e7464320dd9ec344c6062124e99c0;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index eefb29d..b0c7a06 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -581,19 +581,6 @@ zle -N insert-unicode-char #k# Insert Unicode character bindkey '^Xi' insert-unicode-char -# just type 'cd ...' to get 'cd ../..' -# rationalise-dot() { -# if [[ $LBUFFER == *.. ]] ; then -# LBUFFER+=/.. -# else -# LBUFFER+=. -# fi -# } -# zle -N rationalise-dot -# bindkey . rationalise-dot - -# bindkey '\eq' push-line-or-edit - ## toggle the ,. abbreviation feature on/off # NOABBREVIATION: default abbreviation-state # 0 - enabled (default) @@ -2619,23 +2606,7 @@ setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility #f1# Reload an autoloadable function freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done } - -# TODO: Who really uses reload()? The proper way to reload a zsh setup is to -# actually restart the shell via 'exec zsh'. And reload with arguments is the -# same as freload() above. -ft -#f1# Reload zsh setup -reload() { - if [[ "$#*" -eq 0 ]] ; then - [[ -r ~/.zshrc ]] && . ~/.zshrc - else - local fn - for fn in "$@"; do - unfunction $fn - autoload -U $fn - done - fi -} -compdef _functions reload freload +compdef _functions freload #f1# List symlinks in detail (more detailed version of 'readlink -f' and 'whence -s') sll() { @@ -3102,7 +3073,7 @@ alias lss='ls -l *(s,S,t)' # only files with setgid/setuid/sticky fl #a2# Only show 1st ten symlinks alias lsl='ls -l *(@[1,10])' # only symlinks #a2# Display only executables -alias lsx='ls -l *(*[1,10])' # only executables +alias lsx='ls -l *(*)' # only executables #a2# Display world-{readable,writable,executable} files alias lsw='ls -ld *(R,W,X.^ND/)' # world-{readable,writable,executable} files #a2# Display the ten biggest files @@ -3341,26 +3312,16 @@ mdiff() { memusage() { ps aux | awk '{if (NR > 1) print $5; if (NR > 2) print "+"} END { print "p" }' | dc } -#f5# Show contents of tar file +#f5# Show contents of gzipped tar file shtar() { emulate -L zsh gunzip -c $1 | tar -tf - -- | $PAGER } -#f5# Show contents of tgz file -shtgz() { - emulate -L zsh - tar -ztf $1 | $PAGER -} #f5# Show contents of zip file shzip() { emulate -L zsh unzip -l $1 | $PAGER } -#f5# Greps signature from file -sig() { - emulate -L zsh - agrep -d '^-- $' "$*" ~/.Signature -} #f5# Unified diff udiff() { emulate -L zsh @@ -3500,7 +3461,7 @@ purge() { rm ${FILES} echo ">> $PWD purged, $NBFILES files removed" else - echo "Ok. .. than not.." + echo "Ok. .. then not.." fi fi }