Pipenv: Fish Support broken

Created on 25 Jan 2017  ·  4Comments  ·  Source: pypa/pipenv

Something strange is happening when calling pipenv shell using fish. Somehow the fish shell spawned does not have a fish_prompt: functions: Function 'fish_prompt' does not exist.

Not using pipenv but directly calling source .venv/bin/activate.fish works without a problem.

Full Output / Example:

~> pipenv --three
Creating a Pipfile for this project...
Creating a virtualenv for this project...
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/tobi/.venv/bin/python3.6
Also creating executable in /Users/tobi/.venv/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/tobi/.venv
~> pipenv shell
Spawning environment shell (/usr/local/bin/fish).
source /Users/tobi/.venv/bin/activate.fish
/usr/local/opt/python3/bin/python3.6: No module named virtualfish
/Users/tobi/.venv/bin/python3: No module named virtualfish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
~> source /Users/tobi/.venv/bin/activate.fish
fish: Unknown command '__fish_print_help'
~/.venv/bin/activate.fish (line 1): __fish_print_help --tty-width 166 functions
                                    ^
in command substitution
    called on line 3 of file ~/.venv/bin/activate.fish

in function 'deactivate'
    called on line 37 of file ~/.venv/bin/activate.fish
    with parameter list 'nondestructive'

from sourcing file ~/.venv/bin/activate.fish
    called on standard input

functions: Function '_old_fish_prompt' does not exist
~/.venv/bin/activate.fish (line 22):         functions -c _old_fish_prompt fish_prompt
                                             ^
in function 'deactivate'
    called on line 37 of file ~/.venv/bin/activate.fish
    with parameter list 'nondestructive'

from sourcing file ~/.venv/bin/activate.fish
    called on standard input

functions: Function 'fish_prompt' does not exist
~/.venv/bin/activate.fish (line 56):     functions -c fish_prompt _old_fish_prompt
                                         ^
from sourcing file ~/.venv/bin/activate.fish
    called on standard input


       functions ‐‐ print or erase functions

   Synopsis
       functions [ ‐a | ‐‐all ] [ ‐n | ‐‐names ]
       functions ‐c OLDNAME NEWNAME
       functions ‐d DESCRIPTION FUNCTION
       functions [ ‐e | ‐q ] FUNCTIONS...

functions: Type 'help functions' for related documentation

fish: Unknown command '_old_fish_prompt'
~/.venv/bin/activate.fish (line 14):         _old_fish_prompt
                                             ^
in function 'fish_prompt'
    called on standard input

in command substitution
    called on standard input

(tobi)

Versions:

~> fish --version
fish, version 2.4.0
~> python3 --version
Python 3.6.0
~> pipenv --version
pipenv, version 3.1.9
Type help wanted

Most helpful comment

SHELL must be set, however.

All 4 comments

Can someone more familiar with fish help with this?

It might have something to do with how fish runs virtualenv.

I fisher install virtualfish

And then my config.fish gets updated with:

eval (python -m virtualfish)
eval (python -m virtualfish auto_activation global_requirements)

I can try and help look into this when I actually start using pipenv

fish works now!

SHELL must be set, however.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bgjelstrup picture bgjelstrup  ·  3Comments

hynek picture hynek  ·  3Comments

ipmb picture ipmb  ·  3Comments

konstin picture konstin  ·  3Comments

jacebrowning picture jacebrowning  ·  3Comments