I want to start a particular fish instance with a specific config.fish.

Something along the lines of the Bash --rcfile option.

I'm aware of the XDG_CONFIG_HOME variable. But I just want to switch the config for fish. Not for other programs using XDG I would run from that fish instance.

  • here's a hack: temporarily swap out the config file: cd ~/.config/fish; mv config.fish config.fish~; ln my.other.config.fish config.fish; fish &; mv config.fish~ config.fish; fg Feb 20, 2018 at 14:28

1 Answer 1


Apparently, the --init-command=COMMANDS startup option was added in fish 2.7

Something along the line of that should do the trick:

 fish --init-command='source /path/to/alternate/fish.config'

But I'm unable to test since we are using here fish 2.4.0. Maybe is there a workaround?

  • 1
    Note that --init-command does not suppress reading the default config file. Feb 20, 2018 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .