File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1868,7 +1868,7 @@ _included_ssh_config_files()
18681868_known_hosts_real ()
18691869{
18701870 local configfile=" " flag prefix=" "
1871- local cur suffix=" " aliases=" " i host ipv4=" " ipv6=" "
1871+ local cur suffix=" " aliases=" " i host ipv4=false ipv6=false
18721872 local -a kh tmpkh=() khd=() config=()
18731873
18741874 # TODO remove trailing %foo from entries
@@ -1886,8 +1886,8 @@ _known_hosts_real()
18861886 configfile=$OPTARG
18871887 ;;
18881888 p) prefix=$OPTARG ;;
1889- 4) ipv4=1 ;;
1890- 6) ipv6=1 ;;
1889+ 4) ipv4=true ;;
1890+ 6) ipv6=true ;;
18911891 * )
18921892 echo " bash_completion: $FUNCNAME : usage error" >&2
18931893 return 1
@@ -2062,13 +2062,13 @@ _known_hosts_real()
20622062 $reset
20632063
20642064 if (( ${# COMPREPLY[@]} )) ; then
2065- if [[ $ipv4 ]] ; then
2065+ if " $ipv4 " ; then
20662066 COMPREPLY=(" ${COMPREPLY[@]/*:* $suffix / } " )
20672067 fi
2068- if [[ $ipv6 ]] ; then
2068+ if " $ipv6 " ; then
20692069 COMPREPLY=(" ${COMPREPLY[@]/ +([0-9]).+([0-9]).+([0-9]).+([0-9])$suffix / } " )
20702070 fi
2071- if [[ $ipv4 || $ipv6 ]] ; then
2071+ if " $ipv4 " || " $ipv6 " ; then
20722072 for i in " ${! COMPREPLY[@]} " ; do
20732073 [[ ${COMPREPLY[i]} ]] || unset -v ' COMPREPLY[i]'
20742074 done
You can’t perform that action at this time.
0 commit comments