Fixes:
- allows `configfile' to contain spaces:
- with `ssh -F<tab>' and `scp -F<tab>' you received an error message of
_known_hosts: "bash: option requires an argument -- F"
=== modified file 'contrib/ssh'
--- contrib/ssh 2008-11-01 11:25:38 +0000
+++ contrib/ssh 2008-11-05 20:48:19 +0000
@@ -31,17 +31,17 @@
while [ $# -gt 0 ]; do
if [ "${1:0:2}" = -F ]; then
if [ ${#1} -gt 2 ]; then
- optconfigfile="$1"
+ optconfigfile="$(dequote "$1")"
else
shift
- optconfigfile="-F$1"
+ [ "$1" ] && optconfigfile="$(dequote
"-F$1")"
fi
break
fi
shift
done
- _known_hosts -a $optconfigfile
+ _known_hosts -a "$optconfigfile"
[ $COMP_CWORD -eq 1 -o -n "$optconfigfile" ] || \
COMPREPLY=( "[EMAIL PROTECTED]" $( compgen -c -- $cur ) )
@@ -89,17 +89,17 @@
while [ $# -gt 0 ]; do
if [ "${1:0:2}" = -F ]; then
if [ ${#1} -gt 2 ]; then
- optconfigfile="$1"
+ optconfigfile="$(dequote "$1")"
else
shift
- optconfigfile="-F$1"
+ [ "$1" ] && optconfigfile="$(dequote "-F$1")"
fi
break
fi
shift
done
- [[ "$cur" == */* ]] || _known_hosts -c -a $optconfigfile
+ [[ "$cur" == */* ]] || _known_hosts -c -a "$optconfigfile"
local IFS=$'\t\n'
COMPREPLY=( "[EMAIL PROTECTED]" $( command ls -aF1d $cur* \
2>/dev/null | sed \
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]