File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ __%[1]s_handle_reply()
7272 else
7373 allflags=("${flags[*]} ${two_word_flags[*]}")
7474 fi
75- mapfile -t COMPREPLY < <(compgen -W "${allflags[*]}" -- "$cur")
75+ COMPREPLY=()
76+ while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "${allflags[*]}" -- "$cur")
77+
7678 if [[ $(type -t compopt) = "builtin" ]]; then
7779 [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
7880 fi
@@ -122,10 +124,12 @@ __%[1]s_handle_reply()
122124 if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
123125 completions+=("${must_have_one_flag[@]}")
124126 fi
125- mapfile -t COMPREPLY < <(compgen -W "${completions[*]}" -- "$cur")
127+ COMPREPLY=()
128+ while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "${completions[*]}" -- "$cur")
126129
127130 if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
128- mapfile -t COMPREPLY < <(compgen -W "${noun_aliases[*]}" -- "$cur")
131+ COMPREPLY=()
132+ while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "${noun_aliases[*]}" -- "$cur")
129133 fi
130134
131135 if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
@@ -160,7 +164,7 @@ __%[1]s_handle_filename_extension_flag()
160164__%[1]s_handle_subdirs_in_dir_flag()
161165{
162166 local dir="$1"
163- pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || exit
167+ pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
164168}
165169
166170__%[1]s_handle_flag()
You can’t perform that action at this time.
0 commit comments