Fix gsu_cword_is_option_parameter().
[gsu.git] / subcommand
index b3dc049..c04f23f 100644 (file)
@@ -510,7 +510,7 @@ gsu_cword_is_option_parameter()
                opt="${opts:$i:1}"
                [[ "${opts:$(($i + 1)):1}" != ":" ]] && continue
                let i++
-               [[ "$prev" != "-$opt" ]] && continue
+               [[ ! "$prev" =~ ^-.*$opt$ ]] && continue
                result="$opt"
                return
        done