-
Notifications
You must be signed in to change notification settings - Fork 87
Scripting your freshrc file
Odin Dutton edited this page Aug 19, 2013
·
6 revisions
You can use all your usual shell programming constructs in your .freshrc
allowing you to do things like the below.
if [[ "$(uname)" == "Darwin" ]]; then
fresh systems/darwin.sh
fi
if [[ "$(hostname -s)" == "myhost" ]]; then
fresh systems/myhost.sh
fi
e.g. You might want your git user.name
and user.email
to be set differently at work and at home.
fresh-options --file=~/.gitconfig
fresh git/gitconfig.$(hostname -s)
fresh git/gitconfig
fresh-options
for REPO in tpope/vim-{pathogen,liquid,rsi}; do
fresh $REPO . --file=~/.vim/bundle/$(basename $REPO)/
done
You may wish to silently ignore missing files when scripting your freshrc. You can use the --ignore-missing
to do so.
fresh zsh/$PROFILE --file=~/.zshrc --ignore-missing