Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Could multios response positively to isatty(1) test?
- X-seq: zsh-workers 44051
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: Could multios response positively to isatty(1) test?
- Date: Thu, 7 Feb 2019 15:02:48 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190207150251euoutp01d83e24c8f14131a606b1d7386e9ab3b3~BHSBJImmb2805228052euoutp01b
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549551771; bh=km3EwyznYsLQDZrZAGc3/ho4sImm73BKgLSjOO23Qzk=; h=Subject:From:To:Date:In-Reply-To:References:From; b=NwXg6WNp/xh5gf4nJBQzmTPQ62rwgzFFXTD5RA04jtPDMutbJGeg0Z+sCeEKU9wSd fv9Q5v5fm6U1nOFRjI28yGYsgUzf140X4OmgYz8tzqukrNLEE60Hatg3W7ckj47mjH iJ9gWGXj5j47SqJTtctN5NywbAygvqTUagqXy86I=
- In-reply-to: <CAKc7PVAdyyvBAmpMHpiBt4=_C9aMnGz88Fy1h1OYhAdNOX5qOQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190207132020epcas2p21907126ab733665c20d5881eb13488ef@epcas2p2.samsung.com> <CAKc7PVAdyyvBAmpMHpiBt4=_C9aMnGz88Fy1h1OYhAdNOX5qOQ@mail.gmail.com>
On Thu, 2019-02-07 at 14:18 +0100, Sebastian Gniazdowski wrote:
> Hello,
> If at least one of the outputs of the multios-utilizing invocation is
> to a terminal, .e.g
>
> print "$fg[blue]A TEST$reset_color" \
> > >(ansifilter >>! "log.txt") 1> >/dev/tty
>
> then could Zshell answer positively to the isatty(1) test for the
> application (like e.g. vim) placed the way that the print-command is?
> Is this doable?
The short answer's no. Implementing pty support in the core shell would
be a bug-prone maintenance disaster.
You're best bet is some kind of pty wrapper (as already discussed) plus
something looking a bit like tee. This is not stuff you want within zsh
(unless as an add-on --- but zpty is bad enough to maintain, so I wouldn't
recommend even that).
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author