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 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

This comment has been minimized.

Copy link
Contributor Author

jmaroeder commented Dec 4, 2019

Note that the above tests were performed in MacOS.

@itsthejoker

This comment has been minimized.

Copy link

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
16 checks passed
Linting
Details
Linux (2.7)
Details
Linux (3.5)
Details
Linux (3.6)
Details
Linux (3.7)
Details
Linux (3.8)
Details
MacOS (2.7)
Details
MacOS (3.5)
Details
MacOS (3.6)
Details
MacOS (3.7)
Details
MacOS (3.8)
Details
Windows (2.7)
Details
Windows (3.5)
Details
Windows (3.6)
Details
Windows (3.7)
Details
Windows (3.8)
Details
@sdispater

This comment has been minimized.

Copy link
Member

sdispater commented Dec 24, 2019

Thanks!

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

* Only setecho(False) for zsh
@StephenBrown2 StephenBrown2 mentioned this pull request Jan 10, 2020
5 of 5 tasks complete
@jmaroeder jmaroeder deleted the jmaroeder: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
Projects
None yet
4 participants
You can’t perform that action at this time.