Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle clear-screen, exit status
- X-seq: zsh-users 15460
- From: JÃrÃmie Roquet <arkanosis@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: zle clear-screen, exit status
- Date: Tue, 19 Oct 2010 18:11:22 +0200
- Cc: Brian Lewis <brian@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=9aHztyCpwjWCpdHmUBurCfbjtUGwTTeBiO6mPZZi2fw=; b=up8j0Vi9ZqH3qbLNY+tG+AI14ntlsSOtKoj2Jkuk+LExzseWB/Uu0hoPzfWaNvV9a7 G6xIADFTb6yLp+I1yhHXxM0BVBCO2ETkvh+fC44suURpcju/InINGAcxBu7dLSWGFdC3 HPCjIlzgUVJUWJ9pQai85A+OuRNejGeOI0D2s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uTKZ6J3Np0sJOb2/VFpVr9GdOgEzNXxirNbcCHqyvtf0cRtcuYUGSblTFuGyHh9PcM 9wxUug+Cqwea+rMLV94eIjhRQi0Jt36JT/UhGrXz6uuahETw+T8eNVNE+jfQMjNTIPTy 8Mqzt+If5EY+UKIS2l6yfpho6JPVMe8uLqMS4=
- In-reply-to: <20101019155310.GE2149@xxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20101019153258.GD2149@xxxxxxxxxxxxxxx> <AANLkTinvgTGC7+dKKCR17vzmCxufy7zPDeaL=oFOzZj+@xxxxxxxxxxxxxx> <20101019155310.GE2149@xxxxxxxxxxxxxxx>
2010/10/19 Brian Lewis <brian@xxxxxxxx>:
> On Tuesday, 19.10.10 at 17:47, JÃrÃmie Roquet wrote:
>> bindkey -s "^L" "clear\n"
>> is enough :)
>
> That's not quite as good as zle clear-screen:
>
> $ asdf^Lclear
> zsh: command not found: asdfclear
>
> Also, if I were to do
> BUFFER='clear'
> zle accept-line
>
> it would reset $?, but it destroys the line I was editing when I hit
> Ctrl-L.
Oh right :s
Then I don't know if there is a way to do it from a zle widgetâ but:
I have this in my conf:
bindkey '^[p' push-input
It allows me to clear the command line with ctrl+p, type a command,
and restore the cleared command line when validating.
Then I just have to add:
bindkey -s "^L" "^[pclear\n"
And now it doesn't destroy anything. Well, actually, it does destroy
the pushed line.
Of course, it's not a very elegant solution.
Best regards,
--
JÃrÃmie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author