zsh-workers
 help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] _man: Support directories with suffixes
Date: Thu, 19 May 2016 00:07:25 -0500	[thread overview]
Message-ID: <20160519050725.GD94229@CptOrmolo.darkstar> (raw)

896f43c broke completion for man 3p <tab> on OpenBSD because those man
pages are in /usr/share/man/man3p.

I couldn't figure out what was the purpose for using $~sect, so I just
dropped the tilde.



diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
index 0534db7..9aec833 100644
--- a/Completion/Unix/Command/_man
+++ b/Completion/Unix/Command/_man
@@ -52,7 +52,7 @@ _man() {
   fi
 
   if [[ $sect = (<->*|1M|l|n) || $sect = \(*\|*\) ]]; then
-    dirs=( $^_manpath/(sman|man|cat)${~sect%%[^0-9]#}/ )
+    dirs=( $^_manpath/(sman|man|cat)($sect|${sect%%[^0-9]#})/ )
     awk="\$2 == \"$sect\" {print \$1}"
   else
     dirs=( $^_manpath/(sman|man|cat)*/ )


             reply	other threads:[~2016-05-19  5:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19  5:07 Matthew Martin [this message]
2016-05-19 21:14 ` Daniel Shahaf
2016-07-31 16:23 ` Daniel Shahaf

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=20160519050725.GD94229@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).