Fixed calls to _known_hosts_real
Made _known_hosts_real raise error if there are unprocessed arguments.
This commit is contained in:
parent
cdf0e82686
commit
127eaafb54
@ -1084,6 +1084,8 @@ _known_hosts_real()
|
||||
p) prefix=$OPTARG ;;
|
||||
esac
|
||||
done
|
||||
[ $# -ge $OPTIND ] && echo "error: $FUNCNAME("$@"): unprocessed arguments:"\
|
||||
$(while [ $# -gt 0 ]; do echo ${!OPTIND}; shift; done)
|
||||
|
||||
[[ $cur == *@* ]] && user=${cur%@*}@ && cur=${cur#*@}
|
||||
kh=()
|
||||
|
@ -94,7 +94,7 @@ _ssh()
|
||||
fi
|
||||
shift
|
||||
done
|
||||
_known_hosts_real -a "$optconfigfile" -h "$cur"
|
||||
_known_hosts_real -a -h "$cur" $optconfigfile
|
||||
if [ $COMP_CWORD -ne 1 ]; then
|
||||
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
|
||||
fi
|
||||
@ -144,7 +144,7 @@ _sftp()
|
||||
fi
|
||||
shift
|
||||
done
|
||||
_known_hosts_real -a "$optconfigfile" -h "$cur"
|
||||
_known_hosts_real -a -h "$cur" $optconfigfile
|
||||
fi
|
||||
|
||||
return 0
|
||||
@ -200,7 +200,7 @@ _scp()
|
||||
shift
|
||||
done
|
||||
|
||||
[[ "$cur" == */* ]] || _known_hosts_real -c -a "$optconfigfile" -h "$cur"
|
||||
[[ "$cur" == */* ]] || _known_hosts_real -c -a -h "$cur" $optconfigfile
|
||||
|
||||
# This approach is used instead of _filedir to get a space appended
|
||||
# after local file/dir completions, and $nospace retained for others.
|
||||
|
Loading…
x
Reference in New Issue
Block a user