Open segevfiner opened 8 months ago
TERM=xterm
implies full support
That is accurate, I was not around during the development when this decision was made, but I think it was done this way because doing something like TERM=eclipsetm
would have meant termcap reporting that no escaping is supported. For what I assume the same reason, other programs like VSCode, xfce4-terminal and many others also advertise themselves as xterm
or even xterm-256color
(TM Terminal probably can change to xterm-256color since I implemented full color support a while ago).
While there are likely to continue to be some holes in full support, this can be best resolved by TM Terminal implementing missing xterm functionality.
Can you create a minimal reproducer (e.g. an echo with escapes) that fails to render properly?
There are other values then TERM though that might work until the terminal catches up. I can try and grab you the relevant parts of my shell rc so you can check what unsupported escapes it happens to use.
Here is a trimmed version of my .zshrc
:
source /opt/homebrew/share/antigen/antigen.zsh
export LESS="-FR --mouse"
antigen use oh-my-zsh
(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
antigen bundle git
antigen bundle fzf
antigen bundle docker
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
eval "$(starship init zsh)"
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
antigen apply
Thanks - I don't have easy access to mac so I can't try that. Can you provide a screenshot or similar that shows the problem. Ideally an escape sequence that renders incorrectly (like color=121 ; printf "\e[38;5;%sm %3s \e[0m" $color $color
)
If you can enable tracing of the VT100Backend processing it may show some escape sequences that fail to be processed as not understood. To do this:
/tmp/options
) with the following contents:org.eclipse.tm.terminal.control/debug/log = true
org.eclipse.tm.terminal.control/debug/log/VT100Backend = true
-debug /tmp/options
The stderr for Eclipse will now show all the VT100Backend processing that is happening. Hopefully in that output it will be possible to see where the VT100Backend either didn't understand the escape sequences or where it misinterpreted them.
Excepted output will look something like this (startup parts edited down for brevity):
$ eclipse -debug /tmp/options
Start VM: /path/to/jre/bin/java
...
-debug /tmp/options
...
Debug options:
file:/tmp/options loaded
...
setCursorColumn(0)
processNewline()
setStyle(Style(foreground=FOREGROUND, background=BACKGROUND))
setCursorColumn(0)
processNewline()
setStyle(Style(foreground=GREEN, background=BACKGROUND))
appendString("jonah@ditto ")
setStyle(Style(foreground=BLACK, background=BACKGROUND, bold))
appendString("/scratch/eclipse/src/cdt/workspace")
setStyle(Style(foreground=FOREGROUND, background=BACKGROUND))
appendString(" ")
setStyle(Style(foreground=MAGENTA, background=BACKGROUND))
appendString("()")
setStyle(Style(foreground=FOREGROUND, background=BACKGROUND))
setCursorColumn(0)
processNewline()
That should work in Linux as well if you just update the path to antigen, I removed the other macOS specific stuff.
I don't use zsh (as a result not antigen either)
You can install them and remove them later on ? (Though you might find an even slightly configured Zsh can be quite more convenient then plain Bash 😛) But I'll try and produce the log when I have the time.
Here is a log from me just trying to type stuff, the prompt appears, disappears, and all sorts of random glitches while using this:
Describe the bug With
TERM=xterm
, my terminal is trying to use escape sequences that don't seem to be properly supported by TM Terminal which causes terminal display to be messed up,TERM=xterm
implies full support for the escape sequences supported by xterm, but TM Terminal doesn't seem to implement all of them properly.https://github.com/eclipse-cdt/cdt/blob/98e86ff23aa0c20229a2635675e61c10d5556950/terminal/plugins/org.eclipse.tm.terminal.view.core/src/org/eclipse/tm/terminal/view/core/utils/Env.java#L67
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Version Information (please complete the following information):
Additional context P.S. On macOS terminals are supposed to open as a login shell as macOS doesn't run the profile scripts at login.