mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 22:57:46 +00:00
changed insert
to merge
(#399)
updating the environment with closures should not be done with `insert` because `insert` will call a closure if it gets one as input, `merge` will not Co-authored-by: Benoît Sierro <benoit.sierro@bluewin.ch>
This commit is contained in:
parent
bc71f8d1e9
commit
2f142406d3
1 changed files with 6 additions and 5 deletions
|
@ -53,14 +53,15 @@ export def-env activate [
|
|||
{|| $'($virtual_prompt)' }
|
||||
}
|
||||
|
||||
$new_env
|
||||
| insert CONDA_OLD_PROMPT_COMMAND $old_prompt_command
|
||||
| insert PROMPT_COMMAND $new_prompt
|
||||
$new_env | merge {
|
||||
CONDA_OLD_PROMPT_COMMAND: $old_prompt_command
|
||||
PROMPT_COMMAND: $new_prompt
|
||||
}
|
||||
} else {
|
||||
$new_env
|
||||
| insert CONDA_OLD_PROMPT_COMMAND $nothing
|
||||
$new_env | merge { CONDA_OLD_PROMPT_COMMAND: $nothing }
|
||||
}
|
||||
|
||||
|
||||
load-env $new_env
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue