diff options
Diffstat (limited to 'completions/slapt-get')
-rw-r--r-- | completions/slapt-get | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/completions/slapt-get b/completions/slapt-get index 93d110bc..512981b6 100644 --- a/completions/slapt-get +++ b/completions/slapt-get @@ -45,6 +45,7 @@ _slapt_get() for (( i=${#words[@]}-1; i>0; i-- )); do if [[ ${words[i]} == -@(c|-config) ]]; then config="${words[i+1]}" + __expand_tilde_by_ref config break fi done @@ -55,13 +56,13 @@ _slapt_get() # slapt-get will fail to search for "^name-version" # it can search for names only local name=${cur%%-*} - COMPREPLY=( $( slapt-get -c $config --search "^$name" 2>/dev/null |\ - sed -ne "/^$cur/{s/ .*$//;p}" ) ) + COMPREPLY=( $( 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=( $( slapt-get -c $config --available 2>/dev/null | \ - sed -ne "/^$cur/{s/ .*$//;p}" ) ) + COMPREPLY=( $( LC_ALL=C "$1" -c "$config" --available 2> \ + /dev/null | LC_ALL=C command sed -ne "/^$cur/{s/ .*$//;p}" ) ) return ;; ins) # --remove|--filelist @@ -74,6 +75,7 @@ _slapt_get() return ;; esac -} && complete -F _slapt_get slapt-get +} && +complete -F _slapt_get slapt-get -# ex: ts=4 sw=4 et filetype=sh +# ex: filetype=sh |