Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: run-help: Support for svn and git
- X-seq: zsh-workers 24333
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: run-help: Support for svn and git
- Date: Mon, 31 Dec 2007 17:26:58 +0000 (UTC)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrnfnfrql.cgh.joerg@xxxxxxxxxxxx> <071230200204.ZM32486@xxxxxxxxxxxxxxxxxxxxxx> <slrnfnhn1q.cgh.joerg@xxxxxxxxxxxx> <071231081914.ZM836@xxxxxxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxx>
Hi,
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Dec 31, 12:10pm, joerg@xxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxx>
Und selbst wenn eure 100000 Zeilen‐Programme noch so oft unter Windows
verwendet werden: mit einem Handwagen fährt man nicht Formel‐1.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author