From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6398 invoked by alias); 20 Dec 2011 12:13:37 -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: 16654 Received: (qmail 9188 invoked from network); 20 Dec 2011 12:13:36 -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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at ebi.ac.uk designates 193.62.195.234 as permitted sender) Message-ID: <4EF0797F.8070009@ebi.ac.uk> Date: Tue, 20 Dec 2011 12:03:11 +0000 From: Rich Boyce User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Cameron Simpson , Community support for Fedora users , zsh-users@zsh.org Subject: Re: zsh: bad option, bash works References: <4EEF2F30.7090404@ebi.ac.uk> <20111220004651.GA2311@cskk.homeip.net> <20111220035420.GA38973@redoubt.spodhuis.org> In-Reply-To: <20111220035420.GA38973@redoubt.spodhuis.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 20/12/11 03:54, Phil Pennock wrote: > 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. That's a nice fix. With stock zsh, I of course get the BASH_BUILTINS man page. This seems like a bug to me, so I've filed one: https://bugzilla.redhat.com/show_bug.cgi?id=769264 Feel free to add your code as a suggested fix. Rich