Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle reset-prompt
- X-seq: zsh-users 15216
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: zle reset-prompt
- Date: Sat, 31 Jul 2010 20:34:56 +0200
- Cc: Simon Friedberger <simon+zsh@xxxxxxxxxx>, zsh-users@xxxxxxx
- In-reply-to: <20100731184704.7bbd8a64@pws-pc> (Peter Stephenson's message of "Sat, 31 Jul 2010 18:47:04 +0100")
- 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: <20100728201536.GA1146@xxxxxxxxxx> <20100729100452.53f1cc15@xxxxxxx> <20100730135510.GB4728@xxxxxxxxxx> <20100730140827.GC4728@xxxxxxxxxx> <20100731184704.7bbd8a64@pws-pc>
Peter Stephenson wrote:
> On Fri, 30 Jul 2010 16:08:28 +0200
> Simon Friedberger <simon+zsh@xxxxxxxxxx> wrote:
>> OK, so I tried a couple of possible calls with ESC x and the functions
>> in my prompt config.
>> It seems that zle-keymap-select might be the perpetrator.
>> Does that make any more sense?
>
> Not so far as I can see... I've run "bindkey -v", defined
>
> zle-keymap-select() { print Status $?; }
> zle -N zle-keymap-select
>
> the run "false", and when I hit ESC and i in turn I get "Status 1"
> repeatedly. If I've understood your problem, you're saying this would
> give "Status 0" at some point.
Yeah, it doesn't mess with `$?'.
But here's something I'm finding odd. Consider this setup from "zsh -f":
[snip]
bindkey -e
PS1='%? %% '
precmd() { true }
cs () {
zle clear-screen
zle reset-prompt
}
zle -N cs
bindkey '^l' cs
[snap]
Then this:
0 % false
1 % (hit ^l here)
[..screen is cleared..]
0 % echo $?
1
0 %
I thought `reset-prompt' alone was enough, but it's not. Also, this only
happens, when `clear-screen' and `reset-prompt are used in a single
widget. If called separately, this doesn't happen either.
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author