diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-10-12 20:52:54 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-10-12 20:52:54 +1300 |
commit | b43f3f7aafbede00ba9c63697a2db659f1d60e9c (patch) | |
tree | 3448303e47b161350746184ff83ff9be75b550bc /bash/bashrc.d/ssh.bash | |
parent | Inline unneeded variable in completion function (diff) | |
download | dotfiles-b43f3f7aafbede00ba9c63697a2db659f1d60e9c.tar.gz dotfiles-b43f3f7aafbede00ba9c63697a2db659f1d60e9c.zip |
Adjust declarations of local vars in compspecs
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 c382bb17..6ce73d24 100644 --- a/bash/bashrc.d/ssh.bash +++ b/bash/bashrc.d/ssh.bash @@ -1,15 +1,15 @@ # Completion for ssh/sftp/ssh-copy-id with config hostnames _ssh() { - local config=$HOME/.ssh/config local word=${COMP_WORDS[COMP_CWORD]} - local -a hosts # Bail if the configuration file is illegible + local config=$HOME/.ssh/config if [[ ! -r $config ]]; then return 1 fi # Read hostnames from the file, no asterisks + local -a hosts local option value while read -r option value _; do if [[ $option == Host && $value != *'*'* ]]; then |