From 4167cc8db6c44314335cffd9c1a80f6da7ae4a69 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 4 Oct 2017 17:27:01 +0200 Subject: [PATCH] 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. --- subcommand | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2