diff --git a/completions/slapt-get b/completions/slapt-get index d8c2592a4fb..1dc09e06608 100644 --- a/completions/slapt-get +++ b/completions/slapt-get @@ -60,13 +60,17 @@ _comp_cmd_slapt_get() # slapt-get will fail to search for "^name-version" # it can search for names only local name=${cur%%-*} - COMPREPLY=($(LC_ALL=C "$1" -c "$config" --search "^$name" \ - 2>/dev/null | LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}")) + _comp_compgen_split -l -- "$( + LC_ALL=C "$1" -c "$config" --search "^$name" 2>/dev/null | + LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}" + )" return ;; avl) # --install|-i| - COMPREPLY=($(LC_ALL=C "$1" -c "$config" --available \ - 2>/dev/null | LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}")) + _comp_compgen_split -l -- "$( + LC_ALL=C "$1" -c "$config" --available 2>/dev/null | + LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}" + )" return ;; ins) # --remove|--filelist diff --git a/completions/slapt-src b/completions/slapt-src index 63dab92e7e1..cdf00c202c5 100644 --- a/completions/slapt-src +++ b/completions/slapt-src @@ -56,12 +56,17 @@ _comp_cmd_slapt_src() if [[ $cur == *:* ]]; then local name=${cur%:*} - COMPREPLY=($(LC_ALL=C "$1" --config "$config" --search "^$name" \ - 2>/dev/null | LC_ALL=C command sed -ne \ - "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p;}")) + _comp_compgen_split -l -- "$( + LC_ALL=C + "$1" --config "$config" --search "^$name" 2>/dev/null | + command sed -ne "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p;}" + )" else - COMPREPLY=($(LC_ALL=C "$1" --config "$config" --search "^$cur" \ - 2>/dev/null | LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p;}")) + _comp_compgen_split -l -- "$( + LC_ALL=C + "$1" --config "$config" --search "^$cur" 2>/dev/null | + command sed -ne "/^$cur/{s/ .*$//;p;}" + )" fi } && complete -F _comp_cmd_slapt_src slapt-src