zsh-workers
 help / color / mirror / code / Atom feed
From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: zsh-workers@sunsite.dk
Subject: Re: run-help: Support for svn and git
Date: Mon, 31 Dec 2007 17:26:58 +0000 (UTC)	[thread overview]
Message-ID: <slrnfni9j2.cgh.joerg@alea.gnuu.de> (raw)
In-Reply-To: <071231081914.ZM836@torch.brasslantern.com>

Hi,

Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Dec 31, 12:10pm, joerg@alea.gnuu.de wrote:
> } Subject: Re: run-help: Support for svn and git
> } Is it possible to get the point where run-help was called? Maybe for
> } 
> }   ssh -option <1> host cmd <2>
>
> One could replace the run-help widget itself with something that takes
> the line apart with $LBUFFER and $RBUFFER and analyzes it in more
> detail, and if run-help had been invented after user-defined widgets
> were, it would probably never have been designed the way it is.

Isn't it enough to replace the widget by a shell function and register it
with zle?

> Here's a new patch.

Would you apply it to the repository? Here are the functions for svn, svk
and git:

run-help-svn()
{
    svn help ${${@:#-*}[1]} | ${=PAGER:-/usr/bin/pager}
}

run-help-svk()
{
    svk help ${${@:#-*}[1]} | ${=PAGER:-/usr/bin/pager}
}

run-help-git()
{
    if [ $# -eq 0 ]; then
        man git
    else
        local al
        if al=$(git config --get "alias.$1"); then
            1=${al%% *}
        fi
        man git-$1
    fi
}

Bye, Jörg.
-- 
Diskusion „Pascal vs. Rest der Welt“:
30 Aug 2000 00:13:11 GMT, Adrian Knoth <adi@drcomp.erfurt.thur.de>
Und selbst wenn eure 100000 Zeilen‐Programme noch so oft unter Windows
verwendet werden: mit einem Handwagen fährt man nicht Formel‐1.


  reply	other threads:[~2007-12-31 18:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-30 19:19 Jörg Sommer
2007-12-31  4:02 ` Bart Schaefer
2007-12-31 12:10   ` Jörg Sommer
2007-12-31 16:19     ` Bart Schaefer
2007-12-31 17:26       ` Jörg Sommer [this message]
2007-12-31 21:05         ` Bart Schaefer
2007-12-31 18:24   ` Jörg Sommer
2007-12-31 21:08     ` Bart Schaefer
2008-01-04  0:18       ` Clint Adams
2008-01-04  3:21         ` Bart Schaefer
2008-01-04  4:32           ` Clint Adams
2008-01-05 18:05             ` Bart Schaefer
2008-01-09 19:07               ` Clint Adams
2008-01-13 19:01                 ` Bart Schaefer
2008-01-04 12:13         ` Jörg Sommer

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=slrnfni9j2.cgh.joerg@alea.gnuu.de \
    --to=joerg@alea.gnuu.de \
    --cc=zsh-workers@sunsite.dk \
    /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).