Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Better Help Docs Searching?
- X-seq: zsh-users 26826
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Better Help Docs Searching?
- Date: Sun, 1 Aug 2021 13:01:13 +0200
- Archived-at: <https://zsh.org/users/26826>
- In-reply-to: <CAMP9c5m=oOwSvEaqVF62GF0=BjjMnS8fBEmbcWz9ydxqx=tvZQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5m=oOwSvEaqVF62GF0=BjjMnS8fBEmbcWz9ydxqx=tvZQ@mail.gmail.com>
On Sun, Aug 1, 2021 at 12:46 PM Zach Riggle <zachriggle@xxxxxxxxx> wrote:
>
> All of that said, is there any way to easily find keywords / flags in
> either the online docs OR the man pages -- rather than having way too
> many matches for other things that mention the same word (e.g. "read"
> as mentioned above).
There might be better ways but here's how I do it.
I have this in my ~/.zshrc:
autoload -Uz run-help
unalias run-help
This allows me to type "read" in an interactive shell and press Alt+h
(aka ESC h) to open the help file for the read builtin.
Sometimes this doesn't work (for example, try it with "bindkey"). In
this case I would run `man zshall` (one page to rule them all) and
search for " read" -- note a bunch of spaces in front. If this
query has too many hits, I would use "^ {4,}read\b". I use the same
trick when searching for the description of flags in man pages. For
example, to find the description of "-z" in `man rsync`, I would first
search for " -z" because it's easy to type and then for the more
specific "^ {4,}-z\b" in case I get too many hits.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author