Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle clear-screen, exit status
- X-seq: zsh-users 15456
- From: Brian Lewis <brian@xxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: zle clear-screen, exit status
- Date: Tue, 19 Oct 2010 11:32:58 -0400
- 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
My prompt displays $?, the program exit status. When I hit Ctrl-L, I'd
like $? to be set to 0 somehow before the prompt is redisplayed.
I can't figure out how to do it. It is as if $? is saved before my
widget is called, and restored after.
Here's what I've been playing with:
# C-l -> clear
clear2 () {
zle clear-screen
}
zle -N clear2
bindkey "^L" clear2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author