Skip to content

Instantly share code, notes, and snippets.

@karmacoma-eth
Last active February 26, 2024 11:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karmacoma-eth/f3e2cb7b963191f5a8a0aac1e73c4c87 to your computer and use it in GitHub Desktop.
Save karmacoma-eth/f3e2cb7b963191f5a8a0aac1e73c4c87 to your computer and use it in GitHub Desktop.
foundryup script
# from https://twitter.com/0xYYY_/status/1562091599731228672
# put this before `source $ZSH/oh-my-zsh.sh`
FOUNDRY_PLUGIN_DIR=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/foundry
fpath+=$FOUNDRY_PLUGIN_DIR
fup () {
if ! command -v foundryup &> /dev/null
then
echo "Install foundryup first: https://getfoundry.sh"
else
foundryup "$@"
mkdir -p $FOUNDRY_PLUGIN_DIR
anvil com zsh > $FOUNDRY_PLUGIN_DIR/_anvil
cast com zsh > $FOUNDRY_PLUGIN_DIR/_cast
forge com zsh > $FOUNDRY_PLUGIN_DIR/_forge
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment