@@ -225,6 +225,13 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
225225 set -gx PYTHONHOME "\$ _OLD_VIRTUAL_PYTHONHOME";
226226 set -e _OLD_VIRTUAL_PYTHONHOME;
227227end;
228+ # check if old prompt function exists
229+ if functions -q _pyenv_old_prompt
230+ # remove old prompt function if exists.
231+ functions -e fish_prompt
232+ functions -c _pyenv_old_prompt fish_prompt
233+ functions -e _pyenv_old_prompt
234+ end
228235if functions -q deactivate;
229236 functions -e deactivate;
230237end;
@@ -251,6 +258,13 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
251258 set -gx PYTHONHOME "\$ _OLD_VIRTUAL_PYTHONHOME";
252259 set -e _OLD_VIRTUAL_PYTHONHOME;
253260end;
261+ # check if old prompt function exists
262+ if functions -q _pyenv_old_prompt
263+ # remove old prompt function if exists.
264+ functions -e fish_prompt
265+ functions -c _pyenv_old_prompt fish_prompt
266+ functions -e _pyenv_old_prompt
267+ end
254268if functions -q deactivate;
255269 functions -e deactivate;
256270end;
@@ -279,6 +293,13 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
279293 set -gx PYTHONHOME "\$ _OLD_VIRTUAL_PYTHONHOME";
280294 set -e _OLD_VIRTUAL_PYTHONHOME;
281295end;
296+ # check if old prompt function exists
297+ if functions -q _pyenv_old_prompt
298+ # remove old prompt function if exists.
299+ functions -e fish_prompt
300+ functions -c _pyenv_old_prompt fish_prompt
301+ functions -e _pyenv_old_prompt
302+ end
282303if functions -q deactivate;
283304 functions -e deactivate;
284305end;
@@ -307,6 +328,13 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
307328 set -gx PYTHONHOME "\$ _OLD_VIRTUAL_PYTHONHOME";
308329 set -e _OLD_VIRTUAL_PYTHONHOME;
309330end;
331+ # check if old prompt function exists
332+ if functions -q _pyenv_old_prompt
333+ # remove old prompt function if exists.
334+ functions -e fish_prompt
335+ functions -c _pyenv_old_prompt fish_prompt
336+ functions -e _pyenv_old_prompt
337+ end
310338if functions -q deactivate;
311339 functions -e deactivate;
312340end;
@@ -333,6 +361,13 @@ if [ -n "\$_OLD_VIRTUAL_PYTHONHOME" ];
333361 set -gx PYTHONHOME "\$ _OLD_VIRTUAL_PYTHONHOME";
334362 set -e _OLD_VIRTUAL_PYTHONHOME;
335363end;
364+ # check if old prompt function exists
365+ if functions -q _pyenv_old_prompt
366+ # remove old prompt function if exists.
367+ functions -e fish_prompt
368+ functions -c _pyenv_old_prompt fish_prompt
369+ functions -e _pyenv_old_prompt
370+ end
336371if functions -q deactivate;
337372 functions -e deactivate;
338373end;
0 commit comments