diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:38:02 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:38:02 +0100 |
commit | 4559af5e71a2d6d1c53329e565d101c3eadacf6e (patch) | |
tree | 68a9ca95b43663793a7df52150a0f07be9502277 /misc | |
parent | da2eb3c519be1da8adf1ab0da8dbb526cfce9a73 (diff) | |
download | git-bug-4559af5e71a2d6d1c53329e565d101c3eadacf6e.tar.gz |
update auto-generated files
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bash_completion/git-bug | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug index ef6847c8..bbebd28f 100644 --- a/misc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug @@ -39,6 +39,7 @@ __git-bug_contains_word() __git-bug_handle_reply() { __git-bug_debug "${FUNCNAME[0]}" + local comp case $cur in -*) if [[ $(type -t compopt) = "builtin" ]]; then @@ -50,7 +51,9 @@ __git-bug_handle_reply() else allflags=("${flags[*]} ${two_word_flags[*]}") fi - COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${allflags[*]}" -- "$cur") if [[ $(type -t compopt) = "builtin" ]]; then [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace fi @@ -100,10 +103,14 @@ __git-bug_handle_reply() if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then completions+=("${must_have_one_flag[@]}") fi - COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${completions[*]}" -- "$cur") if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${noun_aliases[*]}" -- "$cur") fi if [[ ${#COMPREPLY[@]} -eq 0 ]]; then @@ -138,7 +145,7 @@ __git-bug_handle_filename_extension_flag() __git-bug_handle_subdirs_in_dir_flag() { local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 + pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return } __git-bug_handle_flag() |