Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Calling interactive command inside widget
- X-seq: zsh-users 21462
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Evgeny Zajcev <lg.zevlg@xxxxxxxxx>
- Subject: Re: Calling interactive command inside widget
- Date: Wed, 20 Apr 2016 10:44:11 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kBlz1maaj6vebjqzwRkaYm+uLEjWVG1I1BDZftdC0eo=; b=YnKHv0F7AzgY48h4PSeTSfFnTMc8lZbdof82Hs1c8N8AHTZ1qqOSNrBxWeuVlFJ7gX 31GJQJeF6WbM07Z9Yl6ve6OOUDIPsmIqH6N4ZooIsOmiA1n2dqE55aWeFi8etkz+0NEC q05/mnQXB08un3EkwauVUfUgb417xwpH8GVsNFvtjwlwt8YHKNZHm4szsRC/++r6qnBc 2CzJCI1AyplWvQdWaG/MaLe6sFF7Razt9N+VSx5G/i1IcPBdwnH7LxuesTfU2dHXKt5Z +yleCP96Whe+TgbucuWRXOX57hF+6mePkeJv2W9OUkjcAMGQqHg/pQDwjTOLe/+JU1T1 Rtmw==
- In-reply-to: <CAO=W_Zqi0zSqMbDODTwFBs1tb_i2j=BJvSpk0S8xKbdqOR8Qfg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author