git-prompt icon indicating copy to clipboard operation
git-prompt copied to clipboard

git-prompt blocks the use of virtualenv's prompt decoration

Open offbyone opened this issue 14 years ago • 5 comments

Ian Bicking's virtualenv project amends the prompt when you select a virtualenv. git-prompt erases or blocks this content:

old::

me@myhost $ . venv/bin/activate
(venv) me@myhost $ deactivate
me@myhost $

git-prompt::

(D) [email protected] ~> . venv/bin/activate
(D) [email protected] ~> deactivate
(D) [email protected] ~> 

offbyone avatar Dec 07 '10 07:12 offbyone

What would be the expected behaviour?

PS: If this disturbs you in any way, you can disable virtualenv's prompt by setting VIRTUAL_ENV_DISABLE_PROMPT. (http://virtualenv.openplans.org/#activate-script)

niklas avatar Jan 03 '11 00:01 niklas

I would expect the virtualenv to prefix the prompt; probably something like this:

(D) [email protected] ~> . venv/bin/activate
(venv) (D) [email protected] ~> deactivate
(D) [email protected] ~> 

offbyone avatar Jan 04 '11 06:01 offbyone

@lvv I propose to only set PS1 when it has not been changed manually (check in prompt_command_function()). unset'ting it enables git-prompt again.

What do you think?

niklas avatar Jan 04 '11 21:01 niklas

Coreranger's fork have commits to support virtualenv. I am about to merge it. But I can't test it. Can someone try it if it works?

lvv avatar May 26 '11 11:05 lvv

I can confirm that it works as expected (quite nice).

navilan avatar Sep 14 '11 06:09 navilan