Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _fc: Remove a spurious 2



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



Messages sorted by: Reverse Date, Date, Thread, Author