zsh-workers
 help / color / mirror / code / Atom feed
From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: zsh-workers@zsh.org
Subject: Re: run-help as a widget
Date: Fri, 18 Dec 2009 16:59:27 +0000 (UTC)	[thread overview]
Message-ID: <slrnhind7f.246.joerg@alea.gnuu.de> (raw)
In-Reply-To: <20091216115900.45764c25@news01>

Hallo Peter,

Peter Stephenson <pws@csr.com> wrote:
> On Mon,  7 Dec 2009 01:57:10 +0100
> Jörg Sommer <joerg@alea.gnuu.de> wrote:
>> I know, this solution is a dirty hack, but it's quick. The better way is
>> to fix zsh to call run-help with the whole commandline where the alias
>> gets expanded and this commandline gets passed to the second run-help
>> call.
>
> I've been using this for a while, it's perhaps time something along these
> lines got included in Functions/Zle.  I was a bit surprised to find I
> hadn't.
>
> With this it would be worth upgrading run-help and helpers to check if
> there's already a full command line there, and to advance past precommand
> modifiers.  I thought I'd done some of this, too, but maybe not...
> I might simply have been thinking of expansion of aliases.
>
> By the way, note this quotes all buffer words:
>
>   ls foo; rm -rf ~<Esc>h
>
> is safe even if it may not do quite what you actually want, which is quite
> hard to guess.

Isn't it possible to get the position where <Esc>h was hit or the prefix
and the suffix of the command? I would like to get help for true in this
situation:

% for h in $hosts; do ssh $h true<Esc>h; done

Bye, Jörg.
-- 
Die am Lautesten reden, haben stets am wenigsten zu sagen.


  parent reply	other threads:[~2009-12-18 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  0:57 [PATCH] run-help: ugly workaround for run-help-$X with alias for $X Jörg Sommer
2009-12-10  9:49 ` Peter Stephenson
2009-12-16 11:59 ` run-help as a widget Peter Stephenson
2009-12-16 17:14   ` Greg Klanderman
2009-12-18 16:59   ` Jörg Sommer [this message]
2009-12-18 23:28     ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnhind7f.246.joerg@alea.gnuu.de \
    --to=joerg@alea.gnuu.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).