Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] _man: Support directories with suffixes
- X-seq: zsh-workers 38516
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] _man: Support directories with suffixes
- Date: Thu, 19 May 2016 00:07:25 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=peOCDrzAtQO23hU/cO3zGuljsDCP1ludyQFouvtfOA8=; b=bzStBZ5EfYkPsJApkGvvTkfnrlp6l5TTGoQPOROz1L+HPQ26GovfoCvFuoGvxhuL1a wtl3o4L/pa3DC2r+WflGrwqnp2tiGFFko7Z5s327nogBUSBaDTtVNIAnaTLoRFOY/xMc s1uxLXzBXfVofzRxo1UZFX1MG6ZpC9hB2083pQLeRvXdkNN2/d1xisMQgBcYu2RuZbe0 m2CQF3Pc4iPUFVpApU8NKBsvnA/DdVHhdek9d5rAWJ2fxHDeXZa7ny/nB9LYNvvyLImO L+N5NZ5TTInUWxjP6GQ/b7V9fcQGzMToUYY6i8yzcmIJ2gLkY64CDiq5wCZUmBdu3EBV uC9Q==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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)*/ )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author