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

Investigate term.js alternatives #6838

Closed
Tyriar opened this issue May 24, 2016 · 12 comments
Closed

Investigate term.js alternatives #6838

Tyriar opened this issue May 24, 2016 · 12 comments
Assignees
Labels
terminal General terminal issues that don't fall under another label
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented May 24, 2016

term.js is showing its limitations, the two options are to either fork it ourselves to suit our use case, or go with one of its more prominent forks:

sedwards2009/extraterm looks very active https://github.com/sedwards2009/extraterm/graphs/contributors

Here are some of the problems that have sparked this issue:

@Tyriar Tyriar added the terminal General terminal issues that don't fall under another label label May 24, 2016
@Tyriar Tyriar self-assigned this May 24, 2016
@rozzzly
Copy link

rozzzly commented May 25, 2016

Might I suggest:
https://github.com/shockone/black-screen

It's an electron/react app that seems to do a really nice job of enhancing the traditional TUI. I haven't had a chance to try it, but never have I seen anything coming close to bridging CLI and GUI. This is really fkn cool, Imagine that intergrated with VS Code!

That project appears to be pretty mature, and it's even written in typescript! 😉 TBH, I don't know anything about the Electron api, but I would assume(/hope) that it would be possible to run that console in an isolated process, which renders its gui to a container docked within the VS Code editor . Then create some mechanism to enable communication between the editor/terminal via some new IPC interface. But then again, it might just be easier to merge the two projects completely, I don't know enough about either backend to offer any meaningful conjecture on the implementation....

However, I recently started using ConEmu, which has this render to pane feature and it's awesome. Yet, the two apps are oblivious of each other. There is no out-of-the-box-way to facilitate communication between the two. Just to launch a task I would have to write some contrived daemon that runs in the shell waiting for vsc to run some other script that pokes that daemon into performing some action within the active shell... yuck. 🙉 Imagine a unified workspace / intellisense bridging that gap. damn.

Few cool features (but definitly checkout the repo itself!!)

Intellisense-esque completion when typing into the shell (and theres is a custom completion provider api in black-screen)
intellisense-esque completion in shell
JSON explorer like in chrome devtools:
JSON explorer like in chrome devtools
Still works with your favorite tools:
Still works with your favorite tools

Obviously this would be a wayyyyy larger investment (in terms of manhours) than term.js but the possibilities are mind boggling when you consider some of the possible workflows you could set up with this...

My friends, just.......

@Tyriar
Copy link
Member Author

Tyriar commented May 25, 2016

Thanks for the suggestion @rozzzly, my main concern with something like that is that it's not leveraging people's terminal setups. For example, I would probably be losing some information I find most useful as I have a custom prompt to display git status for me. Will check it out though.

@Tyriar
Copy link
Member Author

Tyriar commented May 25, 2016

I have actually tried black-screen before, it seemed kind of cool but it was different to what I was used and didn't particularly want to change :P

@romgrk
Copy link

romgrk commented May 27, 2016

@Tyriar totally agree with your concerns.
I wrote an atom package for embedding a terminal (github.com/romgrk/termrk) (using term.js, but definitely not the best solution), and a recurrent point of attraction for users was to have their usual terminal setup available from Atom, be it zsh, bash, or other.

@rajeev-kumar-sharma
Copy link

We can mix black-screen and xtrem feature into out vscode terminal

@Tyriar
Copy link
Member Author

Tyriar commented Jun 2, 2016

Spend a while bashing at xterm.js and created a bunch of issues https://github.com/sourcelair/xterm.js/issues. It certainly seems to be in a better state than term.js imo, I haven't played much with it actually within vscode yet though.

@be5invis
Copy link
Contributor

be5invis commented Jun 6, 2016

@Tyriar I can confirm that term.js cannot handle DBCS characters well.

On windows...

  • If you are using a DBCS codepage (like 936 or 932) in CHCP, all CJK characters are exactly two cells wide, even in the console buffer [to simulate some hardware (“汉卡”) in 1990s which combine two cells into one cell to display full-width characters].
  • If you are not, they are fit in one cell, even when displaying.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 6, 2016

@be5invis we're likely going to go with xterm.js, I created a bunch of i18n issues over there after playing with it a bit:

I think they're all related to the width and byte size of the characters.

@danekan
Copy link

danekan commented Jun 7, 2016

I am seeing my integrated terminal does not honor line breaks... example in notepad:
mkdir directory 1[enter]
mkdir directory2

copy paste the above into terminal, it will run as one command with line breaks removed: mkdir directory1mkdir directory2

This happens on windows term with both cmd.exe and powershell so I assume it relates to the integrated terminal functionality itself?

@Tyriar
Copy link
Member Author

Tyriar commented Jun 7, 2016

@danekan can you open a new issue for that and mention your on Windows? It seems to be working find on Linux.

@danekan
Copy link

danekan commented Jun 7, 2016

sure

@Tyriar Tyriar added this to the June 2016 milestone Jun 9, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Jun 9, 2016

Put out a big PR that fixes the major scrolling issues with xterm.js xtermjs/xterm.js#101

Since I've already merged in xterm, I'm going to close this issue off.

@Tyriar Tyriar closed this as completed Jun 9, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

6 participants