zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.dk
Cc: Marc Glisse <glisse@stedding.loria.fr>, 311020-forwarded@bugs.debian.org
Subject: Re: Bug#311020: zsh: buggy _man completion
Date: Fri, 5 Aug 2005 19:56:03 -0400	[thread overview]
Message-ID: <20050805235603.GA21750@scowler.net> (raw)
In-Reply-To: <E1DbmAA-0008VQ-VC@localhost.localdomain>

> 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 "$@"


           reply	other threads:[~2005-08-05 23:56 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1DbmAA-0008VQ-VC@localhost.localdomain>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050805235603.GA21750@scowler.net \
    --to=schizo@debian.org \
    --cc=311020-forwarded@bugs.debian.org \
    --cc=glisse@stedding.loria.fr \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).