This repo is now archived! If you find any bugs, please open an issue in withfig/fig
Yes, the name fig comes from configuration
Fig's configuration files are located in the ~/.fig
directory.
The config directory is structured like so:
autocomplete/ | autocomplete completion specs. See withfig/autocomplete |
apps/ | installed Fig apps. See withfig/fig-apps |
team/ | reserved for team apps, runbooks, and completion specs. Not tracked by git |
tools/ | config scripts e.g. installation, onboarding, uninstallation... |
user/ | reserved for individual user apps, runbooks, and completion specs. Not tracked by git |
fig.sh | establishes Fig's shell and env variables. This file is sourced on every new shell session. See below |
Fig sources the fig.sh script
by adding the following line of code to your .bashrc
, .zshrc
, .zprofile
, .profile
, and .bash_profile
[ -s ~/.fig/fig.sh ] && source ~/.fig/fig.sh
Why do we source fig.sh
in so many dotfiles? In order to get context on your Terminal (e.g. current working directory), we need to source Fig for each new shell session, not just Terminal session. e.g. if you open a new terminal, and switch between bash and zsh shells.
Sourcing fig.sh
takes around 9ms. We use conditionals to make sure the script is only run once . If you haven't started a new shell session in a while, it could take up to 200ms. But afterwards will go back to 9ms.