Skip to content

Instantly share code, notes, and snippets.

@hezi
Created May 15, 2012 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hezi/2699753 to your computer and use it in GitHub Desktop.
Save hezi/2699753 to your computer and use it in GitHub Desktop.
Open in finder the directory of an app running in simulator
# Usage: add to your .bashrc / .zshrc / whatever
# run like this - appdir <appname>
appdir() {
ps ax | grep $1.app | grep -v grep | awk '{print "\""$5" "$6" "$7"\""} ' | sed "s/$1\.app\/$1//g" | xargs open
}
@hezi
Copy link
Author

hezi commented May 15, 2012

This is probably the least efficient way to do this, but it works.

@YoniTsafir
Copy link

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment