* PATCH: updated _debchange
@ 2007-01-23 19:09 arno.
2007-01-23 21:47 ` Clint Adams
0 siblings, 1 reply; 3+ messages in thread
From: arno. @ 2007-01-23 19:09 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 3708 bytes --]
Hi,
I made a _debchange completion that supports more command line options
than current one
arno.
Index: Completion/Debian/Command/_debchange
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_debchange,v
retrieving revision 1.2
diff -u -r1.2 _debchange
--- Completion/Debian/Command/_debchange 31 Jul 2003 15:26:14 -0000 1.2
+++ Completion/Debian/Command/_debchange 23 Jan 2007 18:57:06 -0000
@@ -1,10 +1,46 @@
#compdef debchange dch=debchange
-_arguments \
- '(-h --help)'{-h,--help}'[display help information]' \
- '--version' \
- '(--append -a --newversion -v --increment -i)'{-i,--increment}'[increment release or version number]' \
- '(--append -a --newversion -v --increment -i)'{-a,--append}'[add new changelog entry]' \
- '(--append -a --newversion -v --increment -i)'{-v,--newversion}'[specify new version number]:version:' \
- '(--preserve -p)'{-p,--preserve}'[preserve source tree directory name]' \
- ':text:'
+_debchange () {
+ emulate -L zsh
+ setopt extendedglob
+
+ # only 0 or 1 of those options may be proposed
+ local exlusive="--append -a --increment -i --edit -e --release -r --newversion -v --fromdirname -d"
+
+ local logheuristic="looks for dupload or dput log file"
+ local changelogheuristic="searchs for UNRELEASED in changelog"
+ local distribs="unstable testing stable experimental UNRELEASED testing-security stable-security oldstable-security"
+
+ _arguments \
+ '--create[create new debian/changelog]' \
+ '(--force-bad-version, -b)'{-b,--force-bad-version}'[allows version to be less than current one]' \
+ '(--no-preserve --preserve -p)'{-p,--preserve}'[do preserve source tree directory name]' \
+ '(--no-preserve --preserve -p)--no-preserve[do not preserve source tree directory name]' \
+ '(--query)--noquery[do not contact BTS]' \
+ '(--noquery)--query[do contact BTS]' \
+ '(--multimaint)--nomultimaint[do not introduce multi-maintainer distinctions]' \
+ '(--nomultimaint)--multimaint[do introduce multi-maintainer distinctions]' \
+ "($exlusive)"{-i,--increment}'[increment release or version number]' \
+ "($exlusive)"{-a,--append}'[add new changelog entry]' \
+ "($exlusive)"{-v,--newversion}'[specify new version number]:version:' \
+ "($exlusive)"{-e,--edit}'[update timestamp, and start editor]' \
+ "($exlusive)"{-r,--release}'[update timestamp. Possibly set distribution]' \
+ '(--closes --news)--closes[add entries to close bugs]:bugs closed:' \
+ '(--changelog -c --closes -news)--news[edit newsfile]' \
+ '(--changelog -c --news)'{-c,--changelog}'[edit changelog]:changelog file:_files' \
+ '--release-heuristic[method to determine package release]:heuristic:((changelog\:$changelogheuristic log\:$logheuristic))' \
+ '--check-dirname-level[how to check directory]:level:((0\:never 1\:default 2\:always))' \
+ '--check-dirname-regex[regex for directory matching]:regexp:' \
+ '--package[package name]:name:' \
+ "($exlusive)"{-d,--fromdirname}'[get version from directory name]' \
+ '(--distribution -D)'{--distribution,-D}"[use specified distribution]:distribution:($distribs)" \
+ '(--urgency -u)'{--urgency,-u}'[specify urgency]:urgency:(low medium high critical emergency)' \
+ '(--maintmaint -m)'{--maintmaint,-m}'[do not modify maintainer in changelog]' \
+ '(--no-conf --noconf)'{--no-conf,--noconf}'[do not read any configuration files]' \
+ '(-h --help)'{-h,--help}'[display help information]' \
+ '--version[display version and copyright]' \
+ ':text:( )'
+
+}
+
+_debchange "$@"
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: updated _debchange
2007-01-23 19:09 PATCH: updated _debchange arno.
@ 2007-01-23 21:47 ` Clint Adams
2007-01-24 9:15 ` arno.
0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2007-01-23 21:47 UTC (permalink / raw)
To: zsh-workers
> +_debchange () {
> + emulate -L zsh
> + setopt extendedglob
> +
[...]
> +}
> +
> +_debchange "$@"
I don't believe this is necessary.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: updated _debchange
2007-01-23 21:47 ` Clint Adams
@ 2007-01-24 9:15 ` arno.
0 siblings, 0 replies; 3+ messages in thread
From: arno. @ 2007-01-24 9:15 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 3496 bytes --]
Le mardi 23 janvier 2007, à 16:47:58 -0500, Clint a écrit :
> I don't believe this is necessary.
So, here is a shorter version
arno.
Index: Completion/Debian/Command/_debchange
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_debchange,v
retrieving revision 1.2
diff -u -r1.2 _debchange
--- Completion/Debian/Command/_debchange 31 Jul 2003 15:26:14 -0000 1.2
+++ Completion/Debian/Command/_debchange 24 Jan 2007 09:12:07 -0000
@@ -1,10 +1,38 @@
#compdef debchange dch=debchange
+# only 0 or 1 of those options may be proposed
+local exlusive="--append -a --increment -i --edit -e --release -r --newversion -v --fromdirname -d"
+
+local logheuristic="looks for dupload or dput log file"
+local changelogheuristic="searchs for UNRELEASED in changelog"
+local distribs="unstable testing stable experimental UNRELEASED testing-security stable-security oldstable-security"
+
_arguments \
- '(-h --help)'{-h,--help}'[display help information]' \
- '--version' \
- '(--append -a --newversion -v --increment -i)'{-i,--increment}'[increment release or version number]' \
- '(--append -a --newversion -v --increment -i)'{-a,--append}'[add new changelog entry]' \
- '(--append -a --newversion -v --increment -i)'{-v,--newversion}'[specify new version number]:version:' \
- '(--preserve -p)'{-p,--preserve}'[preserve source tree directory name]' \
- ':text:'
+'--create[create new debian/changelog]' \
+'(--force-bad-version, -b)'{-b,--force-bad-version}'[allows version to be less than current one]' \
+'(--no-preserve --preserve -p)'{-p,--preserve}'[do preserve source tree directory name]' \
+'(--no-preserve --preserve -p)--no-preserve[do not preserve source tree directory name]' \
+'(--query)--noquery[do not contact BTS]' \
+'(--noquery)--query[do contact BTS]' \
+'(--multimaint)--nomultimaint[do not introduce multi-maintainer distinctions]' \
+'(--nomultimaint)--multimaint[do introduce multi-maintainer distinctions]' \
+"($exlusive)"{-i,--increment}'[increment release or version number]' \
+"($exlusive)"{-a,--append}'[add new changelog entry]' \
+"($exlusive)"{-v,--newversion}'[specify new version number]:version:' \
+"($exlusive)"{-e,--edit}'[update timestamp, and start editor]' \
+"($exlusive)"{-r,--release}'[update timestamp. Possibly set distribution]' \
+'(--closes --news)--closes[add entries to close bugs]:bugs closed:' \
+'(--changelog -c --closes -news)--news[edit newsfile]' \
+'(--changelog -c --news)'{-c,--changelog}'[edit changelog]:changelog file:_files' \
+'--release-heuristic[method to determine package release]:heuristic:((changelog\:$changelogheuristic log\:$logheuristic))' \
+'--check-dirname-level[how to check directory]:level:((0\:never 1\:default 2\:always))' \
+'--check-dirname-regex[regex for directory matching]:regexp:' \
+'--package[package name]:name:' \
+"($exlusive)"{-d,--fromdirname}'[get version from directory name]' \
+'(--distribution -D)'{--distribution,-D}"[use specified distribution]:distribution:($distribs)" \
+'(--urgency -u)'{--urgency,-u}'[specify urgency]:urgency:(low medium high critical emergency)' \
+'(--maintmaint -m)'{--maintmaint,-m}'[do not modify maintainer in changelog]' \
+'(--no-conf --noconf)'{--no-conf,--noconf}'[do not read any configuration files]' \
+'(-h --help)'{-h,--help}'[display help information]' \
+'--version[display version and copyright]' \
+':text:( )'
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-24 9:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-23 19:09 PATCH: updated _debchange arno.
2007-01-23 21:47 ` Clint Adams
2007-01-24 9:15 ` arno.
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).