Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#390298: zsh-beta: make-kpkg completion: Support paths for --added-modules
- X-seq: zsh-workers 23183
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#390298: zsh-beta: make-kpkg completion: Support paths for --added-modules
- Date: Thu, 22 Feb 2007 11:49:38 -0500
- Cc: Jörg Sommer <joerg@xxxxxxxxxxxx>, 390298-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <20060929171425.GA28073@xxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>, 390298-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20060929171425.GA28073@xxxxxxxxxxxx>
> according the manpage of make-kpkg it is allowed to supply a path to
> --added-modules. Can you change the completion system that it accepts
> paths.
>
> Because these paths must be absolute, it would be nice if a relative path
> becomes an absolute path automaticly. E.g. --added-modules ../mo<TAB> -->
> --added-modules $PWD/../mol/
This doesn't handle your absolute path requirement; I'm not sure how to
do that sanely.
Index: Completion/Debian/Command/_make-kpkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_make-kpkg,v
retrieving revision 1.4
diff -u -r1.4 _make-kpkg
--- Completion/Debian/Command/_make-kpkg 14 Feb 2007 18:27:52 -0000 1.4
+++ Completion/Debian/Command/_make-kpkg 22 Feb 2007 16:45:33 -0000
@@ -1,10 +1,13 @@
#compdef make-kpkg
+local context state line
+typeset -A opt_args
+
_arguments \
'--help[display help message]' \
'--revision[change Debian revision number]:number:' \
'--append-to-version[specify additional kernel sub-version]:suffix:' \
- '--added-modules[specify add-on modules]:module list:' \
+ '--added-modules[specify add-on modules]:module list:->addedmodules' \
'--added-patches[specify additional patches]:patches list' \
'--arch[specify architecture for cross-compilation]:architecture' \
'--cross-compile[specify target string]:target' \
@@ -42,4 +45,13 @@
configure\:"configure the kernel" \
debian\:"creates the debian/ directory" \
libc-kheaders\:"create the kernel headers package needed by libc" \
- ))'
+ ))' && return 0
+
+case "$state" in
+ (addedmodules)
+ compset -P '*,'
+ _alternative \
+ 'moddirs:module dirs:_files -/ -S ,' \
+ 'modules:loc module dirs:_files -/ -W ${MODULE_LOC:-/usr/src/modules} -S ,'
+ ;;
+esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author