summaryrefslogtreecommitdiff
path: root/lib/completion.zsh
diff options
context:
space:
mode:
authorBob Williams <bobwilliams.ii@gmail.com>2014-03-17 09:32:57 -0400
committerBob Williams <bobwilliams.ii@gmail.com>2014-03-17 09:32:57 -0400
commit5a586670d73dbbda97d124e33398aabf21597659 (patch)
tree770a29ab869a831afdeb2fd0096e9af0b4af6c61 /lib/completion.zsh
parent223fd60ba597b8c23569c65878d766c3c933fa70 (diff)
parentca900216302aa1138c793971cf877b5d4e88fb06 (diff)
downloadzsh-5a586670d73dbbda97d124e33398aabf21597659.tar.gz
zsh-5a586670d73dbbda97d124e33398aabf21597659.tar.bz2
zsh-5a586670d73dbbda97d124e33398aabf21597659.zip
Merge remote-tracking branch 'upstream/master'
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