Skip to content

Commit

Permalink
Fix wrong prompt in Nushell activation script (#2481)
Browse files Browse the repository at this point in the history
Fixes #2480
  • Loading branch information
kubouch committed Jan 13, 2023
1 parent beb7d66 commit f355ddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/2481.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix broken prompt in Nushell when activating virtual environment.
2 changes: 1 addition & 1 deletion src/virtualenv/activation/nushell/activate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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)' }
Expand Down

0 comments on commit f355ddb

Please sign in to comment.