]> git.alrj.org Git - zsh.d.git/blob - S40_completion
Add a wrapper for mc to stay in current directory upon exit
[zsh.d.git] / S40_completion
1 #! /usr/bin/zsh
2
3 autoload -U compinit
4
5 hosts=($( ( \
6         ( [ -r ~/.ssh/config ] && awk '/^host +[a-z]/ { print $2 }' ~/.ssh/config) ; \
7         ( [ -r ~/.ssh/known_hosts ] && awk '{print $1}' ~/.ssh/known_hosts | tr , '\n') \
8 ) | sort -u))
9
10 zstyle ':completion:*:hosts' hosts $hosts
11 zstyle ':completion:*:(ssh|scp|sftp):*' hosts $hosts
12 zstyle ':completion:*:hosts' list-colors '=(#b)(*)(.lln.iba)=01;30=01;31' '=[^.]#=01;31'
13
14 users=(atihon ccadmin tcsadmin tcs clinical root)
15 zstyle ':completion:*' users $users
16
17 compdef _hosts cc_sync
18
19 compinit