[SERVER-4894] Inhibit fancy input stuff under certain TERM variables Created: 07/Feb/12  Updated: 11/Jul/16  Resolved: 08/Feb/12

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Improvement Priority: Trivial - P5
Reporter: Richard Kreuter (Inactive) Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The 2.0 shell doesn't enable linenoise when TERM is set to "dumb", but this feature seems to have gone away in 2.1. Could it be restored?

(Additionally, there are some more terminal types that should inhibit linenoise, such as "emacs". Probably some googling would find a few more well-known types that readline doesn't do fancy stuff on too.)



 Comments   
Comment by Sam Kleinman (Inactive) [ 08/Feb/12 ]

I removed the documentation needed flag because aside from this section, which seems to be up to date, there is little discussion of this part of the server.

Furthermore, based on my reading of this change, the new behavior of the TERM handling is to "do the expected thing more often." If you think we need more documentation of TERM handling/escaping (and we probably,) it might be best to open a DOCS ticket to address that larger concern and link these issues. I'm happy to revise this assessment.

Comment by auto [ 08/Feb/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-4894 bring back linenoise unsupported TERM support

Reinstate the code I had removed that allows the mongo shell to
"play dumb" when TERM is set to "dumb". Input is read from the
terminal with fgets() and no escape sequences are generated. We
accept "dumb", "cons25" and "emacs" as TERM settings to put us in
this mode.
Branch: master
https://github.com/mongodb/mongo/commit/457b57fb2c48ceba3ba15817071a54dde072c412

Generated at Thu Feb 08 03:07:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.