devenv
devenv copied to clipboard
Weird terminal in VSCode when using default devenv setup (with direnv)
Describe the bug
I get a weird terminal if using devenv with direnv in VSCode.
Do you see this \[\]
?
The problem is that VSCode detects a somehow custom bash instead of /usr/bin/bash
. It uses /nix/store/4vzal97iq3dmrgycj8r0gflrh51p8w1s-bash-5.2p26/bin/bash
I know that this is the expected behavior of VSCode. I use the default settings, that VSCode looks for the next available bash
.
My problem is: Why does the default devenv setup modify this bash although my setup does not contain any instructions to do this? I am using just the default devenv.nix from a fresh devenv init
.
What is the difference between /nix/store/4vzal97iq3dmrgycj8r0gflrh51p8w1s-bash-5.2p26
and the common bash installation.
I am using Arch Linux with up-to-date package and I think this should be the same as the used nix package.
$ pacman -Q bash
bash 5.2.026-2
Do I have to install another Nix package like bashInteractive
or is this a bug of devenv that it enforces a specific (and maybe bad) bash installation/version?
To reproduce
See https://github.com/normanjaeckel/roc-with-devenv/tree/e5ed8f025b8df93fab4b8f9ad99f159071c24200. If you open VSCode in this simple example project (direnv allow
must be called before opening VSCode) you see this bug.
Version
1.0.1
direnv profile: https://gist.github.com/normanjaeckel/5e1dd2d189b09e9f60bde030ca5eecc8
I've seen that too, I suggest not using direnv for entering VSCode, but rather using direnv plugin inside VSCode to activate the environment.
I'd love to see this fixed though, I have no idea how.