aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/ssh.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-12 20:52:54 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-12 20:52:54 +1300
commitb43f3f7aafbede00ba9c63697a2db659f1d60e9c (patch)
tree3448303e47b161350746184ff83ff9be75b550bc /bash/bashrc.d/ssh.bash
parentInline unneeded variable in completion function (diff)
downloaddotfiles-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.bash4
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