Add support for directories to _quilt_comfile, and use that for the
setup command. The drops the last direct dependency to _filedir.
---
bash_completion | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/bash_completion
+++ b/bash_completion
@@ -78,12 +78,12 @@ if ! type _longopt &> /dev/null ; then
}
fi
-# Complete on files, not on directories
+# Complete on files (by default) or directories (with -d)
#
_quilt_comfile()
{
local IFS=$'\t\n'
- COMPREPLY=( "${COMPREPLY[@]}" $( compgen -f -- "$cur" ) )
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen ${1:--f} -- "$cur" ) )
}
_quilt_completion()
@@ -280,7 +280,7 @@ _quilt_completion()
setup)
case $prev in
-d)
- _filedir -d
+ _quilt_comfile -d
;;
*)
_quilt_comfile
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev