From: Frank Terbeck <ft@bewatermyfriend.org>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Simon Friedberger <simon+zsh@a-oben.org>, zsh-users@zsh.org
Subject: Re: zle reset-prompt
Date: Sat, 31 Jul 2010 20:34:56 +0200 [thread overview]
Message-ID: <87y6crfqjz.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <20100731184704.7bbd8a64@pws-pc> (Peter Stephenson's message of "Sat, 31 Jul 2010 18:47:04 +0100")
Peter Stephenson wrote:
> On Fri, 30 Jul 2010 16:08:28 +0200
> Simon Friedberger <simon+zsh@a-oben.org> 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
next prev parent reply other threads:[~2010-07-31 18:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 20:15 Simon Friedberger
2010-07-29 9:04 ` Peter Stephenson
2010-07-30 13:55 ` Simon Friedberger
2010-07-30 14:08 ` Simon Friedberger
2010-07-31 17:47 ` Peter Stephenson
2010-07-31 18:34 ` Frank Terbeck [this message]
2010-07-31 19:30 ` Peter Stephenson
2010-07-31 20:16 ` Frank Terbeck
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=87y6crfqjz.fsf@ft.bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=p.w.stephenson@ntlworld.com \
--cc=simon+zsh@a-oben.org \
--cc=zsh-users@zsh.org \
/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).