wget: Use == instead of =.

This commit is contained in:
Ville Skyttä 2012-10-25 21:35:39 +03:00
parent 8ec4846922
commit d803323974

View File

@ -39,7 +39,7 @@ _wget()
# prevopt is the previous options string used as a prefix # prevopt is the previous options string used as a prefix
# to avoid COMPREPLY replacing them with the $lastopt completion # to avoid COMPREPLY replacing them with the $lastopt completion
local lastopt=${cur/*,} prevopt= local lastopt=${cur/*,} prevopt=
[[ $cur = *,* ]] && prevopt=${cur%,*}, [[ $cur == *,* ]] && prevopt=${cur%,*},
COMPREPLY=( $( compgen -P "$prevopt" -X "@($excludes_str)" \ COMPREPLY=( $( compgen -P "$prevopt" -X "@($excludes_str)" \
-W 'unix windows nocontrol ascii lowercase uppercase' \ -W 'unix windows nocontrol ascii lowercase uppercase' \
@ -65,7 +65,7 @@ _wget()
return return
;; ;;
-O|--output-document|-i|--input-file) -O|--output-document|-i|--input-file)
_filedir && [[ $cur = - || -z $cur ]] && COMPREPLY+=( - ) _filedir && [[ $cur == - || -z $cur ]] && COMPREPLY+=( - )
return return
;; ;;
--secure-protocol) --secure-protocol)
@ -78,7 +78,7 @@ _wget()
;; ;;
--follow-tags|--ignore-tags) --follow-tags|--ignore-tags)
local lastopt=${cur/*,} prevopt= local lastopt=${cur/*,} prevopt=
[[ $cur = *,* ]] && prevopt=${cur%,*}, [[ $cur == *,* ]] && prevopt=${cur%,*},
COMPREPLY=( $( compgen -P "$prevopt" -W 'a abbr acronym address COMPREPLY=( $( compgen -P "$prevopt" -W 'a abbr acronym address
applet area b base basefont bdo big blockquote body br button applet area b base basefont bdo big blockquote body br button
@ -154,7 +154,7 @@ _wget()
$split && return $split && return
if [[ $cur = -* ]]; then if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace [[ $COMPREPLY == *= ]] && compopt -o nospace
fi fi