Created
March 30, 2012 10:46
-
-
Save dunkelstern/2250729 to your computer and use it in GitHub Desktop.
xed "reimplementation" to fix broken Xcode 4 xed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "-l" ] || [ "$1" = "--line" ] ; then | |
line=$2 | |
file=$3 | |
else | |
line=1 | |
file=$1 | |
fi | |
osascript &>/dev/null <<EOF | |
tell application "Xcode" | |
open "$file" | |
activate | |
tell application "System Events" | |
tell process "Xcode" | |
keystroke "l" using command down | |
repeat until window "Jump" exists | |
end repeat | |
click text field 1 of window "Jump" | |
set value of text field 1 of window "Jump" to "$line" | |
keystroke return | |
end tell | |
end tell | |
end tell | |
EOF |
In new versions of Xcode, the "Jump" window is now called "Open Quickly". With that change this script works fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning: