# zsh で exit 時に git commit する ```sh ## Commit on exit commit_on_exit() { cd ~/.dotfiles git add .zsh-history git commit -m "Auto commit .zsh-hitory" } trap commit_on_exit EXIT ```