summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/changelog/2481.bugfix.rst1
-rw-r--r--src/virtualenv/activation/nushell/activate.nu2
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)' }