Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nushell activation script results in broken prompt #2480

Closed
dpatterbee opened this issue Jan 4, 2023 · 2 comments · Fixed by #2481
Closed

Nushell activation script results in broken prompt #2480

dpatterbee opened this issue Jan 4, 2023 · 2 comments · Fixed by #2481
Labels

Comments

@dpatterbee
Copy link

dpatterbee commented Jan 4, 2023

Issue

The Nushell activation script no longer handles prompts correctly due to the split of closures and blocks in 0.72.

if ($old_prompt_command | describe) == 'block' {

This lines checks for type block, but many/(most?) prompts will now be of type closure, causing them to render as <Closure X> rather than actually running the prompt function.

eg.

(venv) <Closure 11>〉

I don't have the expertise to know whether switching that check to "closure" is the correct fix or not so I'm just leaving this bug report rather than opening a PR. Editing that line in my activate.nu does work as a temporary fix though.

Environment

Provide at least:

  • OS: macos 13.1
  • pip list of the host python where virtualenv is installed:
asdf
Package      Version
------------ -------
distlib      0.3.6
filelock     3.8.0
pip          22.3.1
platformdirs 2.5.4
setuptools   65.6.3
virtualenv   20.17.1
wheel        0.38.4

Output of the virtual environment creation

This isn't an issue with creation so I'm not including this.

@dpatterbee dpatterbee added the bug label Jan 4, 2023
@gaborbernat
Copy link
Contributor

cc @kubouch

@kubouch
Copy link
Contributor

kubouch commented Jan 5, 2023

Good catch! Yes, changing it to closure should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants