projects
/
gsu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4167cc8
)
subcommand: Declare $opt as local.
author
Andre Noll
<maan@tuebingen.mpg.de>
Sat, 14 Oct 2017 20:59:55 +0000
(22:59 +0200)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Mon, 6 Nov 2017 11:30:22 +0000
(12:30 +0100)
Without the local keyword, gsu_cword_is_option_parameter() might
overwrite a variable of the caller.
subcommand
patch
|
blob
|
history
diff --git
a/subcommand
b/subcommand
index
c04f23f
..
7318c9e
100644
(file)
--- a/
subcommand
+++ b/
subcommand
@@
-493,7
+493,8
@@
EOF
#
gsu_cword_is_option_parameter()
{
- local opts="$1" cword="$2" prev i n
+ local opts="$1" cword="$2"
+ local opt prev i n
local -a words
result=