From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23767 invoked by alias); 20 Dec 2011 04:11:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16653 Received: (qmail 18747 invoked from network); 20 Dec 2011 04:11:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) 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=; Date: Mon, 19 Dec 2011 22:54:20 -0500 From: Phil Pennock To: Cameron Simpson Cc: Rich Boyce , Community support for Fedora users , zsh-users@zsh.org Subject: Re: zsh: bad option, bash works Message-ID: <20111220035420.GA38973@redoubt.spodhuis.org> Mail-Followup-To: Cameron Simpson , Rich Boyce , Community support for Fedora users , zsh-users@zsh.org References: <4EEF2F30.7090404@ebi.ac.uk> <20111220004651.GA2311@cskk.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <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