From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Edgar Merino <donvodka@gmail.com>,
"zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Keybindings lost in Xterm after top exits
Date: Thu, 7 Jun 2012 06:53:39 +0200 [thread overview]
Message-ID: <CAHYJk3RzzXqs5GtEzbGrGKPP-=PpPiaXfk1iDK88HKXpz6ziHA@mail.gmail.com> (raw)
In-Reply-To: <120606211954.ZM7057@torch.brasslantern.com>
On 7 June 2012 06:19, Bart Schaefer <schaefer@brasslantern.com> 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
next prev parent reply other threads:[~2012-06-07 4:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 5:40 Edgar Merino
2012-05-30 14:58 ` Bart Schaefer
2012-06-06 18:45 ` Edgar Merino
2012-06-07 4:19 ` Bart Schaefer
2012-06-07 4:53 ` Mikael Magnusson [this message]
2012-06-07 5:15 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3RzzXqs5GtEzbGrGKPP-=PpPiaXfk1iDK88HKXpz6ziHA@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=donvodka@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).