summaryrefslogtreecommitdiff
path: root/lib/completion.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/completion.zsh')
-rw-r--r--lib/completion.zsh31
1 files changed, 8 insertions, 23 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh
index e0cdcf626..c54249c52 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -31,35 +31,20 @@ zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
cdpath=(.)
-# use /etc/hosts and known_hosts for hostname completion
-[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _global_ssh_hosts=()
-[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
-[ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=()
-[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
-hosts=(
- "$_ssh_config[@]"
- "$_global_ssh_hosts[@]"
- "$_ssh_hosts[@]"
- "$_etc_hosts[@]"
- "$HOST"
- localhost
-)
-zstyle ':completion:*:hosts' hosts $hosts
-zstyle ':completion:*' users off
-
# Use caching so that commands like apt and dpkg complete are useable
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion::complete:*' cache-path $ZSH/cache/
# Don't complete uninteresting users
zstyle ':completion:*:*:*:users' ignored-patterns \
- adm amanda apache avahi beaglidx bin cacti canna clamav daemon \
- dbus distcache dovecot fax ftp games gdm gkrellmd gopher \
- hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \
- mailman mailnull mldonkey mysql nagios \
- named netdump news nfsnobody nobody nscd ntp nut nx openvpn \
- operator pcap postfix postgres privoxy pulse pvm quagga radvd \
- rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs
+ adm amanda apache at avahi avahi-autoipd beaglidx bin cacti canna \
+ clamav daemon dbus distcache dnsmasq dovecot fax ftp games gdm \
+ gkrellmd gopher hacluster haldaemon halt hsqldb ident junkbust kdm \
+ ldap lp mail mailman mailnull man messagebus mldonkey mysql nagios \
+ named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
+ operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
+ rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
+ usbmux uucp vcsa wwwrun xfs
# ... unless we really want to.
zstyle '*' single-ignored show