ssh-helper/completion
2024-04-11 11:23:51 +03:00

18 lines
445 B
Plaintext

function _ssh_connector_completion()
{
latest="${COMP_WORDS[$COMP_CWORD]}"
words=$(grep -v -E "\#" $SSH_HELPER_HOST_LIST | awk '{print $1}')
COMPREPLY=($(compgen -W "$words" -- $latest))
return 0
}
function _scp_path_completition()
{
#COMPREPLY=(${COMP_WORDS})
COMPREPLY=($(scp-completion.py ${COMP_WORDS[*]} $COMP_CWORD))
return 0
}
complete -F _ssh_connector_completion ssh-helper
complete -F _scp_path_completition scp-helper