@@ -18,9 +18,9 @@ _comp_deprecate_func 2.12 _split_longopt _comp__split_longopt
18
18
_comp_deprecate_func 2.12 __ltrim_colon_completions _comp_ltrim_colon_completions
19
19
20
20
# Backwards compatibility for compat completions that use have().
21
- # @deprecated should no longer be used; generally not needed with dynamically
22
- # loaded completions, and _comp_have_command is suitable for
23
- # runtime use.
21
+ # @deprecated 1.90 should no longer be used; generally not needed with
22
+ # dynamically loaded completions, and _comp_have_command is suitable for
23
+ # runtime use.
24
24
# shellcheck disable=SC2317 # available at load time only
25
25
have ()
26
26
{
@@ -29,15 +29,15 @@ have()
29
29
}
30
30
31
31
# This function shell-quotes the argument
32
- # @deprecated Use `_comp_quote` instead. Note that `_comp_quote` stores
32
+ # @deprecated 2.12 Use `_comp_quote` instead. Note that `_comp_quote` stores
33
33
# the results in the variable `ret` instead of writing them to stdout.
34
34
quote ()
35
35
{
36
36
local quoted=${1// \' / \'\\\'\' }
37
37
printf " '%s'" " $quoted "
38
38
}
39
39
40
- # @deprecated Use `_comp_quote_compgen`
40
+ # @deprecated 2.12 Use `_comp_quote_compgen`
41
41
quote_readline ()
42
42
{
43
43
local ret
@@ -49,7 +49,7 @@ quote_readline()
49
49
# argument specifying the variable name to store the result.
50
50
# @param $1 Argument to quote
51
51
# @param $2 Name of variable to return result to
52
- # @deprecated Use `_comp_quote_compgen "$1"` instead. Note that
52
+ # @deprecated 2.12 Use `_comp_quote_compgen "$1"` instead. Note that
53
53
# `_comp_quote_compgen` stores the result in a fixed variable `ret`.
54
54
_quote_readline_by_ref ()
55
55
{
@@ -59,8 +59,8 @@ _quote_readline_by_ref()
59
59
}
60
60
61
61
# This function shell-dequotes the argument
62
- # @deprecated Use `_comp_dequote' instead. Note that `_comp_dequote` stores
63
- # the results in the array `ret` instead of writing them to stdout.
62
+ # @deprecated 2.12 Use `_comp_dequote' instead. Note that `_comp_dequote`
63
+ # stores the results in the array `ret` instead of writing them to stdout.
64
64
dequote ()
65
65
{
66
66
local ret
@@ -79,7 +79,7 @@ dequote()
79
79
# use multiple '_upvar' calls, since one '_upvar' call might
80
80
# reassign a variable to be used by another '_upvar' call.
81
81
# @see https://fvue.nl/wiki/Bash:_Passing_variables_by_reference
82
- # @deprecated Use `_comp_upvars' instead
82
+ # @deprecated 2.10 Use `_comp_upvars' instead
83
83
_upvar ()
84
84
{
85
85
echo " bash_completion: $FUNCNAME : deprecated function," \
@@ -107,7 +107,7 @@ _upvar()
107
107
# current word (default is 0, previous is 1), respecting the exclusions
108
108
# given at $1. For example, `_get_cword "=:" 1' returns the word left of
109
109
# the current word, respecting the exclusions "=:".
110
- # @deprecated Use `_comp_get_words cur' instead
110
+ # @deprecated TODO Use `_comp_get_words cur' instead
111
111
# @see _comp_get_words()
112
112
_get_cword ()
113
113
{
@@ -158,7 +158,7 @@ _get_cword()
158
158
# This is a good alternative to `prev=${COMP_WORDS[COMP_CWORD-1]}' because bash4
159
159
# will properly return the previous word with respect to any given exclusions to
160
160
# COMP_WORDBREAKS.
161
- # @deprecated Use `_comp_get_words cur prev' instead
161
+ # @deprecated TODO Use `_comp_get_words cur prev' instead
162
162
# @see _comp_get_words()
163
163
#
164
164
_get_pword ()
@@ -169,7 +169,7 @@ _get_pword()
169
169
}
170
170
171
171
# Get real command.
172
- # @deprecated Use `_comp_realcommand` instead.
172
+ # @deprecated 2.12 Use `_comp_realcommand` instead.
173
173
# Note that `_comp_realcommand` stores the result in the variable `ret`
174
174
# instead of writing it to stdout.
175
175
_realcommand ()
@@ -202,7 +202,7 @@ _realcommand()
202
202
# @return True (0) if completion needs further processing,
203
203
# False (> 0) no further processing is necessary.
204
204
#
205
- # @deprecated Use the new interface `_comp_initialize`. The new interface
205
+ # @deprecated 2.12 Use the new interface `_comp_initialize`. The new interface
206
206
# supports the same set of options. The new interface receives additional
207
207
# arguments $1 (command name), $2 (part of current word before the cursor), and
208
208
# $3 (previous word) that are specified to the completion function by Bash.
@@ -234,21 +234,21 @@ _init_completion()
234
234
return " $rc "
235
235
}
236
236
237
- # @deprecated Use the variable `_comp_backup_glob` instead. This is the
237
+ # @deprecated 2.12 Use the variable `_comp_backup_glob` instead. This is the
238
238
# backward-compatibility name.
239
239
# shellcheck disable=SC2154 # defined in the main "bash_completion"
240
240
_backup_glob=$_comp_backup_glob
241
241
242
- # @deprecated use `_comp_cmd_cd` instead.
242
+ # @deprecated 2.12 use `_comp_cmd_cd` instead.
243
243
_cd ()
244
244
{
245
245
declare -F _comp_cmd_cd & > /dev/null || __load_completion cd
246
246
_comp_cmd_cd " $@ "
247
247
}
248
248
249
- # @deprecated Use `_comp_command_offset` instead. Note that the new interface
250
- # `_comp_command_offset` is changed to receive an index in `words` instead of
251
- # that in `COMP_WORDS` as `_command_offset` did.
249
+ # @deprecated 2.12 Use `_comp_command_offset` instead. Note that the new
250
+ # interface `_comp_command_offset` is changed to receive an index in
251
+ # `words` instead of that in `COMP_WORDS` as `_command_offset` did.
252
252
_command_offset ()
253
253
{
254
254
# We unset the shell variable `words` locally to tell
@@ -259,7 +259,7 @@ _command_offset()
259
259
_comp_command_offset " $@ "
260
260
}
261
261
262
- # @deprecated Use `_comp_compgen -a filedir`
262
+ # @deprecated 2.12 Use `_comp_compgen -a filedir`
263
263
_filedir ()
264
264
{
265
265
_comp_compgen -a filedir " $@ "
@@ -269,17 +269,17 @@ _filedir()
269
269
# @return True (0) if completion needs further processing,
270
270
# False (1) if tilde is followed by a valid username, completions are
271
271
# put in COMPREPLY and no further processing is necessary.
272
- # @deprecated Use `_comp_compgen -c CUR tilde [-d]`. Note that the exit status
273
- # of `_comp_compgen_tilde` is flipped. It returns 0 when the tilde completions
274
- # are attempted, or otherwise 1.
272
+ # @deprecated 2.12 Use `_comp_compgen -c CUR tilde [-d]`. Note that the exit
273
+ # status of `_comp_compgen_tilde` is flipped. It returns 0 when the tilde
274
+ # completions are attempted, or otherwise 1.
275
275
_tilde ()
276
276
{
277
277
! _comp_compgen -c " $1 " tilde
278
278
}
279
279
280
280
# Helper function for _parse_help and _parse_usage.
281
281
# @return True (0) if an option was found, False (> 0) otherwise
282
- # @deprecated Use _comp_compgen_help__parse
282
+ # @deprecated 2.12 Use _comp_compgen_help__parse
283
283
__parse_options ()
284
284
{
285
285
local -a _options=()
@@ -290,7 +290,7 @@ __parse_options()
290
290
# Parse GNU style help output of the given command.
291
291
# @param $1 command; if "-", read from stdin and ignore rest of args
292
292
# @param $2 command options (default: --help)
293
- # @deprecated Use `_comp_compgen_help`. `COMPREPLY=($(compgen -W
293
+ # @deprecated 2.12 Use `_comp_compgen_help`. `COMPREPLY=($(compgen -W
294
294
# '$(_parse_help "$1" ...)' -- "$cur"))` can be replaced with
295
295
# `_comp_compgen_help [-- ...]`. Also, `var=($(_parse_help "$1" ...))` can
296
296
# be replaced with `_comp_compgen -Rv var help [-- ...]`.
@@ -314,7 +314,7 @@ _parse_help()
314
314
# Parse BSD style usage output (options in brackets) of the given command.
315
315
# @param $1 command; if "-", read from stdin and ignore rest of args
316
316
# @param $2 command options (default: --usage)
317
- # @deprecated Use `_comp_compgen_usage`. `COMPREPLY=($(compgen -W
317
+ # @deprecated 2.12 Use `_comp_compgen_usage`. `COMPREPLY=($(compgen -W
318
318
# '$(_parse_usage "$1" ...)' -- "$cur"))` can be replaced with
319
319
# `_comp_compgen_usage [-- ...]`. `var=($(_parse_usage "$1" ...))` can be
320
320
# replaced with `_comp_compgen -Rv var usage [-- ...]`.
0 commit comments