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年前