[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/55529: [PATCH] script(1): Enable proper playback [-p] of curses sessions
>Synopsis: [PATCH] script(1): Enable proper playback [-p] of curses sessions
>Arrival-Date: Sat Aug 01 07:25:00 +0000 2020
>Originator: Soumendra Ganguly
Texas A&M University
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
The current manpage of script(1) says the following.
"Certain interactive commands, such as vi(1), create garbage in the typescript file. The script utility works best with commands that do not manipulate the screen. The results are meant to emulate a hardcopy terminal."
script(1) is currently able to record [-r] curses sessions perfectly; only the playback functionality [-p] has the above limitation when the terminal is not in raw mode; this patch removes this restriction by appropriately setting terminal attributes.
. I submitted a similar patch for "scriptreplay(1)" from util-linux; it has now been merged by the maintainer of the project.
. I recently submitted a similar patch for FreeBSD script(1): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248377
. The patch is in the form of a GitHub pull request: https://github.com/NetBSD/src/pull/14
To reproduce the problem, run in a terminal that is not in raw mode. I used https://github.com/iiSeymour/game-of-life to reproduce the problem; authored by GitHub user iiSeymour, this, in the words of the author, is "a python implementation of Conway's Game of Life using the curses module with a small evolutionary twist"; it was written for Linux; therefore, one must call "python gol.py" on NetBSD to bypass the "#!".
I created this GitHub pull request which contains the fix: https://github.com/NetBSD/src/pull/14
Main Index |
Thread Index |