mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-31 22:08:34 +00:00
clean up completions, fix term title wrt sudo and exec
This commit is contained in:
parent
20d5cd73f9
commit
6455fe35d2
1 changed files with 8 additions and 6 deletions
14
zshrc
14
zshrc
|
@ -245,15 +245,15 @@ preexec()
|
||||||
%*)
|
%*)
|
||||||
title "${jobtexts[${cmd[1]#%}]% *}" "$termtitle $jobtexts[${cmd[1]#%}]"
|
title "${jobtexts[${cmd[1]#%}]% *}" "$termtitle $jobtexts[${cmd[1]#%}]"
|
||||||
;;
|
;;
|
||||||
|
*=*)
|
||||||
|
shift cmd
|
||||||
|
;&
|
||||||
exec|sudo)
|
exec|sudo)
|
||||||
shift cmd
|
shift cmd
|
||||||
# If the command is 'exec', drop that, because
|
# If the command is 'exec', drop that, because
|
||||||
# we'd rather just see the command that is being
|
# we'd rather just see the command that is being
|
||||||
# exec'd. Note the ;& to fall through the next entry.
|
# exec'd. Note the ;& to fall through the next entry.
|
||||||
;&
|
;&
|
||||||
*=*)
|
|
||||||
shift cmd
|
|
||||||
;&
|
|
||||||
*)
|
*)
|
||||||
title $cmd[1]:t "$termtitle $cmd[*]" # Starting a new job.
|
title $cmd[1]:t "$termtitle $cmd[*]" # Starting a new job.
|
||||||
;;
|
;;
|
||||||
|
@ -280,6 +280,11 @@ function title
|
||||||
|
|
||||||
# completion menu
|
# completion menu
|
||||||
zstyle ':completion:*' menu select=1
|
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 '_*'
|
zstyle ':completion:*:functions' ignored-patterns '_*'
|
||||||
|
|
||||||
# group matches
|
# group matches
|
||||||
|
@ -292,9 +297,6 @@ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
# users are all useless, ignore them always
|
# users are all useless, ignore them always
|
||||||
zstyle -e ':completion:*' users "reply=( root '${USERNAME}' )"
|
zstyle -e ':completion:*' users "reply=( root '${USERNAME}' )"
|
||||||
|
|
||||||
# neat-o new features
|
|
||||||
zstyle ':completion:*' completer _expand _complete _prefix _correct _prefix _match _approximate
|
|
||||||
|
|
||||||
# caching good
|
# caching good
|
||||||
zstyle ':completion:*' use-cache on
|
zstyle ':completion:*' use-cache on
|
||||||
zstyle ':completion:*' cache-path "${HOME}/.zsh/.${HOST}-cache"
|
zstyle ':completion:*' cache-path "${HOME}/.zsh/.${HOST}-cache"
|
||||||
|
|
Loading…
Add table
Reference in a new issue