zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: vux/vuxctl completion
@ 2004-03-11 21:35 Clint Adams
  2004-03-12 10:00 ` Oliver Kiddle
  0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2004-03-11 21:35 UTC (permalink / raw)
  To: zsh-workers

For vux 0.4.8.

Index: Completion/Unix/Command/_vux
===================================================================
RCS file: Completion/Unix/Command/_vux
diff -N Completion/Unix/Command/_vux
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_vux	11 Mar 2004 21:26:37 -0000
@@ -0,0 +1,60 @@
+#compdef vux vuxctl
+
+case "$service" in
+	(vux)
+
+_arguments -s -C \
+	'-x:action:(p g m w r f)' \
+	'-s:file:_files' \
+	'-a:file:_files' \
+	'-z:file:_files' \
+	'-y:file:_files' \
+	'-p:file:_files' \
+	'-w:ratings:(b t)' \
+	'-W:repeats:(a c)' \
+	'-G:age bypass method:(t s n)' \
+	'-e:pattern:' \
+	'-O:device:_files' \
+	'-M:minimum age val:' \
+	'-S[Disable saving scorelist]' \
+	'-A[Disable saving agelist]' \
+	'-Z[Disable saving countlist]' \
+	'-Y[Disable missing log]' \
+	'-c[Disable rating check]' \
+	'-d[Disable rating updates on play]' \
+	'-l[Disable rating updates on skip]' \
+	'-j[Disable repeat check]' \
+	'-b[Disable repeat updates on play]' \
+	'-k[Disable repeat updates on skip]' \
+	'-n[Disable player]' \
+	'-t:percent:' \
+	'-T:percent:' \
+	'-C:factor:' \
+	'-D:factor:' \
+	'-I:factor:' \
+	'-U:rating:' \
+	'-X:score:' \
+	'-N:count:' \
+	'-f:rating:' \
+	'-J[Accelerate decreases]' \
+	'-K[Accelerate increases]' \
+	'-u[Check age before rating]' \
+	'-R[Show ratings after processing]' \
+	'-V[Verbose file manipulation]' \
+	'-v[Show version and exit]' \
+	'-F[Skip songs with -n and -xf]' \
+	'-q[Minimize vux output]' \
+	'-P[Always play new songs]' \
+	'-g[print stats in xgraph format]' \
+	'-h[Show summary of options]'
+
+	;;
+
+	(vuxctl)
+
+	compadd start clean double half up down next previous forward \
+		replay pause resume stop reload save history help
+
+	;;
+
+esac


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: vux/vuxctl completion
  2004-03-11 21:35 PATCH: vux/vuxctl completion Clint Adams
@ 2004-03-12 10:00 ` Oliver Kiddle
  2004-03-12 15:24   ` Clint Adams
  2004-03-12 15:42   ` Clint Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Kiddle @ 2004-03-12 10:00 UTC (permalink / raw)
  To: zsh-workers

Clint Adams wrote:
> For vux 0.4.8.

> Index: Completion/Unix/Command/_vux
> +#compdef vux vuxctl
> +
> +case "$service" in
> +	(vux)

Sorry to winge about this but could we please have consistency on
indentation across completion functions. Convention is for two spaces.

> +
> +_arguments -s -C \
> +	'-x:action:(p g m w r f)' \

Those actions could really do with descriptions:
  '...:((p\:description g\:...))'
works.

> +	compadd start clean double half up down next previous forward \
> +		replay pause resume stop reload save history help

This should really have an _wanted before it. We should never be adding
matches without some sort of description.

> Index: Completion/Unix/Command/_mtr
> 
> +       '(--report)-r[report]' \
> +       '(-r)--report' \
> +       '(--report--cycles)-c[report cycles]:count:' \
> +       '(-c)--report-cycles:count:' \

Since in 4.1, matches are grouped where they have the same description,
it is much nicer to give the description to both the long and short
option. The convention is to do this with brace expansion:

  '(-r --report)'{-r,--report}'[report]' \
  '(-c --report-cycles)'{-c,--report-cycles}'[report cycles]:count' \

Except the descriptions could be rather more, um, descriptive.

Oliver


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: vux/vuxctl completion
  2004-03-12 10:00 ` Oliver Kiddle
@ 2004-03-12 15:24   ` Clint Adams
  2004-03-12 15:42   ` Clint Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Clint Adams @ 2004-03-12 15:24 UTC (permalink / raw)
  To: zsh-workers

> Sorry to winge about this but could we please have consistency on
> indentation across completion functions. Convention is for two spaces.

> Those actions could really do with descriptions:
>   '...:((p\:description g\:...))'
> works.

> This should really have an _wanted before it. We should never be adding
> matches without some sort of description.

Index: Completion/Unix/Command/_vux
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_vux,v
retrieving revision 1.1
diff -u -r1.1 _vux
--- Completion/Unix/Command/_vux	11 Mar 2004 21:29:49 -0000	1.1
+++ Completion/Unix/Command/_vux	12 Mar 2004 15:13:59 -0000
@@ -1,10 +1,15 @@
 #compdef vux vuxctl
 
+local expl
+
 case "$service" in
-	(vux)
+  (vux)
 
-_arguments -s -C \
-	'-x:action:(p g m w r f)' \
+  _arguments -s -C \
+	'-x:action:((play\:play\ music generate\:generate\ new\ scorelist
+	            merge\:merge\ new\ songs
+		    weed\:prune\ songs\ from\ scorelist
+		    ratings\:show\ statistics force\:force-rate))' \
 	'-s:file:_files' \
 	'-a:file:_files' \
 	'-z:file:_files' \
@@ -47,14 +52,13 @@
 	'-P[Always play new songs]' \
 	'-g[print stats in xgraph format]' \
 	'-h[Show summary of options]'
+  ;;
 
-	;;
-
-	(vuxctl)
-
-	compadd start clean double half up down next previous forward \
-		replay pause resume stop reload save history help
+  (vuxctl)
 
-	;;
+  _wanted vuxcmd expl 'vux control command' \
+      compadd start clean double half up down next previous forward \
+	      replay pause resume stop reload save history help
+  ;;
 
 esac


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: vux/vuxctl completion
  2004-03-12 10:00 ` Oliver Kiddle
  2004-03-12 15:24   ` Clint Adams
@ 2004-03-12 15:42   ` Clint Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Clint Adams @ 2004-03-12 15:42 UTC (permalink / raw)
  To: zsh-workers

> Since in 4.1, matches are grouped where they have the same description,
> it is much nicer to give the description to both the long and short
> option. The convention is to do this with brace expansion:
> 
>   '(-r --report)'{-r,--report}'[report]' \
>   '(-c --report-cycles)'{-c,--report-cycles}'[report cycles]:count' \
> 
> Except the descriptions could be rather more, um, descriptive.

Index: Completion/Unix/Command/_mtr
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_mtr,v
retrieving revision 1.1
diff -u -r1.1 _mtr
--- Completion/Unix/Command/_mtr	11 Mar 2004 21:58:49 -0000	1.1
+++ Completion/Unix/Command/_mtr	12 Mar 2004 15:30:08 -0000
@@ -1,28 +1,16 @@
 #compdef mtr
 
 _arguments -C \
-	'(--help)-h[help]' \
-	'(-h)--help' \
-	'(--version)-v[version]' \
-	'(-v)--version' \
-	'(--report)-r[report]' \
-	'(-r)--report' \
-	'(--report--cycles)-c[report cycles]:count:' \
-	'(-c)--report-cycles:count:' \
-	'(--psize)-p[packet size]:packet size in bytes:' \
-	'(-p)--psize:packet size in bytes:' \
-	'(--curses)-t[curses]' \
-	'(-t)--curses' \
-	'(--no-dns)-n[no dns]' \
-	'(-n)--no-dns' \
-	'(--gtk)-g[gtk]' \
-	'(-g)--gtk' \
-	'(--split)-s[split]' \
-	'(-s)--split' \
-	'(--raw)-l[raw]' \
-	'(-l)--raw' \
-	'(--address)-a[source IP]:source IP:' \
-	'(-a)--address:source IP:' \
-	'(--interval)-i[interval]:seconds:' \
-	'(-i)--interval:seconds:' \
-	':hostname:_hosts'
+	'(-h --help)'{-h,--help}'[help]' \
+	'(-v --version)'{-v,--version}'[version]' \
+	'(-r --report)'{-r,--report}'[report mode]' \
+	'(-c --report-cycles)'{-c,--report-cycles}'[report cycles]:number of pings' \
+	'(-p --psize)'{-p,--psize}'[packet size]:number of bytes' \
+	'(-t --curses)'{-t,--curses}'[curses UI]' \
+	'(-n --no-dns)'{-n,--no-dns}'[no DNS lookups]' \
+	'(-g --gtk)'{-g,--gtk}'[GTK+ UI]' \
+	'(-s --split)'{-s,--split}'[output for a split-user interface]' \
+	'(-l --raw)'{-l,--raw}'[raw output format]' \
+	'(-a --address)'{-a,--address}'[source address]:source IP:_hosts' \
+	'(-i --interval)'{-i,--interval}'[ping interval]:number of seconds' \
+	':destination host:_hosts'


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-12 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-11 21:35 PATCH: vux/vuxctl completion Clint Adams
2004-03-12 10:00 ` Oliver Kiddle
2004-03-12 15:24   ` Clint Adams
2004-03-12 15:42   ` 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).