Skip to content

Commit

Permalink
Show current file and line number on Trac
Browse files Browse the repository at this point in the history
Useful for sending someone a quick link to a WordPress function. Find
the point you want to show, and hit ^⌥⌘T… Safari will open to that file
and line number on Trac.

Caveat: Targets Trunk on Trac, not the current tag as I couldn't work
out a var which set the current WordPress version.
  • Loading branch information
Simon Wheatley committed Sep 28, 2011
1 parent f623e53 commit 4fd1b9c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Commands/Show on Trac Browser.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>WP_FILEPATH=${TM_FILEPATH/$TM_PROJECT_DIRECTORY/}
open "http://core.trac.wordpress.org/browser/trunk/${WP_FILEPATH}#L${TM_LINE_NUMBER}"</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>^~@t</string>
<key>name</key>
<string>Show on Trac Browser</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
<string>source.php</string>
<key>uuid</key>
<string>2D72F453-25D4-4E8B-A261-349E4DD51BEA</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
<string>44364A1D-3D5B-4390-A6D1-B9829E85EA09</string>
<string>963B0E20-263D-4061-A234-5BB25D5E32AC</string>
<string>82DC3B5F-F92A-493B-83D5-E4889A0F859C</string>
<string>2D72F453-25D4-4E8B-A261-349E4DD51BEA</string>
<string>A1C4E1EB-3D73-47F6-9C7A-311E037BC1D8</string>
<string>300F43EB-449E-416C-9DB9-330F6EF32AEF</string>
<string>F893B083-1745-461A-8762-66F72FC5ACD7</string>
Expand Down

0 comments on commit 4fd1b9c

Please sign in to comment.