summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-11-05 19:41:34 +0300
committerIgor Murzov <e-mail@date.by>2011-11-05 19:41:34 +0300
commit74d80d17f9ffa641ee184f73da058155a58f3d4b (patch)
tree2eda0a20c90e2f693fd358a605255487c6a114ad
parent2bb6addc869b13aacd87a4126b70e1a59b867a22 (diff)
downloadbash-completion-74d80d17f9ffa641ee184f73da058155a58f3d4b.tar.gz
_known_hosts_real: Add some quotes (Alioth #313158)
Should fix errors if $HOME contains spaces.
-rw-r--r--bash_completion6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash_completion b/bash_completion
index c5cd7c95..e563b05b 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1357,7 +1357,7 @@ _known_hosts_real()
else
for i in /etc/ssh/ssh_config "${HOME}/.ssh/config" \
"${HOME}/.ssh2/config"; do
- [ -r $i ] && config+=( "$i" )
+ [ -r "$i" ] && config+=( "$i" )
done
fi
@@ -1385,10 +1385,10 @@ _known_hosts_real()
for i in /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 \
/etc/known_hosts /etc/known_hosts2 ~/.ssh/known_hosts \
~/.ssh/known_hosts2; do
- [ -r $i ] && kh+=( $i )
+ [ -r "$i" ] && kh+=( "$i" )
done
for i in /etc/ssh2/knownhosts ~/.ssh2/hostkeys; do
- [ -d $i ] && khd+=( $i/*pub )
+ [ -d "$i" ] && khd+=( "$i"/*pub )
done
fi