Bug 248372 - [PATCH] script(1): enable proper curses playback [-p] capability
Summary: [PATCH] script(1): enable proper curses playback [-p] capability
Status: Closed DUPLICATE of bug 248377
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2020-07-30 19:33 UTC by SOUMENDRA GANGULY
Modified: 2020-07-31 05:56 UTC (History)
0 users

See Also:

script.diff (2.39 KB, patch)
2020-07-30 19:33 UTC, SOUMENDRA GANGULY
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SOUMENDRA GANGULY 2020-07-30 19:33:51 UTC
Created attachment 216889 [details]

The current manpage of script(1) says

"Certain interactive commands, such as vi(1), create garbage in the type-
script file.  The script utility works best with commands that do not ma-
nipulate the screen.  The results are meant to emulate a hardcopy termi-
nal, not an addressable one."

This patch fixes this issue by appropriately calling cfmakeraw.

Additional note: script(1) is currently able to record [-r] curses sessions perfectly; only the playback functionality [-p] needs to be fixed. To reproduce the problem, one may use the following program.

https://github.com/iiSeymour/game-of-life by GitHub user iiSeymour, which, 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."

This script was written for Linux; therefore, one must call "python gol.py" on FreeBSD to bypass the #!
Comment 1 SOUMENDRA GANGULY 2020-07-31 04:27:56 UTC
Additional notes:

. This patch is a duplicate of that submitted by me as a part of https://github.com/freebsd/freebsd/pull/433. This was done to maximize the chances of getting noticed. If this patch on Bugzilla is accepted, I will close the GitHub pull request, and vice versa.

. I submitted a similar patch for "scriptreplay(1)" from util-linux; it has now been merged by the maintainer of the project.
Comment 2 SOUMENDRA GANGULY 2020-07-31 05:56:24 UTC

*** This bug has been marked as a duplicate of bug 248377 ***