Skip to content

Instantly share code, notes, and snippets.

@YoniTsafir
Last active December 28, 2015 03:09
Show Gist options
  • Save YoniTsafir/7433054 to your computer and use it in GitHub Desktop.
Save YoniTsafir/7433054 to your computer and use it in GitHub Desktop.
A bash function that takes you to the directory of an app running in iOS SImulator. Add to your bash aliases file. Usage: appdir <AppName>
appdir() {
dir=$(ps ax | grep $1.app | grep -v grep | grep -v AppCode | awk '{print "\""$5" "$6" "$7"\""} ' | sed "s/$1\.app\/$1//g")
eval cd "$dir"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment