Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # In iTerm's Preferences > Profiles > Default > Advanced > Semantic History,
- # choose 'Run command...' and enter '/your/path/to/iterm_open_project "\1" "\2" "\3" "\4" "\5"'.
- FILENAME=${1}
- LINE_NUMBER=${2:-0}
- TEXT_BEFORE_CLICK=${3}
- TEXT_AFTER_CLICK=${4}
- PWD=${5}
- if [[ "$PWD" -ef ~/Projects/WEB-STROM-PROJECT ]]; then
- /usr/local/bin/webstorm "$PWD" --line "$LINE_NUMBER" "$FILENAME"
- exit 0
- fi
- file "$FILENAME" | grep -q "text"
- if [ $? -eq 0 ]; then
- /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl "$FILENAME":"$LINE_NUMBER"
- exit 0
- fi
- /usr/bin/open "$FILENAME"
Add Comment
Please, Sign In to add comment