zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Zsh hackers list <zsh-workers@zsh.org>
Cc: Dave Woodfall <dave@tty1.uk>
Subject: [PATCH] Improve documentation of {insert,separate}-sections
Date: Tue, 14 Apr 2020 21:10:29 -0500	[thread overview]
Message-ID: <057B75B5-4B9B-4694-B500-54038FF8CA42@dana.is> (raw)
In-Reply-To: <FA7C85D3-65A6-4EBC-8ACD-2319F02BE009@dana.is>

Here's the insert-sections documentation i promised in users/24756. Also fixed
some inconsistent formatting and a typo

dana


diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index c2d20ca40..cbee305b6 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1826,6 +1826,24 @@ be unsuccessful until that point.  If the value is any other
 string, menu completion will be started when the string typed by the
 user is longer than the common prefix to the corresponding IDs.
 )
+kindex(insert-sections, completion style)
+item(tt(insert-sections))(
+This style is used with tags of the form `tt(manuals.)var(X)' when
+completing names of manual pages. If set to `true' and the var(X) in the
+tag name matches the section number of the page being completed, the
+section number is inserted along with the page name. For example, given
+
+example(zstyle ':completion:*:manuals.*' insert-sections true)
+
+tt(man ssh_<TAB>) may be completed to tt(man 5 ssh_config).
+
+This is especially useful in conjunction with tt(separate-sections), as
+it ensures that the page requested of tt(man) corresponds to the one
+displayed in the completion listing when there are multiple pages with the
+same name (e.g., tt(printf(1)) and tt(printf(3))).
+
+The default for this style is `false'.
+)
 kindex(insert-tab, completion style)
 item(tt(insert-tab))(
 If this is set to `true', the completion system will
@@ -2445,7 +2463,7 @@ For example,
 example(zstyle ':completion:*' recursive-files '*/zsh/*')
 
 If the current directory is tt(/home/pws/zsh/Src), then
-tt(zle_tr)em(TAB) can be completed to tt(Zle/zle_tricky.c).
+tt(zle_tr<TAB>) can be completed to tt(Zle/zle_tricky.c).
 )
 kindex(regular, completion style)
 item(tt(regular))(
@@ -2502,12 +2520,13 @@ kindex(separate-sections, completion style)
 item(tt(separate-sections))(
 This style is used with the tt(manuals) tag when completing names of
 manual pages.  If it is `true', entries for different sections are
-added separately using tag names of the form `tt(manual.)var(X)',
+added separately using tag names of the form `tt(manuals.)var(X)',
 where var(X) is the section number.  When the tt(group-name) style is
 also in effect, pages from different sections will appear separately.
 This style is also used similarly with the tt(words) style when
 completing words for the dict command. It allows words from different
-dictionary databases to be added separately.
+dictionary databases to be added separately. See also tt(insert-sections).
+
 The default for this style is `false'.
 )
 kindex(show-ambiguity, completion style)


       reply	other threads:[~2020-04-15  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200406002612.GE9554@blackswan.r0t.uk>
     [not found] ` <FA7C85D3-65A6-4EBC-8ACD-2319F02BE009@dana.is>
2020-04-15  2:10   ` dana [this message]
2020-04-15  9:09     ` Dave Woodfall

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=057B75B5-4B9B-4694-B500-54038FF8CA42@dana.is \
    --to=dana@dana.is \
    --cc=dave@tty1.uk \
    --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).