Drummond Ogilvie
862be21a32
fish: use "set -gx" instead of "setenv" ( #218 )
Use `set -gx` instead of `setenv` for fish shell.
Fix test "activate if the first virtualenv is a virtualenv": it was asserting
the output was of bash form, but not specifying that in the test — it now does.
Fixes https://github.com/pyenv/pyenv-virtualenv/issues/216 .
пре 7 година
Yamashita, Yuu
5c2d7dc291
Use `source` in favor of `.` ( fixes #175 )
* https://github.com/yyuu/pyenv/pull/615
* https://github.com/fish-shell/fish-shell/issues/310
пре 8 година
Sean Fisk
dbbbc33206
Evaluate ${PATH} when outputted code is eval'd.
It was previously evaluated when 'pyenv virtualenv-init' is run.
пре 8 година
Yamashita, Yuu
ee18ffac9f
Change prompt after `activate` ( #52 )
пре 9 година
Yamashita, Yuu
f7d1aa7d94
Allow activating first version of virtualenv even if there are multiple versions in pyenv ( #105 )
пре 9 година
Yamashita, Yuu
0fa5de07c9
fix broken tests
пре 9 година
Yamashita, Yuu
017d20ad91
remove unnecessary logic from init script
пре 9 година
Yamashita, Yuu
8731e9bf14
replaced `--no-error` by `--quiet`
пре 9 година
Yamashita, Yuu
bf7e9ba59a
Show `activating...` messages by default
пре 9 година
Yamashita, Yuu
dfd1655069
add a script to hook `source activate` for Anaconda/Miniconda ( #103 )
пре 9 година
Daniel Hahler
f594876f31
init: zsh: prepend hook to precmd_functions
This makes sure that $VIRTUAL_ENV is handled already in other precmd
functions, especially your prompt.
пре 9 година
Bartosz Janda
f657fad926
Passing return value from executed command.
пре 9 година
Jeremy
a242067435
Fix pyenv-virtualenv-init script for fish where command was in string and not being evaluated
пре 9 година
Yamashita, Yuu
be6701e7b6
Fix `Error: too many arguments.` on deactivating anaconda env
пре 9 година
Daniel Hahler
8ca45c0e0a
init: fix shell detection when invoked from a script
- fixes `ps` command to lookup parent process
- adds `assert_output_contains_not` test helper
Ref: https://github.com/yyuu/pyenv/issues/373
пре 9 година
Daniel Hahler
2571a2b973
activate: display setup instructions only with PYENV_VIRTUALENV_INIT=0
This fixes displaying the note, in case "init" has been run manually
and/or the init is not in the expected place.
It removes the unnecessary calls to "grep".
pyenv-virtualenv-init will look at `$PYENV_SHELL` now, too.
Tests have been adjusted/fixed.
пре 9 година
Josh Hagins
5953ddaf64
Ignore failure of pyenv activate
When the current pyenv environment is not a virtualenv, this line
exits with a return code of 1. This is annoying for those of us
who report the last return code in our own PROMPT_COMMAND, so
ignore the output of `pyenv activate` if we're not currently using
a virtualenv.
пре 9 година
Daniel Hahler
2ab9483116
Use `typeset -g` with `precmd_functions`
This makes it possible to use `eval "$(pyenv virtualenv-init -)"` from a
function.
пре 9 година
Tony Wang
e04a6f88fe
fix wrong output in test in fish, refs 240a1de
"(any command)" is not supported in test in fish, we have to set a
variable and then use that
пре 9 година
Tony Wang
240a1de6e5
fix warns for virtualenv-init corner case on fish
The situation is when in a directory containing python binary,
`pyenv prefix' will return empty (caused by `pyenv which' returning
"./python"). This change adds quotes for `test', otherwise `test' will
warn about missing argument.
пре 9 година
Tony Wang
f681df6f20
fix incorrect fish syntax in pyenv-virtualenv-init
пре 9 година
Yamashita Yuu
e774464ced
ignore error from `pyenv-version-name` since it might fail if there is configuration error ( yyuu/pyenv#291 )
пре 9 година
Yamashita Yuu
2060c43387
Stop buzzy errors from embeded shell functions
пре 10 година
Yamashita Yuu
d6671249b7
Should not persist `PYENV_DEACTIVATE` after automatic deactivation ( #47 , #48 )
пре 10 година
Beau Barker
79bfc9d362
When changing from a virtualenv to "system", unset PYENV_DEACTIVATE. Previously the var remained set, which made it impossible to reactivate the previous virtualenv
пре 10 година
Pedro Algarvio
81736da905
Indent to 2 spaces.
пре 10 година
Pedro Algarvio
3ebb00414f
`if [ pyenv deactivate --no-error --verbose ]` is not bourne shell compatible
пре 10 година
Pedro Algarvio
2662b5807c
Fix weird bash code issue which made bash complain about "then"
пре 10 година
Yamashita Yuu
6b4d6249a0
No need to use `eval` in fish init script
пре 10 година
Yamashita Yuu
0de2cdbbc3
Should not persist `PYENV_DEACTIVATE` after failed attempt to deactivate and activate
пре 10 година
Yamashita Yuu
abfda4bac9
Fix issues with manual activation of virtual environments ( #34 )
пре 10 година
Yamashita Yuu
d4ce853e94
Display information on automatic (de)?activation
пре 10 година
Yamashita Yuu
08b4c94f85
Use `PYENV_DEACTIVATE` to store which virtualenv has been deactivated ( #32 )
пре 10 година
Yamashita Yuu
7079cbe979
Fix broken `setenv` in `pyenv-virtualenv-init`
пре 10 година
Yamashita Yuu
d9e3adc108
Performe as same as before v20140614 if `pyenv virtualenv-init` is not configured ( #26 )
пре 10 година
Yamashita Yuu
21e999cc7c
Fix deactivation issue with `system` version
$ pyenv global system
$ pyenv shell venv
(venv) $ pyenv shell --unset
(venv) $ pyenv version
system (set by /home/yamashita/.pyenv/version)
(venv) $ pyenv which python
/home/yamashita/.pyenv/versions/venv/bin/python # <-- should be `/usr/bin/python` (system)
пре 10 година
Yamashita Yuu
ea120da0c5
fish: Suppress annoying stderr outputs from `pyenv-sh-activate`
пре 10 година
Yamashita Yuu
af6c157a79
Add `eval "$(pyenv virtualenv-init -)"` to setup _precmd_ for user's shell
пре 10 година