Created
September 29, 2014 12:05
-
-
Save ricardobeat/01245b5b6eaeb1821c6c to your computer and use it in GitHub Desktop.
git-open - open all modified files
This file contains hidden or 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/bash | |
# | |
# Open all changed files in Sublime Text | |
# | |
# Install: | |
# save this file to /usr/local/bin/git-open | |
# chmod +x /usr/local/bin/git-open | |
# | |
# It will now be available as 'git open' | |
# | |
prefix=$(git rev-parse --show-prefix) | |
subl $(git diff --name-only HEAD | sed "s,$prefix,," | tr '\n' ' ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
was receiving this error:
sed: first RE may not be empty
My change: