You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[shellenv] Remove nix profile from path, add shellenv command (#667)
## Summary
This removes nix profile from path when using unified environment. It
adds a new shellenv command and prints instructions when package is
added inside devbox shell.
@gcurtis I chose `eval $(devbox shellenv)` over `. <(devbox shellenv)`
to be consistent with the global instructions and also because it's easy
to miss the period when we print it. Not sure if there's a difference.
Also is this fish compatible or do we need different instructions for
fish?
Lastly, you'll notice `hash -r` is not there anymore. In my experiments
running `eval $(devbox shellenv)` causes the hash table to clear. I
believe this happens because `PATH` has changed, but I'm not 100% sure.
## How was it tested?
<img width="762" alt="image"
src="https://user-images.githubusercontent.com/544948/220529645-42a6578f-e733-4943-9478-bb415a904a40.png">
```bash
➜ devbox shell
➜ devbox add php82 php82Extensions.memcached
➜ which php
php not found
➜ eval $(devbox shellenv)
➜ which php
/nix/store/5yylkc71wmlzii2vl40021vgbfwqmajb-php-with-extensions-8.2.1/bin/php
➜ php -m | grep memcached
memcached
```
0 commit comments