# -*- shell-script -*- # zstyles # some local variables local _myhosts _myuser _myhosts=($(<~/.zsh/hosts) ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*}) _myusers=($(<~/.zsh/rc.users)) # Add host and user zstyle ':completion:*' users $_myusers zstyle ':completion:*' hosts $_myhosts # Use 'ps -au$USER' for fetch user process list zstyle ':completion:*:processes' command 'ps -au$USER' # Verbose mode zstyle ':completion:*:descriptions' format '%B%d%b' # Use cache zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zsh/cache # prevent CVS files/directory completion if [ -x `which cvs` ] then zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS' zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS' fi # others zstyle zstyle ':completion:*:*:mplayer:*' default-skin MidnightLove zstyle ':completion:*:*:zless:*' file-patterns '*(-/):directories *.gz:all-files' zstyle ':completion:*:*:gqview:*' file-patterns '*(-/):directories :*.(png|jpeg|jpg):all-files' zstyle ':completion:*:*:lintian:*' file-patterns '*(-/):directories *.deb' zstyle ':completion:*:*:less:*' ignored-patterns '*.gz' zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)' # few simple completion definitions [ -x `which mtr` ] && compdef _hosts mtr