From 04dbb84d462e9567b280bd4a9b7e5249b680fde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Thu, 5 Jan 2023 20:17:15 +0200 Subject: [PATCH 1/2] Fix wrong prompt in Nushell activation script --- src/virtualenv/activation/nushell/activate.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtualenv/activation/nushell/activate.nu b/src/virtualenv/activation/nushell/activate.nu index 723568440..5e5ee26a5 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)' } From 8e817d11392dfb9da01ca6375957ef8466a1d978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Thu, 5 Jan 2023 20:23:18 +0200 Subject: [PATCH 2/2] Add changelog entry --- docs/changelog/2481.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/changelog/2481.bugfix.rst diff --git a/docs/changelog/2481.bugfix.rst b/docs/changelog/2481.bugfix.rst new file mode 100644 index 000000000..d8487b20e --- /dev/null +++ b/docs/changelog/2481.bugfix.rst @@ -0,0 +1 @@ +Fix broken prompt in Nushell when activating virtual environment.