* [Bug#400500: zsh: darcs completion listing a bit too much]
@ 2006-11-27 3:40 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2006-11-27 3:40 UTC (permalink / raw)
To: zsh-workers
> The command line completion for darcs includes a bit more than just the
> commands. The following change seems to fix it:
>
> --- _darcs 2006-11-26 17:15:03.000000000 +0000
> +++ /usr/share/zsh/4.3.2/functions/Completion/Unix/_darcs
> 2006-11-24 04:37:22.000000000 +0000
> @@ -101,7 +101,7 @@
> else
> local hline
> local -a cmdlist
> - _call_program help-commands darcs --help | while read -A hline; do
> + _call_program help-commands darcs --help | egrep -v '^[A-Z]' | while read -A hline; do
> (( ${#hline} < 2 )) && continue
> [[ $hline[1] == darcs ]] && continue
> [[ $hline[1] == Usage: ]] && continue
This might be a little cleaner.
Index: Completion/Unix/Command/_darcs
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_darcs,v
retrieving revision 1.5
diff -u -r1.5 _darcs
--- Completion/Unix/Command/_darcs 8 Aug 2005 07:59:36 -0000 1.5
+++ Completion/Unix/Command/_darcs 27 Nov 2006 03:30:46 -0000
@@ -104,8 +104,7 @@
_call_program help-commands darcs --help | while read -A hline; do
(( ${#hline} < 2 )) && continue
[[ $hline[1] == darcs ]] && continue
- [[ $hline[1] == Usage: ]] && continue
- [[ $hline[1] == Use ]] && continue
+ [[ $hline[1] == [A-Z]* ]] && continue
cmdlist=( $cmdlist "${hline[1]}:${hline[2,-1]/(#b)([A-Z])(*)./${match[1]:l}$match[2]}" )
done
arguments=(':commands:(($cmdlist))')
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-27 3:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-27 3:40 [Bug#400500: zsh: darcs completion listing a bit too much] 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).