projects
/
gsu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ab2321
)
Fix gsu_cword_is_option_parameter().
author
Andre Noll
<maan@tuebingen.mpg.de>
Wed, 4 Oct 2017 15:27:01 +0000
(17:27 +0200)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Mon, 6 Nov 2017 11:27:40 +0000
(12:27 +0100)
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
patch
|
blob
|
history
diff --git
a/subcommand
b/subcommand
index
b3dc049
..
c04f23f
100644
(file)
--- 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