Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Retain color info #8

Open
ericwooley opened this issue Jul 6, 2017 · 2 comments
Open

Retain color info #8

ericwooley opened this issue Jul 6, 2017 · 2 comments

Comments

@ericwooley
Copy link
Owner

ericwooley commented Jul 6, 2017

This may not be doable, because colors are disabled from TTY shells (I think)

But it would be really nice to have.

One option is to multiplex a new terminal, instead of a child process. https://github.com/chjj/blessed#terminal-from-box

@from-nibly
Copy link

from-nibly commented Jul 6, 2017

That uses the pty.js library underneath which will allow for colors. But the problem is you need to do things like set PS1="" because it will output the prompt. Using that as a solution will be full of corner cases.

Here is the output of ls with zsh set as the shell. It does have color in my terminal but that is a lot to clean up.


l  //this repeating is probably from syntax highlighting rewriting the command on the fly
ls
ls



index.js  node_modules  package.json  swatch


(my prompt printed here)

Not to say this isn't a possible solution. It will just be a bit of work.

@ericwooley
Copy link
Owner Author

@from-nibly Thanks for the tip. That does seem a bit rough. I think i need to learn a bit more about terminals and the pty lib before I attempted something like that.

I was thinking I would literally run the commands in the terminal box sub view, and remove the buttons. to restart etc...

basically add an optional parameter to use a full sub terminal or not.

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

No branches or pull requests

2 participants