Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TERM=null should be unsupported? #9

Open
DomBlack opened this issue Mar 28, 2017 · 3 comments
Open

TERM=null should be unsupported? #9

DomBlack opened this issue Mar 28, 2017 · 3 comments

Comments

@DomBlack
Copy link

In isUnsupportedTerm I suggest changing it to:

if (term == NULL) return true;

This is mainly because CLion's integrated console does not set TERM and does not work with line noise or cpp-linenoise. Instead of getting the prompt we the following noise, plus the enter key is not picked up - so readline never exits;

screen shot 2017-03-28 at 14 56 07

By making this small change, the CLion console works:

screen shot 2017-03-28 at 14 58 36

@yhirose
Copy link
Owner

yhirose commented Mar 28, 2017

@DomBlack, thanks for the problem report.

Your suggestion looks totally reasonable to me. But If it happens with 'antirez/linenoise' as well, I am tending to leave it as it is, since I would like to keep the cpp-linenoise code as close to the original linenoise as possible.

I just found the stackoverflow article which seems to solve the problem on CLion's side. Does this solution work for you?
http://stackoverflow.com/questions/42263743/how-to-properly-set-environment-variable-term-in-clion

@DomBlack
Copy link
Author

I'm submitted it as a PR (antirez/linenoise#137) for line noise. Hopefully it gets merged as out of the box support would be nice.

If I set the TERM environmental to "dumb" or one of the other unsupported terms, then yes it works. However, let's see if the PR get's accepted.

@LoganDark
Copy link

LoganDark commented Oct 24, 2018

IMHO, I wouldn't use CLion's integrated "console" (run command). I always build first (Command+F9) and then use a/the terminal, because the "console" uses a hijacked textarea (you know, the thing the code editor uses).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants