Bug 276278 - shells/bash: terminfo is not auto installed or suggested with bash, will cause some features to not work
Summary: shells/bash: terminfo is not auto installed or suggested with bash, will caus...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-12 16:14 UTC by hym2209268914
Modified: 2024-01-14 00:24 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hym2209268914 2024-01-12 16:14:33 UTC
On a new freebsd-14.0-RELEASE install, the first i do is installing bash, only to find out the the "clear-display" readline command not being able to also clear the scrollback.

I had to build it again with debug info and attach lldb to find that terminfo was the culprit.

Maybe we should add a line in port note saying that without terminfo installed some features will be missing?
Comment 1 Emanuel Haupt freebsd_committer freebsd_triage 2024-01-13 10:45:12 UTC
My test procedure involves the following steps:

$ jot 3
$ [pressed CTRL-L invoking clear-display]

As far as I know, this issue usually occurs when the TERM environment variable is not defined. However, in this case, installing the terminfo-db does not seem to help either.

Could you show me how you're conducting your tests?
Comment 2 hym2209268914 2024-01-14 00:23:20 UTC
Sorry i had a typo. I meant the "clear-screen" readline binding. It should output "^[[H^[[2J^[[3J" which creates a new blank page and clears the scrollback, much like the cmd+K in Terminal.app on macOS.

My problem is with the PuTTY which supports this escape sequence, and did properly set TERM=xterm, but bash just refuses to do so until installing terminfo from ports.
Comment 3 hym2209268914 2024-01-14 00:24:52 UTC
"clear-screen" should be bound to meta(alt/option)+ctrl+l by default.