Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for man
- X-seq: zsh-users 10424
- From: Frank Terbeck <frank.terbeck@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion for man
- Date: Sat, 24 Jun 2006 01:51:33 +0200
- In-reply-to: <20060623231954.GA30718@xxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.16.16 i686
- References: <20060623231954.GA30718@xxxxxxxxx>
Andy Spiegl <zsh.Andy@xxxxxxxxx>:
> Recently I heard/read that there is a new wonderful completion function for
> man with support sections. But my zsh (v4.3.2) doesn't do it and always
> just completes the command names:
>
> condor:~>man <TAB>
> zsh: do you wish to see all 13618 possibilities (6810 lines)?
>
> condor:~>man 8 <TAB>
> zsh: do you wish to see all 13618 possibilities (6810 lines)?
>
> Is there maybe some configuration option I have to set?
Hi Andy,
Starting from 'zsh -f' you need the following:
[snip]
zmodload zsh/complist
autoload -U compinit && compinit
zstyle ':completion:*' menu select
zstyle ':completion:*:*:man:*' menu yes
zstyle ':completion:*' group-name ''
zstyle ':completion:*:manuals' separate-sections true
zstyle ':completion:*:manuals.*' insert-sections true
zstyle ':completion:*:descriptions' format "- %d -"
[snap]
You can even do:
zstyle ':completion:*:manuals.(^1*)' insert-sections true
...to add the section number for all sections but section number one.
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author