This should be easy, right?In zsh for instance, you could put this in your .zshrc:reset_widget() tput resetzle -N reset_widgetbindkey ^L reset_widgetHowever, this resets the terminal, but requires you hit the enter key to reshow the prompt.Changing the command to echo -ne '\n' | tput reset has no effect either.Is there a way to reset the terminal using a keyboard shortcut, without having to hit the enter key afterwards to show the prompt?
reset terminal via keyboard shortcut (without the enter key)
shell;terminal;zsh
thrig isn't seeing this because the act of resetting xyr terminal is causing a WINCH signal or some such, which causes ZLE to redisplay the prompt(s).  It does on the terminal that I am currently typing at, too.  The terminal reset string emitted by tput reset includes the DECCOLM control sequence.  This resets the terminal, from the 100 column mode that I have put it in, back to 80 column mode.  The first time around, this does cause a WINCH signal because the terminal gets resized.  The second time around it changes from 80 columns to 80 columns, which doesn't cause a WINCH.  So I only see thrig's behaviour once on my terminal.You aren't seeing this because that doesn't happen with your terminal and you've omitted telling ZLE that it needs to redisplay the prompt(s) as part of the widget: reset_widget() { tput reset; builtin zle .redisplay; }