zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _fc: Remove a spurious 2
@ 2015-04-18 15:49 Mikael Magnusson
  2015-04-20 22:24 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2015-04-18 15:49 UTC (permalink / raw)
  To: zsh-workers

AFAICS, -2 isn't an option more than any other number is, and this broke
history -<tab> completion.

Introduced in f972b023

---
 Completion/Zsh/Command/_fc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Zsh/Command/_fc b/Completion/Zsh/Command/_fc
index 1331456..ccdc3fa 100644
--- a/Completion/Zsh/Command/_fc
+++ b/Completion/Zsh/Command/_fc
@@ -32,7 +32,7 @@ else
 fi
 
 fc_hist=(
-  '(-A -R -W -I -a -p -P 2)-m[treat argument as a pattern]'
+  '(-A -R -W -I -a -p -P)-m[treat argument as a pattern]'
   '(-A -R -W -I -e -f -E -i -t -a -p -P)-d[print time-stamps]'
   '(-A -R -W -I -e -d -E -i -t -a -p -P)-f[mm/dd/yyyy format time-stamps]'
   '(-A -R -W -I -e -d -f -i -t -a -p -P)-E[dd.mm.yyyy format time-stamps]'
-- 
2.2.0.GIT


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

* Re: PATCH: _fc: Remove a spurious 2
  2015-04-18 15:49 PATCH: _fc: Remove a spurious 2 Mikael Magnusson
@ 2015-04-20 22:24 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2015-04-20 22:24 UTC (permalink / raw)
  To: zsh-workers

Mikael Magnusson wrote:
> AFAICS, -2 isn't an option more than any other number is, and this broke
> history -<tab> completion.

That 2 is not spurious. It excludes the second argument, i.e. the
_arguments specification '2:last event:->events'
You can only have one argument after -m.

I think completion for history (as opposed to fc) is broken for quite a
different reason, see the following patch.

Oliver

diff --git a/Completion/Zsh/Command/_fc b/Completion/Zsh/Command/_fc
index 1331456..c298721 100644
--- a/Completion/Zsh/Command/_fc
+++ b/Completion/Zsh/Command/_fc
@@ -49,7 +49,7 @@ fc_r='(-A -R -W -I -e)-l[list resulting commands on stdout]'
 
 case $service in
   history)
-    _arguments "$fc_common[@]" "$fc_hist[@] && ret=0"
+    _arguments "$fc_common[@]" "$fc_hist[@]" && ret=0
   ;;
   r)
     _arguments "$fc_common[@]" "$fc_r" && ret=0


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

end of thread, other threads:[~2015-04-20 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-18 15:49 PATCH: _fc: Remove a spurious 2 Mikael Magnusson
2015-04-20 22:24 ` Oliver Kiddle

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).