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

Why set the env 'TERM=xterm' #13

Closed
chenjunnn opened this issue Feb 28, 2022 · 3 comments
Closed

Why set the env 'TERM=xterm' #13

chenjunnn opened this issue Feb 28, 2022 · 3 comments

Comments

@chenjunnn
Copy link

I am using vscode built-in terminal, and when I use this script to create a container, I found the zsh-auto-suggestion is not working properly as the color of the suggestion is wrong:

  • Expected:
    image

  • Actually:
    image

Then I found it was caused by the env TERM was set to xterm.
So I remove the export TERM=xterm, then echo $TERM to find that it is xterm-256color originally.
I wonder why the env 'TERM=xterm' would be set and if there should be an option to disable it.

@deluan
Copy link
Owner

deluan commented Sep 30, 2022

I will do more tests and make sure xterm-256color is available in all distros supported before changing this. Thanks for reporting.

@petertheprocess
Copy link
Contributor

Hi, maybe we can check if this varible has been set, if not set it to xterm.

if [ -z "$TERM" ]; then
  export TERM="xterm"
fi

Then we can pass this env varible during lauching like this

docker run -it --env=TERM=xterm-256color image:tag zsh

@deluan
Copy link
Owner

deluan commented Sep 30, 2024

The PR #30 should allow the TERM setting to be bypassed.

@deluan deluan closed this as completed Sep 30, 2024
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