]> git.ipfire.org Git - thirdparty/util-linux.git/commit
script: add more info to script header
authorKarel Zak <kzak@redhat.com>
Mon, 14 May 2018 10:51:50 +0000 (12:51 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 14 May 2018 10:51:50 +0000 (12:51 +0200)
commit4d9b788d64c8f9de8cb28e541d53676f26386f3a
treee9788854cb6ff305b0a80657542fe790f763b299
parentc068922a68f7c8965511df8cdc378138f46d7011
script: add more info to script header

This patch introduces [...] to store extra information about terminal
to the typescript header. For example:

  Script started on 2018-05-14 12:52:32+02:00 [TERM="xterm-256color" TTY="/dev/pts/3" COLS="190" LINES="53"]

or

  Script started on 2018-05-14 12:54:01+02:00 [<not executed on terminal>]

if stdout is not terminal.

Addresses: https://github.com/karelzak/util-linux/issues/583
Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/TODO
include/ttyutils.h
lib/ttyutils.c
term-utils/script.c