Installation does not support the 'fish' shell
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Linux Mint (as Ubuntu 16.04)
-
Poetry version: 0.12.4
-
Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
Currently, the install script does not correctly detect and configure the fish shell. On my distribution, the correct thing to do would be to add the following line to ~/.config/fish/conf.d/poetry.fish
(which is a fairly common idiom):
set PATH ~/.poetry/bin $PATH
Note that there is no =
or :
, and ~
is considered idiomatic (although $HOME works as well, I believe… this could need testing.)
Detection can be done via inspection of $SHELL which should generally be set to /usr/bin/fish
but certainly should have basename $SHELL
as fish
.
Happy to submit a PR if you’d like one, a bit too busy to do that as part of the report but I can do it later if you’re interested.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:5 (5 by maintainers)
Top GitHub Comments
Many thanks for the endorsement, Erich. I spent a good deal of time on this PR in an effort to implement an elegant solution. I initially ran into some difficulty invoking
fish
from Python, but @ridiculousfish was kind enough to guide me to the correctsubprocess
invocation.@stephsamson: Have you had a moment to review this pull request? I only ask because I think Poetry’s 1.0 release is near, and it would be nice if it could include Fish support before it ships. 😁
It looks like @justinmayer nailed it. Sorry, I was offline when this came through, but Justin’s approach will clearly be superior and is idiomatic in fish so it all worked out for the best anyway 😃
Purely for the record, you can find my solution here, as part of an ansible repository: https://github.com/eblume/envelop/blob/master/roles/common/templates/000-env.fish.j2#L33
But as mentioned above, the other approach is much more robust.