From: Andre Noll Date: Wed, 4 Oct 2017 15:27:01 +0000 (+0200) Subject: Fix gsu_cword_is_option_parameter(). X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=4167cc8db6c44314335cffd9c1a80f6da7ae4a69;p=gsu.git Fix gsu_cword_is_option_parameter(). The function did not recognize option combining. For example, the current word was not recognized as an argument to -c if -c was given as -abc. This patch should fix this issue. --- diff --git a/subcommand b/subcommand index b3dc049..c04f23f 100644 --- a/subcommand +++ b/subcommand @@ -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