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

Re: zsh 4.0.1 _man bug



[this one moved to -workers, I'll send the new _man to -users in a moment]

Bart Schaefer wrote:

> On Jul 10,  9:04am, Max Ischenko wrote:
> }
> } man n listb<TAB> -> man n listbox.n
> } 
> } Does anyone have a fix for this?
> 
> Try 4.0.2 ... the _man completion function was significantly improved.

But has a similar problem because I didn't change that pattern at the
end.


Bye
  Sven

Index: Completion/Unix/Command/_man
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_man,v
retrieving revision 1.2
diff -u -r1.2 _man
--- Completion/Unix/Command/_man	2001/06/21 12:53:55	1.2
+++ Completion/Unix/Command/_man	2001/07/10 08:06:08
@@ -47,16 +47,15 @@
 
   pages=( $dirs )
   compfiles -p pages '' '' "$matcher" '' dummy '*'
+  pages=( ${^~pages}(N:t:r) )
 
-  pages=( $~pages(:t:r) )
-
   (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd))
 
   # Remove any compression suffix, then remove the minimum possible string
   # beginning with .<->: that handles problem cases like files called
   # `POSIX.1.5'.
 
-  compadd "$@" - ${pages%.<->*}
+  compadd "$@" - ${pages%.(?|<->*)}
 }
 
 _man "$@"

-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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