Author: Kyle Fuller <kyle@mentallyfriendly.com> 2013-11-03 13:24:52 +0000 +0000
Committer: Kyle Fuller <kyle@mentallyfriendly.com> 2013-11-03 13:24:52 +0000 +0000
Commit: 55a2e012199aa38fc26083603513acf33c26d51d
Parent: b3338a8daf28860e6a4485ef86865ccfc6437922
Include the `openx` command thanks to @orta
diff --git a/.rc b/.rc
index 1c97e1bfc6061246c766524140c5446cf7d9bfe5..0c2b0b016755b5197f2dfd6d73223ed00580f329 100644
--- a/.rc
+++ b/.rc
@@ -16,6 +16,20 @@ python -mjson.tool <<< "$*" | pygmentize -l javascript
fi
}
+openx () {
+ # http://orta.github.io/rebase/on/opening-xcode-projects-and-workspaces/
+
+ if test -n "$(find . -maxdepth 1 -name '*.xcworkspace' -print -quit)"; then
+ open *.xcworkspace
+ else
+ if test -n "$(find . -maxdepth 1 -name '*.xcodeproj' -print -quit)"; then
+ open *.xcodeproj
+ else
+ echo "No Xcode workspace or project found"
+ fi
+ fi
+}
+
alias v=$EDITOR
alias gdiff='git diff | $EDITOR -R -'