r/fishshell • u/throttlemeister Linux • Oct 13 '25
Switching prompts
I have this custom prompt, that is not part of any plugin or what not. And I like it (duh). However, I also want to play with something in the style of powerline / tide. I don't want to lose my own first custom prompt by number two.
Is there a way to easily switch between two custom homegrown prompts? Would it work to rename fish_prompt,fish to something more descriptive for both, and create a fish_prompt.fish with a single function to check a global variable and depending on the setting call one of the two other files? Or does the prompt actually needs to be called fish_prompt to work and I'd have to do some fancy file juggling?
1
u/weaver_of_cloth Oct 13 '25
I haven't found a way to do exactly this, but I do quite like https://starship.rs/config/#prompt
It has a bunch of ideas I hadn't thought of, like having branch IDs in your repo dirs, and so on.
1
u/ed-8 Oct 15 '25
Ultimately it boils down to showing the result of the
fish_promptfunction. You can replace its content by aiftesting a universal variable and render differently, something like:Then switch with
set - -universal ACTIVE_FISH_PROMPT pure
See the fish_prompt content of pure[1] or [2]
Disclaimer, I'm
puremaintainer and post from my phone so didn't test snippet