Created
March 26, 2013 13:06
-
-
Save sos4nt/5245210 to your computer and use it in GitHub Desktop.
Semantic history command for iTerm2 and Sublime Text 3. In iTerm's Preferences > Profiles > Default > Advanced > Semantic History, choose "Run command..." and enter "/your/path/to/iterm_open_with \1 \2".
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 | |
file "$1" | grep -q "text" | |
if [ $? -ne 0 ]; then | |
/usr/bin/open $1 | |
else | |
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $1:$2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment