Cross-platform (macOS + Linux) dotfiles, checked out to ~/src/github.com/fredsmith/dotfiles/.
CONFIGDIR— points to this repo checkoutXDG_CONFIG_HOME— set to$CONFIGDIR- Always reference
$CONFIGDIRor$XDG_CONFIG_HOMEinstead of the full path - Never hard-code usernames or absolute paths — this repo runs on multiple systems with different usernames
Functions, aliases, and tool-specific config go in dedicated conf.d/ files, not in top-level rc files:
| Shell | Location | Naming |
|---|---|---|
| fish | fish/conf.d/<tool>.fish |
e.g. fish/conf.d/aws.fish |
| bash | bash/<tool> |
e.g. bash/aws |
| zsh | zsh/<tool>.zsh |
e.g. zsh/kubectl.zsh |
The top-level config files (bashrc, zshrc, fish/config.fish) should only contain:
- Sourcing/loading of conf.d files
- Core shell settings (prompt, history, key bindings)
CONFIGDIR/XDG_CONFIG_HOMEsetup
Police these files. Tools frequently append lines to rc files during installation. When you see tool-specific additions (PATH modifications, eval statements, completions, aliases) in bashrc, zshrc, or fish/config.fish, move them to the appropriate conf.d/ file.
Because XDG_CONFIG_HOME points here, many tools auto-create files and directories in this repo. Aggressively .gitignore them. Only track files that:
- Provide value to sync across systems
- Can be manually edited/configured
- Do not contain secrets
When in doubt, add it to .gitignore.
The goal is to keep config in sync across systems and reduce setup time on new machines. Before making changes:
- Offer to pull latest (
git pull) to avoid conflicts - After changes, offer to commit and push so other systems can pick them up