* Re: Bug#390298: zsh-beta: make-kpkg completion: Support paths for --added-modules
[not found] <20060929171425.GA28073@alea.gnuu.de>
@ 2007-02-22 16:49 ` Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2007-02-22 16:49 UTC (permalink / raw)
To: zsh-workers; +Cc: Jörg Sommer, 390298-forwarded
> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-22 16:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20060929171425.GA28073@alea.gnuu.de>
2007-02-22 16:49 ` Bug#390298: zsh-beta: make-kpkg completion: Support paths for --added-modules Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).