}
# some people don't like the automatic correction - so run 'NOCOR=1 zsh' to deactivate it
if [[ -n "$NOCOR" ]] ; then
- zstyle ':completion:*' completer _oldlist _expand _force_rehash _complete
+ zstyle ':completion:*' completer _oldlist _expand _force_rehash _complete _files
setopt nocorrect # do not try to correct the spelling if possible
else
-# zstyle ':completion:*' completer _oldlist _expand _force_rehash _complete _correct _approximate
+# zstyle ':completion:*' completer _oldlist _expand _force_rehash _complete _correct _approximate _files
setopt correct # try to correct the spelling if possible
zstyle -e ':completion:*' completer '
if [[ $_last_try != "$HISTNO$BUFFER$CURSOR" ]]; then
_last_try="$HISTNO$BUFFER$CURSOR"
- reply=(_complete _match _prefix)
+ reply=(_complete _match _prefix _files)
else
if [[ $words[1] = (rm|mv) ]]; then
- reply=(_complete)
+ reply=(_complete _files)
else
- reply=(_oldlist _expand _force_rehash _complete _correct _approximate)
+ reply=(_oldlist _expand _force_rehash _complete _correct _approximate _files)
fi
fi'
fi
}
compdef _functions reload freload
+ # list symlinks in detail (more detailed version of 'readlink -f' and 'whence -s')
+ sll() {
+ [ -z "$1" ] && printf 'Usage: %s <file(s)>\n' "$0" && return 1
+ for i in "$@" ; do
+ file=$i
+ while [ -h "$file" ] ; do
+ ls -l $file
+ file=$(readlink "$file")
+ done
+ done
+ }
+
# fast manual access
if type -p qma &>/dev/null ; then
manzsh() { qma zshall "$1" }