clean up completions, fix term title wrt sudo and exec

This commit is contained in:
David Majnemer 2008-11-26 04:19:40 -06:00
parent 20d5cd73f9
commit 6455fe35d2

14
zshrc
View file

@ -245,15 +245,15 @@ preexec()
%*)
title "${jobtexts[${cmd[1]#%}]% *}" "$termtitle $jobtexts[${cmd[1]#%}]"
;;
*=*)
shift cmd
;&
exec|sudo)
shift cmd
# If the command is 'exec', drop that, because
# we'd rather just see the command that is being
# exec'd. Note the ;& to fall through the next entry.
;&
*=*)
shift cmd
;&
*)
title $cmd[1]:t "$termtitle $cmd[*]" # Starting a new job.
;;
@ -280,6 +280,11 @@ function title
# completion menu
zstyle ':completion:*' menu select=1
# neat-o new features
zstyle ':completion:*' completer _expand _complete _prefix _correct _match _approximate
# don't complete commands that we do not have
zstyle ':completion:*:functions' ignored-patterns '_*'
# group matches
@ -292,9 +297,6 @@ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
# users are all useless, ignore them always
zstyle -e ':completion:*' users "reply=( root '${USERNAME}' )"
# neat-o new features
zstyle ':completion:*' completer _expand _complete _prefix _correct _prefix _match _approximate
# caching good
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "${HOME}/.zsh/.${HOST}-cache"