question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pipenv shell` with fish shell requires entering a command to complete

See original GitHub issue

I have a small quirk when running pipenv shell with fish shell. When I run it, env var get loaded, and a subshell is spawned, but then it left me with a prompt, with a prepared activation command in it, the cursor at the end of the line, and I have to press enter again to activate the env.

~/path/of/work/dir > pipenv shell
Loading .env environment variables…
Spawning environment shell (/usr/bin/fish). Use 'exit' to leave.
~/path/of/work/dir > source /home/my-name/.local/share/virtualenvs/my-env-name/bin/activate.fish [cursor here and command ready to run]
# press enter
(name-of-my-env)   ~/path/of/work/dir >

I expect pipenv shell to work in one go, just as it does in bash. It’s not a blocking problem, it just feels broken. And it prevents from automating too.

os: linux mint 18 cinnamon 64-bit
related ubuntu repo: Xenial 16.04
terminal emulator: terminator 0.98-1
fish: 2.7.1-1~xenial
Python: 3.6.5
pipenv: 2018.5.18

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
uranusjrcommented, Jun 11, 2018

Sounds like a Fish-specific quirk… or is it environment-specific? I don’t use Fish at all and will need someone to verify.

In the mean time, does pipenv shell --fancy work for you? We (well, I) want to push its adoption if it does. The fancy alternative is so much less hacky than the default implementation.

1reaction
zancheycommented, Dec 28, 2018

(hello, I’m one of the fish committers)

I can’t reproduce the originally-described problem (the source line is left in the command buffer, awaiting the enter key) here on macOS with pipenv, version 2018.11.26 and fish 3.0.0.

My guess with the problems with $PATH is that you are changing the path variable in your config.fish, and perhaps those lines should be guarded by if status is-login or similar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Usage of Pipenv - Read the Docs
Pipenv is a reference implementation for using Pipfile. ... This will spawn a new shell subprocess, which can be deactivated by using exit...
Read more >
Fish Shell - Virtualenv path not prepended to PATH - Super User
I have this problem where when I activate a python virtual env, via >pipenv shell , the virtual env path is slotted into...
Read more >
How to use pipenv shell ? I'm getting an Error - Stack Overflow
The -m option stands for module. The above tells Python to execute the pipenv module, and shell is a parameter to pipenv that...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look ... It's because this command is intended to be run...
Read more >
Advanced Usage of Pipenv — pipenv 11.7.2 documentation
You can convert a Pipfile and Pipfile.lock into a requirements.txt file very ... If a .env file is present in your project, $...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found