Filed under: development | Tags: E-TextEditor, Team Foundation Server, TFS, Visual Studio
As well as letting you create bundles in all the languages Textmate provides (Python, Ruby, shell scripts) E also provides “Windows Native” bundles, making it easier to run native windows apps from your bundles.
It’s not very well documented however, and I wanted to be able to check out a file from TFS directly, without having to swap into Visual Studio to do it. Below is the very simple bundle command I came up with to do that.
@for /f %%P in ('c:\cygwin\bin\cygpath.exe -w %TM_FILEPATH%') do @set FILEPATH=%%P @"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" edit %FILEPATH%
Looks fairly simple, but there are a couple of things to note:
Firstly you have to use DOS shell variable syntax for $TM_FILEPATH, change it to %TM_FILEPATH%. This variable is also presented as a cygwin path, which needs converting to a windows path. The first line in the command takes the output from Cygwin’s “cygpath” and assigns it to the FILEPATH variable. Note the doesble %% on the intermidiate variable as well. You normally just use a single % when running from the command line, but in this instance you need 2.
That’s all there is to it, I’d love to see what others have come up with to integrate TFS into E, post a comment and let me know …
Leave a Comment so far
Leave a comment