ssh-helper/ssh_connector_comletition
Artem Bliznetsov 14b6579a94 Init commit
2024-02-22 17:46:45 +03:00

18 lines
471 B
Plaintext

function _ssh_connector_completion()
{
latest="${COMP_WORDS[$COMP_CWORD]}"
words=$(grep -v -E "\#" $SSH_CONNECTOR_HOST_LIST | awk '{print $1}')
COMPREPLY=($(compgen -W "$words" -- $latest))
return 0
}
function _scp_path_completition()
{
latest="${COMP_WORDS[$COMP_CWORD]}"
COMPREPLY=$(grep -v -E "\#" $SSH_CONNECTOR_HOST_LIST | awk '{print $1}')
return 0
}
complete -F _ssh_connector_completion ssh_helper
complete -F _ssh_connector_completion scp_helper