@@ -133,6 +133,13 @@ _comp_cmd_gtar__parse_help_line()
133
133
# The parse results are returned in these variables.
134
134
_comp_cmd_gtar__parse_help ()
135
135
{
136
+ long_arg_none=" "
137
+ long_arg_opt=" "
138
+ long_arg_req=" "
139
+ short_arg_none=" "
140
+ short_arg_opt=" "
141
+ short_arg_req=" "
142
+
136
143
local str line arg
137
144
while IFS= read -r line; do
138
145
# Ok, this requires some comment probably. The GNU help output prints
@@ -177,8 +184,15 @@ _comp_cmd_gtar__parse_warnings()
177
184
_comp_compgen -- -W ' "${warnings[@]}"'
178
185
}
179
186
187
+ # @var[out] old_opt_progress
188
+ # @var[out] old_opt_used
189
+ # @var[out,array] old_opt_parsed
180
190
_comp_cmd_tar__parse_old_opt ()
181
191
{
192
+ old_opt_progress=" "
193
+ old_opt_used=" "
194
+ old_opt_parsed=()
195
+
182
196
local first_word char
183
197
184
198
# current word is the first word
@@ -544,11 +558,11 @@ _comp_cmd_tar__gnu()
544
558
545
559
# Fill the {long,short}_{opts,arg*}
546
560
local long_opts short_opts \
547
- long_arg_none= " " long_arg_opt= " " long_arg_req= " " \
548
- short_arg_none= " " short_arg_opt= " " short_arg_req= " "
561
+ long_arg_none long_arg_opt long_arg_req \
562
+ short_arg_none short_arg_opt short_arg_req
549
563
_comp_cmd_gtar__parse_help
550
564
551
- local old_opt_progress= " " old_opt_used= " " old_opt_parsed=()
565
+ local old_opt_progress old_opt_used old_opt_parsed
552
566
_comp_cmd_tar__preparse_cmdline " ${words[@]} "
553
567
554
568
local ext
@@ -726,15 +740,20 @@ _comp_cmd_tar__posix()
726
740
# Initialize option variables:
727
741
# relatively compatible modes are {c,t,x}
728
742
# relatively compatible options {b,f,m,v,w}
729
- # Note: long_opts, long_arg_*, short_arg_opt are currently unused
743
+ # Note: long_{opts,arg_{none,opt}} and short_arg_opt are currently unused
730
744
local long_opts short_opts \
731
- long_arg_none= " " long_arg_opt long_arg_req= " " \
745
+ long_arg_none long_arg_opt long_arg_req \
732
746
short_arg_none short_arg_opt short_arg_req
747
+ long_arg_none=" "
748
+ long_arg_opt=" "
749
+ long_arg_req=" "
750
+ long_opts=" "
733
751
short_arg_req=" fb"
752
+ short_arg_opt=" "
734
753
short_arg_none=" wmv"
735
754
short_opts=" $short_arg_req$short_arg_none "
736
755
737
- local old_opt_progress= " " old_opt_used=set old_opt_parsed=()
756
+ local old_opt_progress old_opt_used old_opt_parsed
738
757
_comp_cmd_tar__preparse_cmdline " ${words[@]} "
739
758
740
759
local ext
0 commit comments