Created
August 10, 2016 14:35
-
-
Save jpbochi/5a9d30eef1497c0efdfa9110b370ebc8 to your computer and use it in GitHub Desktop.
iterm-open.sh
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/sh | |
# copied from https://gist.github.com/sos4nt/5245210 | |
# In iTerm's Preferences > Profiles > Default > Advanced > Semantic History, | |
# choose "Run command..." and enter "/your/path/to/iterm_open_with \1 \2". | |
file "$1" | grep -q "text" | |
if [ $? -ne 0 ]; then | |
/usr/bin/open $1 | |
else | |
/usr/local/bin/atom $1:$2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment