vanadium: source each environment when needed individually

This commit is contained in:
Primrose 2025-05-19 21:19:52 +02:00
parent 0342f5e87c
commit e7afade200
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 24 additions and 15 deletions

View file

@ -0,0 +1,11 @@
function activate-nix-env \
--description "Add a nix environment into path"
### Arguments:
if [ (count $argv) -ne 1 ]
echo "Must provide exactly one argument, the path to be added"
return 1
end
set env_name $argv[1]
fish_add_path --global "$HOME/.environments/$argv[1]/bin"
end

View file

@ -0,0 +1,11 @@
function deactivate-nix-env \
--description "Remove a nix environment from path"
### Arguments:
if [ (count $argv) -ne 1 ]
echo "Must provide exactly one argument, the path to be removed"
return 1
end
set env_name $argv[1]
fish_remove_path "$HOME/.environments/$argv[1]/bin"
end