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

Re: Keybindings lost in Xterm after top exits



On 7 June 2012 06:19, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jun 6,  1:45pm, Edgar Merino wrote:
> }
> } I would like to wrap top within a function, however I don't know how to
> } set the mode back to normal mode from a script, can you point me to any
> } source where I could investigate on how to this?
>
> It should work to do this:
>
>    zmodload zsh/terminfo
>    top() {
>      command top "$@"
>      print -r "${terminfo[rmkx]}"
>    }

You probably want to either add -n to the prints, or just use echoti
rmkx instead. (echotc for the $termcap ones).

-- 
Mikael Magnusson



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