quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [patch 4/5] bash_completion: Use _quilt_comfile for setup


From: Jean Delvare
Subject: [Quilt-dev] [patch 4/5] bash_completion: Use _quilt_comfile for setup
Date: Sat, 22 Feb 2014 22:35:10 +0100
User-agent: quilt/0.61-1

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=( "address@hidden" $( compgen -f -- "$cur" ) )
+       COMPREPLY=( "address@hidden" $( compgen ${1:--f} -- "$cur" ) )
 }
 
 _quilt_completion()
@@ -280,7 +280,7 @@ _quilt_completion()
        setup)
           case $prev in
             -d)
-               _filedir -d
+               _quilt_comfile -d
                ;;
             *)
                _quilt_comfile





reply via email to

[Prev in Thread] Current Thread [Next in Thread]