Added cd to active Xcode project to osx plugin

This commit is contained in:
drootang 2017-01-24 09:01:47 -05:00
commit 1f56eabbee
2 changed files with 14 additions and 0 deletions

View file

@ -160,6 +160,15 @@ function pfs() {
EOF
}
function xcodeprojdir() {
dirname $(osascript 2>/dev/null <<EOF
tell application "Xcode"
return path of active workspace document
end tell
EOF
) 2>/dev/null
}
function cdf() {
cd "$(pfd)"
}
@ -168,6 +177,10 @@ function pushdf() {
pushd "$(pfd)"
}
function cdx() {
cd "$(xcodeprojdir)"
}
function quick-look() {
(( $# > 0 )) && qlmanage -p $* &>/dev/null &
}