I have a flake I use to enter a development shell environment (via direnv) for building a nodejs vscode extension, and I also run
code from that dev shell.
I ran into an issue where the terminal being executed by vscode was behaving strange, specifically throwing the error:
bash: shopt: progcomp: invalid shell option name
And the resulting shell was not very usable at all.
After some digging I found a couple of posts:
- bash builtins not working · Issue #25746 · NixOS/nixpkgs · GitHub
- Interactive Bash with `nix develop` Flake
- Bash completion broken after running `nix develop` · Issue #6091 · NixOS/nix · GitHub
The discourse post above has the solution I used, but didn’t include a reference to the actual bash error I was seeing at least, so wanted to post something again here to help people running into this.
buildInputs = [ pkgs.bashInteractive ]; into the
mkShell part of my flake.nix solved the issue.
I’m curious if there a better way to fix this so it doesn’t have to be added to each flake?