diff options
Diffstat (limited to 'bash/bashrc.d/ssh.bash')
-rw-r--r-- | bash/bashrc.d/ssh.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/ssh.bash b/bash/bashrc.d/ssh.bash index 67c2828a..40327b43 100644 --- a/bash/bashrc.d/ssh.bash +++ b/bash/bashrc.d/ssh.bash @@ -9,14 +9,14 @@ _ssh() { while read -r option value _ ; do [[ $option == Host ]] || continue [[ $value != *'*'* ]] || continue - hosts=("${hosts[@]}" "$value") + hosts[${#hosts[@]}]=$value done < "$config" done # Generate completion reply for host in "${hosts[@]}" ; do [[ $host == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue - COMPREPLY=("${COMPREPLY[@]}" "$host") + COMPREPLY[${#COMPREPLY[@]}]=$host done } complete -F _ssh -o default ssh sftp ssh-copy-id |