Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zle clear-screen, exit status



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