Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh: bad option, bash works
- X-seq: zsh-users 16653
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Cameron Simpson <cs@xxxxxxxxxx>
- Subject: Re: zsh: bad option, bash works
- Date: Mon, 19 Dec 2011 22:54:20 -0500
- Cc: Rich Boyce <rich@xxxxxxxxx>, Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201107; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=CjzQOcTDlUAeegtzrVMed96upb0ZlOzHLChJXMA/TPs=; b=hc6Ne1Ptbbrs2IhZHfVYFLgWm1ekFWER/Sy45U9cqbD7hk2Azt9dR/My3/6GCmSQjhN3Jf39gBoVUGUZ5T/pCQaXKVQmefkXpiUy3hOW16ZHYoI+sbwpFnaQNmlYNBq0vrCNzUpyMR69D+XP2UmAgFYgAlbh6o51cdGDZ759Yj8=;
- In-reply-to: <20111220004651.GA2311@cskk.homeip.net>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: Cameron Simpson <cs@xxxxxxxxxx>, Rich Boyce <rich@xxxxxxxxx>, Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4EEF2F30.7090404@ebi.ac.uk> <20111220004651.GA2311@cskk.homeip.net>
On 2011-12-20 at 11:46 +1100, Cameron Simpson wrote:
> Better, maybe, would be a "help" builtin for bash, zsh etc that
> documented builtins and other topics, and offered to divert to "man"
> as well (or on no hit).
>
> Hmm. I see "bash" has a help comment. Zsh doesn't.
zsh uses the run-help function and ZLE widget, and you can choose to
create per-builtin files at install time, or do so later and repoint
$HELPDIR to somewhere appropriate.
By default, with Emacs key-bindings, run-help is bound to Esc-H.
The RPM .spec I use at $work for building zsh does this:
----------------------------8< cut here >8------------------------------
# HELPDIR support
helpfiles=$PWD/Util/helpfiles
pushd $RPM_BUILD_ROOT%_datadir/zsh/%srcversion && {
mkdir help && cd help && \
man -M $RPM_BUILD_ROOT%_mandir zshbuiltins | colcrt - | perl $helpfiles
popd
}
----------------------------8< cut here >8------------------------------
So I enter "type anything at all" at a command-prompt, enter Esc-H, get
the relevant documentation from the man-page, and *only* the relevant
documentation, for the word in the command position and when I quit the
text viewer, my command-line is still there waiting for me.
If you want:
alias help=run-help
and you then have the help command you want.
I don't know why the HELPDIR content isn't generated by default in the
build-process, unless it's the Perl dependency.
--
https://twitter.com/syscomet
Messages sorted by:
Reverse Date,
Date,
Thread,
Author