Created
April 14, 2019 19:50
-
-
Save devxpy/3663ec2ef3250bfee696265906ca78a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if status --is-interactive | |
# | |
# pyenv | |
# | |
. (pyenv init -|psub) | |
# | |
# virtualfish | |
# | |
# generated by: $ python -m virtualfish auto_activation | |
# replace-able with - eval (python -m virtualfish auto_activation) | |
set -g VIRTUALFISH_VERSION 1.0.6;set -g VIRTUALFISH_PYTHON_EXEC /Users/dev/.pyenv/versions/anaconda3-2018.12/bin/python;source /Users/dev/.pyenv/versions/anaconda3-2018.12/lib/python3.7/site-packages/virtualfish/virtual.fish;source /Users/dev/.pyenv/versions/anaconda3-2018.12/lib/python3.7/site-packages/virtualfish/auto_activation.fish;emit virtualfish_did_setup_plugins | |
end | |
function __dir_hash | |
echo (basename $PWD)-(echo $PWD | shasum | cut -c -8) | |
end | |
function __exit_or_deactivate_venv | |
if [ $VIRTUAL_ENV ] | |
vf deactivate | |
__vfsupport_deactivate_remove_flag | |
echo '' | |
fish_prompt | |
else | |
exit | |
end | |
end | |
function venv | |
switch (echo $argv) | |
case "rm" | |
vf rm (__dir_hash) | |
case "use" | |
vf activate (__dir_hash) | |
case "new" | |
if test $argv[2] | |
set_color blue | |
echo '$ vf new' $argv[2..-1] (__dir_hash) | |
set_color normal | |
vf new $argv[2..-1] (__dir_hash) | |
else | |
set_color blue | |
echo '$ vf new -p python3.6' (__dir_hash) | |
set_color normal | |
vf new -p python3 (__dir_hash) | |
end | |
vf connect | |
case "*" | |
echo $VIRTUALFISH_HOME/(__dir_hash) | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment