-
Notifications
You must be signed in to change notification settings - Fork 249
Suggestion: Better xterm compatibility #5
Comments
This could probably be done by using a WebView instead of the TextView, and combining with xterm.js https://github.com/xtermjs/xterm.js?files=1 |
You can look at my app for how to do this: https://github.com/tbodt/ish/blob/master/app/TerminalView.m https://github.com/tbodt/ish/tree/master/app/xtermjs |
I have some objective-c code for converting a You can get really far by supporting foreground & background colours sequences and ignoring all other escape sequences. |
@tbodt Yes, I'm also using xterm.js, it's very useful and easy to implement |
I think NSAttributedString & CoreText is probably the best approach for this app. I'd like to not have to deal with WKWebView and its own sandboxing & file I/O issues if possible. @palmin Where can I find this code? I'd like to Swift-ify it.. 🙂 |
Very simple and only supports the most basic foreground/background color commands, but it should be easy to adjust
|
Maybe it would make sense to disable the ansi color commands when using a non-standard background color in the app or perhaps just to have a warning where you change the background color? Most of these ansi color coded outputs are only readable if you have a dark background or if the colors are adjusted to match a non-standard background color. |
This issue is being (partially?) addressed by #62, btw. |
@palmin Good point. I noticed Terminal on macOS lets users change ANSI colors, which solves background color issues. Not sure if we should go that far, though. |
Yes. The escape sequence color/style stuff seems to happen in #62 which seems like a good idea as this issue here is very broad. |
More work on this in #85. We can support |
Would it be possible to have the terminal window emulate a xterm? With control caracters to change font color, bold, etc?
Try "curl -s wttr.in/london" in a MacOS Terminal window and in Terminal so see the effects.
The text was updated successfully, but these errors were encountered: