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

Removing setecho(False) for all shells #1673

Merged
merged 2 commits into from Dec 24, 2019

Conversation

jmaroeder
Copy link
Contributor

@jmaroeder jmaroeder commented Dec 4, 2019

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

Intended to fix #1672. It appears to me that the only thing that the setecho(False) line does is prevent a double echo of the /bin/activate command in zsh.

Example outputs

Example outputs from various shells. Note that the only things actually typed here are the initial poetry shell and the final exit:

fish

$ poetry shell
Spawning shell within <REDACTED>/.venv
$ source <REDACTED>/.venv/bin/activate.fish
$ exit

bash

bash-3.2$ poetry shell
Spawning shell within <REDACTED>/.venv

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ . <REDACTED>/.venv/bin/activate
(.venv) bash-3.2$ exit

zsh

% poetry shell
Spawning shell within <REDACTED>/.venv
. <REDACTED>/.venv/bin/activate
% . <REDACTED>/.venv/bin/activate
(.venv) % exit

@jmaroeder
Copy link
Contributor Author

@jmaroeder jmaroeder commented Dec 4, 2019

Note that the above tests were performed in MacOS.

@itsthejoker
Copy link

@itsthejoker itsthejoker commented Dec 17, 2019

I can confirm this fix works for me and makes poetry usable again on fish shell. @sdispater please take a look at this PR -- this fixes #1672 and #1664. Cheers!

poetry/utils/shell.py Show resolved Hide resolved
@finswimmer finswimmer added the Bug label Dec 23, 2019
@sdispater sdispater merged commit db6db8f into python-poetry:master Dec 24, 2019
16 checks passed
@sdispater
Copy link
Member

@sdispater sdispater commented Dec 24, 2019

Thanks!

shenek pushed a commit to shenek/poetry that referenced this issue Dec 31, 2019
* Removing setecho(False) for all shells

* Only setecho(False) for zsh
@jmaroeder jmaroeder deleted the fix/no-echo-in-shell branch Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants