Skip to content

Commit eb90bc7

Browse files
committed
docs(_comp_compgen): note _comp_compgen_NAME vs _comp_compgen NAME
1 parent 926b48d commit eb90bc7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bash_completion

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,11 @@ _comp_split()
437437
# [-alR|-v arr|-c cur] to the child calls of `_comp_compgen` in
438438
# `_comp_compgen_NAME`.
439439
#
440+
# @remarks When no options are supplied to _comp_compgen, `_comp_compgen NAME
441+
# args` is equivalent to the direct call `_comp_compgen_NAME args`. As the
442+
# direct call is slightly more efficient, the direct call is preferred over
443+
# calling it through `_comp_compgen`.
444+
#
440445
# @remarks Design `_comp_compgen_NAME`: a function that produce completions can
441446
# be defined with the name _comp_compgen_NAME. The function is supposed to
442447
# generate completions by calling `_comp_compgen`. To reflect the options

0 commit comments

Comments
 (0)