From 492943ac716bf63bb1e9e3b3ca625139fe34727d Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sat, 11 Feb 2006 22:39:28 +0000 Subject: 22234: Adeodato Simó's quilt completion improvements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Completion/Unix/Command/_quilt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_quilt b/Completion/Unix/Command/_quilt index 8c34c49b1..a2fd799a6 100644 --- a/Completion/Unix/Command/_quilt +++ b/Completion/Unix/Command/_quilt @@ -7,4 +7,24 @@ _arguments \ ':quilt command:(add files import previous setup annotate fold mail push snapshot applied fork new refresh top delete graph next remove unapplied diff grep patches rename upgrade edit header pop series)' \ - '*::file:_files' + '*::subcmd:->subcmd' && return 0 + +case "$state" in + (subcmd) + + case "$words[1]" in + (applied|delete|files|graph|header|next|previous|refresh|unapplied) + _wanted -V 'patches' expl 'patch' compadd ${(f)"$(quilt series)"} + ;; + (push) + _wanted -V 'unapplied patches' expl 'patch' compadd ${(f)"$(quilt unapplied)"} + ;; + (pop) + _wanted -V 'applied patches' expl 'patch' compadd ${(f)"$(quilt applied)"} + ;; + (*) + _files + ;; + esac + ;; +esac -- cgit 1.4.1