zshrc: alias lsl should list all symlinks.
[grml-etc-core.git] / etc / zsh / zshrc
index eefb29d..1e58a3e 100644 (file)
@@ -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() {
@@ -3100,9 +3071,9 @@ alias lsa='ls -a .*(.)'                # only show dot-files
 #a2# Only files with setgid/setuid/sticky flag
 alias lss='ls -l *(s,S,t)'             # only files with setgid/setuid/sticky flag
 #a2# Only show 1st ten symlinks
-alias lsl='ls -l *(@[1,10])'           # only symlinks
+alias lsl='ls -l *(@)'                 # 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
@@ -3132,8 +3103,6 @@ alias r-x='chmod 755'
 #a2# Execute \kbd{mkdir -o}
 alias md='mkdir -p'
 
-check_com -c ipython && alias ips='ipython -p sh'
-
 # console stuff
 #a2# Execute \kbd{mplayer -vo fbdev}
 alias cmplayer='mplayer -vo fbdev'
@@ -3152,12 +3121,6 @@ check_com -c python && alias http="python -m SimpleHTTPServer"
 # Use 'g' instead of 'git':
 check_com g || alias g='git'
 
-# check whether Debian's package management (dpkg) is running
-if check_com salias ; then
-    #a2# Check whether a dpkg instance is currently running
-    salias check_dpkg_running="dpkg_running"
-fi
-
 # work around non utf8 capable software in utf environment via $LANG and luit
 if check_com isutfenv && check_com luit ; then
     if check_com -c mrxvt ; then
@@ -3341,26 +3304,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 +3453,7 @@ purge() {
             rm ${FILES}
             echo ">> $PWD purged, $NBFILES files removed"
         else
-            echo "Ok. .. than not.."
+            echo "Ok. .. then not.."
         fi
     fi
 }