From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Mark descriptor as terminal for the -t test
Date: Fri, 3 Jun 2016 11:33:54 -0700 [thread overview]
Message-ID: <160603113354.ZM24367@torch.brasslantern.com> (raw)
In-Reply-To: <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
} level.
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.
prev parent reply other threads:[~2016-06-03 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 8:18 Sebastian Gniazdowski
2016-06-02 4:45 ` Bart Schaefer
2016-06-03 16:30 ` Sebastian Gniazdowski
2016-06-03 18:33 ` Bart Schaefer [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=160603113354.ZM24367@torch.brasslantern.com \
--to=schaefer@brasslantern.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).