diff options
author | Karel Zak | 2018-05-14 12:51:50 +0200 |
---|---|---|
committer | Karel Zak | 2018-05-14 12:51:50 +0200 |
commit | 4d9b788d64c8f9de8cb28e541d53676f26386f3a (patch) | |
tree | e9788854cb6ff305b0a80657542fe790f763b299 /include | |
parent | docs: add hint about script (diff) | |
download | kernel-qcow2-util-linux-4d9b788d64c8f9de8cb28e541d53676f26386f3a.tar.gz kernel-qcow2-util-linux-4d9b788d64c8f9de8cb28e541d53676f26386f3a.tar.xz kernel-qcow2-util-linux-4d9b788d64c8f9de8cb28e541d53676f26386f3a.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/ttyutils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h index a9baab34b..b3ed4faf1 100644 --- a/include/ttyutils.h +++ b/include/ttyutils.h @@ -52,6 +52,7 @@ struct chardata { extern int get_terminal_dimension(int *cols, int *lines); extern int get_terminal_width(int default_width); +extern int get_terminal_type(const char **type); extern int get_terminal_name(const char **path, const char **name, const char **number); |