Zsh Mailing List Archive
Messages sorted by:
Re: Mark descriptor as terminal for the -t test
- X-seq: zsh-users 21608
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Mark descriptor as terminal for the -t test
- Date: Fri, 3 Jun 2016 11:33:54 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=7uDpN9EGsBeyTRlJ7QeCgnij2RWSiAwtYb4LoAnhrYo=; b=Y6RIWu6E2uqFPWNk3DknjIkZQ+FY95nLuVoD4YFRPtylJTZ8C4HnnMAVk2bS8Wu8dR Xil/aYdjYYHNfZco7XEEJWEvagzAT34/NOSedhYzMBlNXkhpInpXm0KsZhdKgal6dcb5 WLNqtObTSCXoX0rlHE6C55/6Far0b7FLYspRdcVS/9brj4NMoPRE1US/YfjA/avEPm+r uP+T1UStBfcEAuPGfdPMtVFsN+6VfO1VTDNqewbS3pVf6I4O6Z++CsqytllKFt98nSDc K+BMJWKZyD3k5lADayN7xg9K0nxo1byYkr3g8PcpiImbxSW12aYqWM3eaSK1y457euJX 3H7w==
- In-reply-to: <CAKc7PVA9-ixBoCAwwSY9HFRdRoBJVDtNouB8cQGe6HtMmoHmQg@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVAvHk_DUx=Lid_vKBzFw9B3CSuDu7d8LmtzqV8AtgNcnA@mail.gmail.com> <160601214528.ZM14311@torch.brasslantern.com> <CAKc7PVA9-ixBoCAwwSY9HFRdRoBJVDtNouB8cQGe6HtMmoHmQg@mail.gmail.com>
On Jun 3, 6:30pm, Sebastian Gniazdowski wrote:
} A robust program, the script. Recalls asciinema.
The other way around, really: "script" has been around for decades.
} Turns out the commands are not so confused. Either they assume there
} is no terminal, and strip terminal control codes from output, or
} ignore the fact (e.g. vim) and work well.
The third thing that some programs do is to look harder for a terminal,
e.g. examine all of stdin/out/err with isatty() and direct all I/O to
whichever of them is found to be a terminal. (Recall the discussion of
a few weeks ago regarding descriptors opened for both read and write
even though in practice they are only used for one or the other.)
} to strip control codes, but have no motivation to do so. The dream of
} "reuse output without mouse" is better to be implemented at terminal
Output that is screen-oriented rather than stream-oriented is also not
suitable for re-use anyway, at least not directly.
You might also look at Functions/Zle/keeper for a related idea.
Messages sorted by: