* Re: Bug#311020: zsh: buggy _man completion
[not found] <E1DbmAA-0008VQ-VC@localhost.localdomain>
@ 2005-08-05 23:56 ` Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2005-08-05 23:56 UTC (permalink / raw)
To: zsh-workers; +Cc: Marc Glisse, 311020-forwarded
> These are actually 2 bugs:
>
> 1)
> When I use TAB completion with man, a _manpath array is created. If I
> then update $MANPATH, $manpath reflects this change, but however many
> times I use the completion on man again, _manpath is not updated, and
> completion uses the old MANPATH.
Not sure what we can do about that.
> 2)
> extract from _man:
> # Remove any compression suffix, then remove the minimum possible string
> # beginning with .<->: that handles problem cases like files called
> # `POSIX.1.5'.
>
> compadd "$@" - ${pages%.(?|<->*)}
>
> I have a man page called "qui-6.0.1". If I run this command manually,
> it indeed gives "qui-6.0". But when I use TAB completion, I see "qui-6".
> So either an option is different, or the suffix gets removed some other
> place... Notice that if the page is called "qui-6.0.1.gz", it works fine.
Thoughts on this?
Index: Completion/Unix/Command/_man
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_man,v
retrieving revision 1.6
diff -u -r1.6 _man
--- Completion/Unix/Command/_man 31 May 2002 05:02:38 -0000 1.6
+++ Completion/Unix/Command/_man 5 Aug 2005 23:54:44 -0000
@@ -82,7 +82,7 @@
pages=( ${(M)dirs:#*$sect/} )
compfiles -p pages '' '' "$matcher" '' dummy '*'
- pages=( ${^~pages}(N:t:r) )
+ pages=( ${^~pages}(N:t) )
(($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd))
@@ -90,7 +90,7 @@
# beginning with .<->: that handles problem cases like files called
# `POSIX.1.5'.
- compadd "$@" - ${pages%.(?|<->*)}
+ compadd "$@" - ${pages%.(?|<->*(|.gz|.bz2|.Z))}
}
_man "$@"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-05 23:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <E1DbmAA-0008VQ-VC@localhost.localdomain>
2005-08-05 23:56 ` Bug#311020: zsh: buggy _man completion 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).