-
-
Save irlabs/66bb0868825ddd4fb7e4f721cf69f0d5 to your computer and use it in GitHub Desktop.
xed "reimplementation" to fix broken Xcode 4 xed
This file contains 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 "Open Quickly" exists | |
end repeat | |
click text field 1 of window "Open Quickly" | |
set value of text field 1 of window "Open Quickly" to "$line" | |
keystroke return | |
end tell | |
end tell | |
end tell | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment