1 2 3 4 5 6 7 8 9
#!/bin/sh BOLD='\033[1;36m' NC='\033[0m' printf "${BOLD}[PRE-COMMIT]${NC} formatting code...\n" cargo +nightly fmt --all git add -u printf "${BOLD}[PRE-COMMIT]${NC} linting...\n" cargo clippy