Skip to content

Commit f355ddb

Browse files
authored
Fix wrong prompt in Nushell activation script (#2481)
Fixes #2480
1 parent beb7d66 commit f355ddb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/changelog/2481.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix broken prompt in Nushell when activating virtual environment.

src/virtualenv/activation/nushell/activate.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export-env {
9292

9393
# If there is no default prompt, then only the env is printed in the prompt
9494
let new_prompt = if (has-env 'PROMPT_COMMAND') {
95-
if ($old_prompt_command | describe) == 'block' {
95+
if 'closure' in ($old_prompt_command | describe) {
9696
{ $'($virtual_prompt)(do $old_prompt_command)' }
9797
} else {
9898
{ $'($virtual_prompt)($old_prompt_command)' }

0 commit comments

Comments
 (0)