-
-
Save nealrs/7e03deca545fdb2303b7 to your computer and use it in GitHub Desktop.
SpotGIT :: Add Spotify status to commit messages [OSX]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# | |
# Thanks to this SO thread: http://stackoverflow.com/questions/5894946/how-to-add-gits-branch-name-to-the-commit-message | |
# and this awesome shell/applescript from @cpu: https://github.com/binaryparadox/SpotifyInfo/blob/master/spotifyInfo | |
# I was able to write a git hook that appends current Spotify status to your commit messages (in OSX). It's a fun hack. | |
# Download @cpu's script and note the path, plug it in below and add this hook to your main .git/hooks directory, or do it on a project by project basis | |
echo $(cat "$1")' | spotify: '$(~/path/to/spotifyInfo all) > "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script could be improved with better handling for multiline messages.
Oh - and here's a preview of the console output: