diff options
author | Jakub Žádník <kubouch@gmail.com> | 2023-01-13 19:50:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 09:50:03 -0800 |
commit | f355ddb90153652fa7952e643eeb8b1a3b7c2e62 (patch) | |
tree | ea6a127dffbbab3e62b110cda2ed8c32783ee52c | |
parent | beb7d66b5575f75d4b660d90ad75c3a56deb8a20 (diff) | |
download | virtualenv-f355ddb90153652fa7952e643eeb8b1a3b7c2e62.tar.gz |
Fix wrong prompt in Nushell activation script (#2481)
Fixes https://github.com/pypa/virtualenv/issues/2480
-rw-r--r-- | docs/changelog/2481.bugfix.rst | 1 | ||||
-rw-r--r-- | src/virtualenv/activation/nushell/activate.nu | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/changelog/2481.bugfix.rst b/docs/changelog/2481.bugfix.rst new file mode 100644 index 0000000..d8487b2 --- /dev/null +++ b/docs/changelog/2481.bugfix.rst @@ -0,0 +1 @@ +Fix broken prompt in Nushell when activating virtual environment. diff --git a/src/virtualenv/activation/nushell/activate.nu b/src/virtualenv/activation/nushell/activate.nu index 7235684..5e5ee26 100644 --- a/src/virtualenv/activation/nushell/activate.nu +++ b/src/virtualenv/activation/nushell/activate.nu @@ -92,7 +92,7 @@ export-env { # If there is no default prompt, then only the env is printed in the prompt let new_prompt = if (has-env 'PROMPT_COMMAND') { - if ($old_prompt_command | describe) == 'block' { + if 'closure' in ($old_prompt_command | describe) { { $'($virtual_prompt)(do $old_prompt_command)' } } else { { $'($virtual_prompt)($old_prompt_command)' } |