zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Evgeny Zajcev <lg.zevlg@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Calling interactive command inside widget
Date: Wed, 20 Apr 2016 10:44:11 +0200	[thread overview]
Message-ID: <CAKc7PVDW1GWOjNm1rgbw=4yznRNZwCFyd3A3hH1E72XYqTBWTg@mail.gmail.com> (raw)
In-Reply-To: <CAO=W_Zqi0zSqMbDODTwFBs1tb_i2j=BJvSpk0S8xKbdqOR8Qfg@mail.gmail.com>

It's about having terminal attached to 0. I wrote a wrapper that runs
given interactive command from within Zle:

https://github.com/psprint/zsh-navigation-tools/blob/master/znt-usetty-wrapper

It's to be used in following way:

znt-usetty-wrapper some-interactive-command "$@"

via some widget file-function, like here:

https://github.com/psprint/zsh-navigation-tools/blob/master/znt-kill-widget

This looks quite like an overkill when compared to Bart's simple
</dev/tty, but it does some checking and searches for terminal also
via 2. Also, it restores previous 0 state. Maybe you'll like it

Best regards,
Sebastian Gniazdowski


      parent reply	other threads:[~2016-04-20  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 21:58 Evgeny Zajcev
2016-04-13  8:41 ` Peter Stephenson
2016-04-13 17:55   ` Bart Schaefer
2016-04-16  8:21 ` frederik
2016-04-20  8:44 ` Sebastian Gniazdowski [this message]

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='CAKc7PVDW1GWOjNm1rgbw=4yznRNZwCFyd3A3hH1E72XYqTBWTg@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=lg.zevlg@gmail.com \
    --cc=zsh-users@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).