Often when I’m editing my fish config, I want to test out my new config.
I can always run
fish to run a new fish shell, which mostly works,
but when I want to exit (possibly quite some time later), I go back to the
original shell (without the latest config).
>*)))>< <*)))>< "how is your posture?" $ fish >*)))>< <*)))>< "how is your posture?" $ # (here I hit control-d to exit) $ # <- but I'm back to the prompt of the original shell
(yes, my prompt asks me to think about my posture. Yes, I have completely tuned it out.)
It’s a minor annoyance but luckily there’s a way to fix this behaviour:
exec fish instead of
fish. This will use
to replace the original
fish process with the new one.
>*)))>< <*)))>< "how is your posture?" $ exec fish >*)))>< <*)))>< "how is your posture?" $ # at this point, sending control-d will close the shell.
For ease of running this, I have an abbr to expand
Now when I want to test out my new fish config, I just hit
and I’m in the new shell!