Issue
If I activate a prompt (which doesn't have a right prompt) using fish_config prompt save prompt_name , the fish_right_prompt.fish still contains the previous right prompt. Ideally it should be cleared or deleted.
Test Envionment
Fish
fish, version 3.7.0 from Ubuntu 24.04 repository as well as fish, version 3.7.1 from the PPA
Terminal
TERM=xterm-256color
Fresh Fish
sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= fish' doesn't fix it.
Reproducing the problem
In the screenshot below:
- I first activated
disco prompt which has both left and right prompt. It gets activated correctly.
- Activate
pythonista prompt which doesn't have a right prompt. As it can be seen that the prompt is still there and the fish_right_prompt.fish file contains the function from disco prompt.
- Activate
default prompt. Same issue.

Expected Behaviour
If a prompt.fish file doesn't include function fish_right_prompt(), fish_config prompt save should clear the fish_right_prompt.fish file.
Workaround
Activating a prompt using fish_config prompt choose prompt_name and then fish_config prompt save works as expected.

Issue
If I activate a prompt (which doesn't have a right prompt) using
fish_config prompt save prompt_name, thefish_right_prompt.fishstill contains the previous right prompt. Ideally it should be cleared or deleted.Test Envionment
Fish
fish, version 3.7.0from Ubuntu 24.04 repository as well asfish, version 3.7.1from the PPATerminal
TERM=xterm-256colorFresh Fish
sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= fish'doesn't fix it.Reproducing the problem
In the screenshot below:
discoprompt which has both left and right prompt. It gets activated correctly.pythonistaprompt which doesn't have a right prompt. As it can be seen that the prompt is still there and thefish_right_prompt.fishfile contains the function fromdiscoprompt.defaultprompt. Same issue.Expected Behaviour
If a
prompt.fishfile doesn't includefunction fish_right_prompt(),fish_config prompt saveshould clear thefish_right_prompt.fishfile.Workaround
Activating a prompt using
fish_config prompt choose prompt_nameand thenfish_config prompt saveworks as expected.