added bash autocompletion script for sshch aliases #2

Merged
zlax merged 1 commits from jeff-99/master into master 2017-09-12 17:48:32 +00:00
1 changed files with 11 additions and 0 deletions

11
sshch_bash_completion.sh Normal file
View File

@ -0,0 +1,11 @@
_sshch_complete()
{
local cur_word alias_list
cur_word="${COMP_WORDS[COMP_CWORD]}"
alias_list=`sshch -l | sed 's/,//g'`
COMPREPLY=($(compgen -W "$alias_list" -- $cur_word))
return 0
}
complete -F _sshch_complete sshch