zsh-workers
 help / color / mirror / code / Atom feed
* [patch] _man: Support directories with suffixes
@ 2016-05-19  5:07 Matthew Martin
  2016-05-19 21:14 ` Daniel Shahaf
  2016-07-31 16:23 ` Daniel Shahaf
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Martin @ 2016-05-19  5:07 UTC (permalink / raw)
  To: zsh-workers

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)*/ )


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-31 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19  5:07 [patch] _man: Support directories with suffixes Matthew Martin
2016-05-19 21:14 ` Daniel Shahaf
2016-07-31 16:23 ` Daniel Shahaf

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).