Add way to force a particular environment shell
See original GitHub issueArch recommends users to keep a bash-compatible shell as default [0]. I’m using the method of exec
ing fish
from my .bashrc
.
pipenv fails on pipenv shell
, apparently because it thinks that the bash activate
should be executed
Spawning environment shell (/bin/bash). Use 'exit' to leave.
~/s/tmp source /home/me/.local/share/virtualenvs/tmp-yq4UYSVl/bin/activate
~/.local/share/virtualenvs/tmp-yq4UYSVl/bin/activate (line 23): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
^
from sourcing file ~/.local/share/virtualenvs/tmp-yq4UYSVl/bin/activate
called on standard input
source: Error while reading file “/home/me/.local/share/virtualenvs/tmp-yq4UYSVl/bin/activate”
If I replace activate
with activate.fish
, the pipenv works as expected.
Could there be a flag or, even better yet, a config option to force the default environment shell?
[0] https://wiki.archlinux.org/index.php/Fish#Not_setting_fish_as_default_shell
Describe you environment
- OS Type Linux tp 4.13.7-1-ARCH #1 SMP PREEMPT Sat Oct 14 20:13:26 CEST 2017 x86_64 GNU/Linux
- Python version:
$ python -V
Python 3.6.2 - Pipenv version:
$ pipenv --version
pipenv, version 8.2.7
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How To Read and Set Environmental and Shell Variables on ...
In this guide, we will discuss how to interact with the environment and read or set environmental and shell variables interactively and through ......
Read more >Linux environment variable tips and tricks | Enable Sysadmin
To make permanent changes to the environment variables for all new accounts, go to your /etc/skel files, such as .bashrc , and change...
Read more >How to permanently set environmental variables
You can add it to the file .profile or your login shell profile file (located in your home directory). To change the environmental...
Read more >Setting an environment variable before a command in Bash is ...
So, what's a good way to do this on a single line? I'm thinking something on the order of: FOO=bar (somecommand someargs |...
Read more >How to Set, List and Manage Linux Environment Variables
#Use .profile to Make Environment Variables Permanent for Login Shells · Change directory to the user's home directory cd ~ · Open .profile...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kehugter in compat mode your shell is determined by the
SHELL
environment variable, so you can just export $SHELL in your.bashrc
or run the subshell withSHELL=/usr/bin/fish pipenv shell
and it should work. Let me know if this helpsYes, as with all shell configurations you should include interactive settings in interactive shells only. That information is mentioned in the docs in the context of fish, but as a user who is concerned about edge cases of people trying to run an interactive pipenv shell on a non interactive shell, well that use case isn’t possible so you shouldn’t change the variable. If you want to be safe however you can follow the bash instructions about testing for interactivity before setting the value: see here