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

Re: scratchpad text



On 26 October 2010 19:43, Eric Smith <es@xxxxxxxxxxxx> wrote:
>> How about:
>>
>>     zle-line-init() {
>>       print -nR $terminfo[sc]$terminfo[home]"$REMINDER"$terminfo[rc]
>>     }
>>     zle -N zle-line-init
>>
>> Then anything stored in the shell parameter REMINDER will be shown at
>> the top left of the screen.  Of course it'll begin to scroll off if you
>> have a multi-line command.
>
> Nice, I like.
> I tried to have a multi-line display (as you pre-empted).
> And using ^M as the newline car.
> But the second line actually overprints the first line.

^M is carriage return, ie go to beginning of line. Try echo hello^V^My
for example. If you want to enter literal newlines somewhere, try
^V^J.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author