Skip to main content
2 of 3
added 10 characters in body

Write warning while typing in zsh prompt

I know that it is possible to display text "outside" of the zsh prompt where you are typing. Common example is completions:

myhost Wed 8 10:06 ~/sandlot $ e .py█ 

Press Tab, et voilá:

myhost Wed 8 10:06 ~/sandlot $ e .py█ -- file -- lenum.py lexample.py otherticks.py 

What interests me is the text from --file-- below. Is there some kind of "zsh_echo_below_zle" or something. I don't mind about about keyboard or shortcuts, since my intention is to run and use the output in zle. S.a.

myhost Wed 8 10:06 ~/sandlot $ some_command $(some_command_with_warning)█ 

Press Tab, and

myhost Wed 8 10:06 ~/sandlot $ some_command some_output█ -- warning: some_output is about yadda yadda yadada --