Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Bug report
Looked for similar issues and could not find any.
Steps to reproduce bug:
- activate venv
- spawn child fish process (or start tmux session)
- activate same venv
source activate.fishfishsource activate.fishShould output:functions: Function “_old_fish_prompt” does not exist
Cause
I think I've identified the reason for the bug:
- The environment variables set in
activate.fishare exported to child processes (script usesset -gxto set the variables). - However, the function
_old_fish_promptis not exported to child processes.
So, when we run fish from another fish session (such as in tmux), the variables set inactivate.fish are present in the child process, but the functions are not.
Fix
I've written a fix for this, which is to test if the_old_fish_prompt function exists before attempting to delete it. I can make a PR with this fix.
Also, the implementation fromvirtualenv does not suffer from this bug. They check if the function exists before deleting it.
Your environment
Ubuntu 22.04 amd64
Python 3.10.4
Python and venv packages installed from apt