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

activate.fish uses unsupported 'source' command #886

Closed
neildhar opened this issue Mar 18, 2016 · 4 comments
Closed

activate.fish uses unsupported 'source' command #886

neildhar opened this issue Mar 18, 2016 · 4 comments

Comments

@neildhar
Copy link

The activate.fish file currently generated by the virtualenv command use the 'source' command which does not exist in fish. This throws up an error on running the script. An easy solution is to change the source command to a '.'

See the attached images for details:

screen shot 2016-03-19 at 3 10 23 am
the original error

screen shot 2016-03-19 at 3 11 19 am
the edit I made to the activate.fish file

screen shot 2016-03-19 at 3 11 43 am
the result

@Ivoz
Copy link

Ivoz commented Mar 19, 2016

The fish shell website tells differently.

https://fishshell.com/docs/current/commands.html#source

. (a single period) is an alias for the source command. The use of . is deprecated in favour of source, and . will be removed in a future version of fish.

Who am I to believe?

@neildhar
Copy link
Author

Sorry, I rushed to a conclusion after reading issue #211 on the fish shell page.

Apparently the same concern was raised in issue #310 and was addressed in the latest version of fish

The issue on my system was because apt-get only installs fish 2.0.0 by default and a separate repository needs to be added in order to get the version (2.2.0) in which the source command was introduced. Adding the PPA repository fish-shell/release-2 and upgrading the fish package fixed the issue. Thanks so much for your help and sorry about the confusion.

@sjatkins
Copy link

sjatkins commented Sep 29, 2016

Really? I am no fish version 2.3.1 and source of a virtualenv activate file does not work.

source ~/.venvs/base/bin/activate
Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
~/.venvs/base/bin/activate (line 23):     if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
                                                                ^
from sourcing file ~/.venvs/base/bin/activate
    called on standard input

source: Error while reading file '/Users/satkins/.venvs/base/bin/activate'

@Ivoz
Copy link

Ivoz commented Oct 1, 2016

@sjatkins you are sourcing the activate script, designed for bash / zsh / etc, instead of activate.fish

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants