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

poetry shell does not send a newline to fish #7883

Closed
4 tasks done
NiklasKappel opened this issue May 5, 2023 · 1 comment · Fixed by #7884
Closed
4 tasks done

poetry shell does not send a newline to fish #7883

NiklasKappel opened this issue May 5, 2023 · 1 comment · Fixed by #7884
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@NiklasKappel
Copy link
Contributor

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Steps to reproduce:

fish
cd poetry/
poetry shell

Observed behavior ("|" represents cursor position):

[niklas@toolbox poetry]$ poetry shell
Spawning shell within /var/home/niklas/.cache/pypoetry/virtualenvs/poetry-Xjwftcq8-py3.11
[niklas@toolbox poetry]$ source /var/home/niklas/.cache/pypoetry/virtualenvs/poetry-Xjwftcq8-py3.11/bin/activate.fish|

Expected behavior:

[niklas@toolbox poetry]$ poetry shell
Spawning shell within /var/home/niklas/.cache/pypoetry/virtualenvs/poetry-Xjwftcq8-py3.11
[niklas@toolbox poetry]$ source /var/home/niklas/.cache/pypoetry/virtualenvs/poetry-Xjwftcq8-py3.11/bin/activate.fish
(poetry-py3.11) [niklas@toolbox poetry]$ |

In fish, the source command is not executed automatically when running poetry shell. The reason is that fish does not count os.linesep as a return/enter when the sendline method of pexpect is used. Compare here.

@NiklasKappel NiklasKappel added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 5, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant