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

Running in devcontainer - theme does not work #25

Open
js1972 opened this issue Oct 1, 2023 · 2 comments
Open

Running in devcontainer - theme does not work #25

js1972 opened this issue Oct 1, 2023 · 2 comments

Comments

@js1972
Copy link

js1972 commented Oct 1, 2023

I am trying to run the zsh-in-docker script in a docker file like this:

RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
    -t eastwood -p git -x

You can see I am specifying eastwood as the theme with the -t option. This docker file is started with a vscode devcontainer. For some reason - after starting the container the ~/.zshrc file always has this setting for the theme like this:

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="devcontainers"

If I manually change the theme in the .zshrc to eastwood and source it - then it works great with the selected theme.

There does not seem to be a theme even called "devcontainers" available!?? I also can't see any logic in your script that could do this so its weird!

@js1972
Copy link
Author

js1972 commented Oct 2, 2023

Update - if I add this as a step at the end of the dockerfile it works: sed -i '/^ZSH_THEME/c\ZSH_THEME="eastwood"' /home/node/.zshrc.

Must be something in vscode's devcontainer terminal startup that changes the ZSH_THEME, somehow?!?

@darkcofy
Copy link

darkcofy commented Nov 3, 2023

This fix works for me too

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

2 participants