Vinay Sajip added the comment:
> My question at this stage is, where is this "Prompt" variable set?
If you mean the VIRTUAL_ENV variable, it's set in one of the activation scripts
for the venv. In any case, this doesn't look it it's a problem with venv code,
more to do with your local enviro
Andrea added the comment:
Actually, the virtual_info appears to be a function within the theme, that does
the following
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('%F{blue}`basename $VIRTUAL_ENV`%f') '
}
So, eventually the problems is in the function that retrieves the wrong
Andrea added the comment:
Hi,
Apologies for the delays in returning to you.
I have been using ZSH and Oh My ZSH on top. The prompt variable, which I have
customised, looks like the following:
%
$(virtualenv_info)$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{
Vinay Sajip added the comment:
> Am I misunderstanding the behaviour of the prompt argument?
You can see from Karthikeyan's post how it's supposed to work, and how it does
work in his example. It may be that something else is overwriting the prompt in
your environment - we can't tell without
Andrea added the comment:
Operative system is OS X 10.15.3 (19D76) Catalina
Python 3.7.4 installed via HomeBrew
If I do this python -m venv ciao --prompt NewOne by the time I activate the
environment, the prompt looks like (ciao) andreamoro@MacBookAir:~/Python
Am I misunderstanding the behav
Karthikeyan Singaravelan added the comment:
Can you please add a reproducer of the steps along with the operating system
and python version? The --prompt was modified in 3.9 to accept "." so that the
current folder name is used in issue38901.
# Use custom name as testing for the prompt
➜ cp
New submission from Andrea :
In creating a new virtual environment, the help suggest a --prompt argument to
specify a different name by the time the environment is active.
https://docs.python.org/3/library/venv.html
The argument is apparently ignored as the folder name always appears instead