Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: man completion breaks after upgrade from 5.2 to 5.3
- X-seq: zsh-workers 40264
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Benoit Izac <benoit@xxxxxxxx>
- Subject: Re: man completion breaks after upgrade from 5.2 to 5.3
- Date: Tue, 3 Jan 2017 14:23:36 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=DbfwI7XresCD1d4 I/HDp2o/KCtM=; b=qXFIo+Bkif92tqONUkNi6iEpTCfIb+pi0k/cLrkYNW1rEb8 /+NIhwHCSnhOdJxnBsTbqHiB2g3j+Ocsy6CSJIjACp0Km4skOzQoyL45XDWTLXu9 V0b5oX+nq6MomGuZbZ5nZsnU/merBbZuE2zoJCZR09s0YPUYq0Cuf4EE4grw=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=DbfwI7XresCD1d 4I/HDp2o/KCtM=; b=Z0FGWfqJRr0r0SXNYaxdfWb6W2FdZetc+DLM7uprxoU1kG nxyJiwO2Kb6J+lPdd0QiXZ1beRCC2j+MBRuK+qx770CEISPV0l5bQPgh00hsHu4z gNLVTWdLobIuV1hw2sGVm34EX75hr/8oy8x04h8fAkn+lsjoHyYJndZnDsmG4=
- In-reply-to: <87o9zob681.fsf@izac.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <87o9zob681.fsf@izac.org>
Benoit Izac wrote on Tue, Jan 03, 2017 at 14:53:02 +0100:
> I have a problem with man completion since I upgraded 5.2 to 5.3,
> man -a <TAB> returns only a few possibilities (about 50) when man <TAB>
> returns about 23300 possibilities.
>
> I'm not comfortable with the zsh syntax used in completion, could
> someone help me to find where it breaks?
Bisected to:
896f43c72bcfd3f1e2240f54609868634a3c4e45 is the first bad commit
commit 896f43c72bcfd3f1e2240f54609868634a3c4e45
Author: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Thu Jan 14 15:37:43 2016 +0000
37634: _man: Support subsection names such as '3p'.
Probably due to the "*${sect}*" change in there. This does the trick:
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
index b2aaeaf..67810e1 100644
--- a/Completion/Unix/Command/_man
+++ b/Completion/Unix/Command/_man
@@ -51,7 +51,11 @@ _man() {
sect="${sect//:/|}"
sect="${sect//,/|}"
elif (( CURRENT > 2 )); then
- sect=$words[2]
+ case $words[2] in
+ (-a) sect='*';;
+ (-*) ;;
+ (*) sect=$words[2];;
+ esac
fi
if [[ $sect = (<->*|1M|l|n) || $sect = *\|* ]]; then
-a means 'all sections' on Linux and FreeBSD, and this elif branch isn't used
on Solaris. Does any other system have a conflicting/different meaning of -a?
Cheers,
Daniel
(Thanks for the parallel IRC report, it was much faster to iterate that way)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author