Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: (maybe) negative ranges
- X-seq: zsh-workers 36723
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: PATCH: (maybe) negative ranges
- Date: Wed, 30 Sep 2015 19:26:31 +0200
- Cc: "Zsh Hackers' List" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7BV+SRSnhblfcw6/nVCl3jrfNSjn1tWInHdE+kx7v8I=; b=Uiip5uUiILpc7CFjIdmf/CBKgJitN9NvhZLzqGCcch3XbYPqC75+dAq3gR8lSDL8at 2YatLTE1A2Bu3dqbsCYuawYH91L5tYzIPxtVpct00MK2yi3hV1swhIngESnTLM18v3Ft jWrzAmT70Of1VbUyhT/wS0siQY/xYxz6EU+MO8PAq+dKVjmHta/muYNFu8/Au87ZCu7n ok48CNVm8uNIDhtJRc6S0yirBUg80Plij1DcHmZBF7QqejbIDVdxYGLM20GmV0fBxPZO 0UCLjNJ3mI7NCGMcBvvuj/nvh6y/caJfJP7sqgKsva2y/atcXogqtBsDUdY6blAhIOcL uZJA==
- In-reply-to: <20150930175124.00560d22@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150930175124.00560d22@pwslap01u.europe.root.pri>
On Wed, Sep 30, 2015 at 6:51 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> I'd like to be able to ignore ^ at the start of a git range
> specification to support things like
>
> git log r1 ^r2
Can't say anything helpful about the completion, but you may find this helpful,
function _self_insert_git() {
if [[ $BUFFER = (git(-| )|gitk |qgit )* ]]; then
if [[ ! $LBUFFER[-1] = '\' && $LBUFFER != *\ --\ * ]]; then
LBUFFER+='\'
fi
fi
zle self-insert
}
zle -N self-insert-git _self_insert_git
bindkey '^' self-insert-git
bindkey -M isearch '^' self-insert
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author