Skip to content

Commit

Permalink
feat(_comp_compgen_{filedir,set}): define exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 30, 2023
1 parent 47d7683 commit 7920c9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bash_completion
Expand Up @@ -665,12 +665,14 @@ _comp_compgen()
# caller _comp_compgen, the words are appended to the existing elements of the
# array instead of replacing the existing elements. This function ignores
# ${cur-} or the prefix specified by `-v CUR`.
# @return 0 if at least one completion is generated, or 1 otherwise.
# @since 2.12
_comp_compgen_set()
{
local _append=${_comp_compgen__append-}
local _var=${_comp_compgen__var-COMPREPLY}
eval -- "$_var${_append:++}=(\"\$@\")"
(($#))
}

# Simply split the text and generate completions. This function should be used
Expand Down Expand Up @@ -1004,6 +1006,7 @@ _comp_quote_compgen()
# @param $1 If `-d', complete only on directories. Otherwise filter/pick only
# completions with `.$1' and the uppercase version of it as file
# extension.
# @return 0 if at least one completion is generated, or 1 otherwise.
#
# @since 2.12
_comp_compgen_filedir()
Expand Down

0 comments on commit 7920c9d

Please sign in to comment.