Open hansalves opened 8 months ago
A workaround is to set the STARSHIP_SHELL variable to zsh. However, this will cause starships shell module to display zsh instead of bash.
how did youll resolve this? I also have the same problem but the setting of STARSHIP_SHELL
did not work
{ pkgs, lib, config, inputs, ... }:
{
env.STARSHIP_SHELL = "zsh";
enterShell = ''
if [ -d ".venv" ]; then
source .venv/bin/activate
else
uv venv && source .venv/bin/activate
fi
'';
languages = {
python = {
enable = true;
version = "3.11.6";
};
};
dotenv.enable = true;
starship.enable = true;
}
for context, I already use starship on my laptop. When I cd
into the project directory, the shell shows the mangle of chars as in the screenshot above. But when I devenv shell
its normal again.
I ended up not using starship from devenv, but initializing it from my .bashrc / .zshrc In devenv I now only have
enterShell = ''
export STARSHIP_CONFIG=${config.env.DEVENV_ROOT}/starship.toml
.......
''
Describe the bug Starship outputs wrong control characters when initialized from zsh through direnv. A clear and concise description of what the bug is.
To reproduce This can be reproduced by creating a .envrc (by running devenv init) in the starship example in git from zsh.
The integration adds
eval "$(starship init $(echo $0))"
to the enterShell. $0 will be the bash that's started by devenv, not the parent shell. This causes starship to output bash control characters instead of zsh ones.Version
devenv: 0.6.3