diff --git a/bash_completions.go b/bash_completions.go index 6ff6c692..81bfb613 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -176,7 +176,7 @@ __handle_flag() # keep flag value with flagname as flaghash # flaghash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" > 3 ]]; then + if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then if [ -n "${flagvalue}" ] ; then flaghash[${flagname}]=${flagvalue} elif [ -n "${words[ $((c+1)) ]}" ] ; then