How to make zsh pass the manual section to the man command when the `separate-sections` style is set?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
When asking for a completion by pressing Tab on the zsh command line, the matches can be grouped according to their tag provided that the group-name
style is set to an empty string:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
In the case of the $ man
command, the matches can be divided further if the separate-sections
style is set to true
for the manuals
tag:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
zstyle ':completion:*:manuals' separate-sections true
As a result, if I press Tab after $ man write
, the completion system suggests these matches:
$ man write
manual page, section 1 (general commands)
write
manual page, section 2 (system calls)
write writev
And if I select the write
match in the first list, $ man
opens the write
page in the first section of the manual.
But if I select the write
match in the second list, $ man
still opens the write
page in the first section, while the description of the list mentions the second section of the manual.
Is it possible to make zsh pass the relevant manual section to the man command when the separate-sections
style is set?
I'm using zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
.
zsh
add a comment |Â
up vote
0
down vote
favorite
When asking for a completion by pressing Tab on the zsh command line, the matches can be grouped according to their tag provided that the group-name
style is set to an empty string:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
In the case of the $ man
command, the matches can be divided further if the separate-sections
style is set to true
for the manuals
tag:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
zstyle ':completion:*:manuals' separate-sections true
As a result, if I press Tab after $ man write
, the completion system suggests these matches:
$ man write
manual page, section 1 (general commands)
write
manual page, section 2 (system calls)
write writev
And if I select the write
match in the first list, $ man
opens the write
page in the first section of the manual.
But if I select the write
match in the second list, $ man
still opens the write
page in the first section, while the description of the list mentions the second section of the manual.
Is it possible to make zsh pass the relevant manual section to the man command when the separate-sections
style is set?
I'm using zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
.
zsh
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When asking for a completion by pressing Tab on the zsh command line, the matches can be grouped according to their tag provided that the group-name
style is set to an empty string:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
In the case of the $ man
command, the matches can be divided further if the separate-sections
style is set to true
for the manuals
tag:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
zstyle ':completion:*:manuals' separate-sections true
As a result, if I press Tab after $ man write
, the completion system suggests these matches:
$ man write
manual page, section 1 (general commands)
write
manual page, section 2 (system calls)
write writev
And if I select the write
match in the first list, $ man
opens the write
page in the first section of the manual.
But if I select the write
match in the second list, $ man
still opens the write
page in the first section, while the description of the list mentions the second section of the manual.
Is it possible to make zsh pass the relevant manual section to the man command when the separate-sections
style is set?
I'm using zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
.
zsh
When asking for a completion by pressing Tab on the zsh command line, the matches can be grouped according to their tag provided that the group-name
style is set to an empty string:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
In the case of the $ man
command, the matches can be divided further if the separate-sections
style is set to true
for the manuals
tag:
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*:descriptions' format '%d'
zstyle ':completion:*:manuals' separate-sections true
As a result, if I press Tab after $ man write
, the completion system suggests these matches:
$ man write
manual page, section 1 (general commands)
write
manual page, section 2 (system calls)
write writev
And if I select the write
match in the first list, $ man
opens the write
page in the first section of the manual.
But if I select the write
match in the second list, $ man
still opens the write
page in the first section, while the description of the list mentions the second section of the manual.
Is it possible to make zsh pass the relevant manual section to the man command when the separate-sections
style is set?
I'm using zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)
.
zsh
zsh
asked 3 mins ago
user938271
17917
17917
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477656%2fhow-to-make-zsh-pass-the-manual-section-to-the-man-command-when-the-separate-se%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password