Fix filename completions for zsh and bash (#331)

Reapply commit accidentally reverted
This commit is contained in:
wickles
2023-07-14 10:32:21 -07:00
committed by andy.boot
parent 7ee744207b
commit b5e3f4ca2f
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -71,6 +71,7 @@ _dust() {
'-V[Print version]' \
'--version[Print version]' \
'*::params:' \
'*:inputs:_files' \
&& ret=0
}
+4 -1
View File
@@ -20,9 +20,12 @@ _dust() {
case "${cmd}" in
dust)
opts="-d -n -p -X -I -L -x -s -r -c -b -B -z -R -f -i -v -e -t -w -H -P -D -F -S -h -V --depth --number-of-lines --full-paths --ignore-directory --ignore-all-in-file --dereference-links --limit-filesystem --apparent-size --reverse --no-colors --no-percent-bars --bars-on-right --min-size --screen-reader --skip-total --filecount --ignore_hidden --invert-filter --filter --file_types --terminal_width --si --no-progress --only-dir --only-file --stack-size --help --version [params]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
elif [[ ${cur} == * ]] ; then
_filedir
return 0
fi
case "${prev}" in
--depth)