From 0398e5b3ba4256851f046a3a350cee2309953a82 Mon Sep 17 00:00:00 2001 From: Artemiy Date: Fri, 10 Mar 2023 18:13:04 +0300 Subject: [PATCH] Add print command to print_prompt for nushell (#2514) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docs/changelog/2514.bugfix.rst | 2 ++ tests/unit/activation/test_nushell.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/2514.bugfix.rst diff --git a/docs/changelog/2514.bugfix.rst b/docs/changelog/2514.bugfix.rst new file mode 100644 index 000000000..176bea9a4 --- /dev/null +++ b/docs/changelog/2514.bugfix.rst @@ -0,0 +1,2 @@ +Add ``print`` command to nushell print_prompt to ensure compatibility with future release of nushell, +where intermediate commands no longer print their result to stdout. diff --git a/tests/unit/activation/test_nushell.py b/tests/unit/activation/test_nushell.py index cf5886a0c..513ebbaa0 100644 --- a/tests/unit/activation/test_nushell.py +++ b/tests/unit/activation/test_nushell.py @@ -17,7 +17,7 @@ def __init__(self, session): self.unix_line_ending = not IS_WIN def print_prompt(self): - return r"$env.VIRTUAL_PROMPT" + return r"print $env.VIRTUAL_PROMPT" def activate_call(self, script): # Commands are called without quotes in Nushell