I have recently moved to fish from bash. I'm immediately in love with the out-of-the-box functionality, but I'm a little bit at a loss when it comes to configuring the shell.
On startup, Fish evaluates a number of configuration files...
- Configuration snippets in files ending in .fish, in the directories:
- User initialization, usually in
So far, this is clear to understand. Coming from bash, I took my
.bash_aliases files, rewrote them a little bit according to fish's syntax, placed them into the
~/.config/fish/conf.d/ and they are loaded as expected.
However, when I looked over the contents of the
config.fish file, I couldn't figure out anything that would need to be put there. To my understanding, fish is designed to work already out of the box, so the usual bash config like setting
HISTCONTROL isn't necessary. Nor are the
conf.d/ files called from some main script (like the
.bash_aliases, etc., would be in
.bashrc) - they're loaded automatically.
Is there some particular use case where
config.fish is preferred - or even required - over
conf.d/ files? So far, I would say individual files are cleaner to read, maintain and move between hosts. Is there some convention that's recommended to follow? Was there a specific motivation behind allowing so many levels of config, aside from giving users more freedom?