59
59
_comp_deprecate_var 2.12 \
60
60
COMP_TAR_INTERNAL_PATHS BASH_COMPLETION_CMD_TAR_INTERNAL_PATHS
61
61
62
- _comp_cmd_gtar__parse_help_opt ()
62
+ _comp_cmd_gtar__init_parse_help_opt ()
63
63
{
64
64
local opttype arg opt separator optvar
65
65
opttype=long
@@ -98,7 +98,7 @@ _comp_cmd_gtar__parse_help_opt()
98
98
eval " $optvar =\"\$ $optvar$separator \"\" $opt \" "
99
99
}
100
100
101
- _comp_cmd_gtar__parse_help_line ()
101
+ _comp_cmd_gtar__init_parse_help_line ()
102
102
{
103
103
local i
104
104
local -a tmp
@@ -107,7 +107,7 @@ _comp_cmd_gtar__parse_help_line()
107
107
case " $i " in
108
108
# regular options
109
109
--* | -* )
110
- _comp_cmd_gtar__parse_help_opt " $i " " $2 "
110
+ _comp_cmd_gtar__init_parse_help_opt " $i " " $2 "
111
111
;;
112
112
113
113
# end once there is single non-option word
@@ -122,10 +122,10 @@ _comp_cmd_gtar__parse_help_line()
122
122
# Parse the output of "tar --help" with GNU tar and store the parse results
123
123
# in a global variable.
124
124
#
125
- # @var[out] _comp_cmd_gtar__parse_help__result
125
+ # @var[out] _comp_cmd_gtar__saved_opts
126
126
# The parse results are stored in this global variable in a form that can
127
127
# be evaluated by the builtin "eval".
128
- _comp_cmd_gtar__parse_help_initialize ()
128
+ _comp_cmd_gtar__init_parse_help ()
129
129
{
130
130
local long_arg_none=" "
131
131
local long_arg_opt=" "
@@ -154,15 +154,15 @@ _comp_cmd_gtar__parse_help_initialize()
154
154
[[ ${BASH_REMATCH[1]} ]] && arg=opt || arg=req
155
155
fi
156
156
157
- _comp_cmd_gtar__parse_help_line " $str " " $arg "
157
+ _comp_cmd_gtar__init_parse_help_line " $str " " $arg "
158
158
fi
159
159
done <<< " $(tar --help)"
160
160
161
161
local long_opts=" $long_arg_none $long_arg_opt $long_arg_req "
162
162
163
163
local short_opts=" $short_arg_none$short_arg_opt$short_arg_req "
164
164
165
- printf -v _comp_cmd_gtar__parse_help__result ' %s=%q ' \
165
+ printf -v _comp_cmd_gtar__saved_opts ' %s=%q ' \
166
166
long_opts " $long_opts " \
167
167
short_opts " $short_opts " \
168
168
long_arg_none " $long_arg_none " \
@@ -173,11 +173,11 @@ _comp_cmd_gtar__parse_help_initialize()
173
173
short_arg_req " $short_arg_req "
174
174
175
175
# Clean up functions only used in initialization
176
- unset -f " $FUNCNAME "
177
- unset -f _comp_cmd_gtar__parse_help_line
178
- unset -f _comp_cmd_gtar__parse_help_opt
176
+ unset -f _comp_cmd_gtar__init_parse_help
177
+ unset -f _comp_cmd_gtar__init_parse_help_line
178
+ unset -f _comp_cmd_gtar__init_parse_help_opt
179
179
}
180
- _comp_cmd_gtar__parse_help_initialize
180
+ _comp_cmd_gtar__init_parse_help
181
181
182
182
# Load the parse results of "tar --help" for GNU tar into variables.
183
183
#
@@ -191,12 +191,12 @@ _comp_cmd_gtar__parse_help_initialize
191
191
# @var[out] short_arg_req
192
192
# The parse results are returned in these variables.
193
193
#
194
- # @var[in] _comp_cmd_gtar__parse_help__result
194
+ # @var[in] _comp_cmd_gtar__saved_opts
195
195
# The parse results are obtained by evaluating this variable with the
196
196
# "eval" builtin.
197
- _comp_cmd_gtar__parse_help ()
197
+ _comp_cmd_gtar__load_opts ()
198
198
{
199
- eval -- " $_comp_cmd_gtar__parse_help__result "
199
+ eval -- " $_comp_cmd_gtar__saved_opts "
200
200
}
201
201
202
202
# Hack: parse --warning keywords from tar's error output
@@ -589,7 +589,7 @@ _comp_cmd_tar__gnu()
589
589
local long_opts short_opts \
590
590
long_arg_none long_arg_opt long_arg_req \
591
591
short_arg_none short_arg_opt short_arg_req
592
- _comp_cmd_gtar__parse_help
592
+ _comp_cmd_gtar__load_opts
593
593
594
594
local old_opt_progress old_opt_used old_opt_parsed
595
595
_comp_cmd_tar__preparse_cmdline " ${words[@]} "
0 commit comments