Well, I've been having quite a time of it with tab-triggered commands. From looking through the many existing bundles, I'm not surprised it took me this long to notice this bug(?), there are very very few commands that use tab triggers.
The problem is that a tab-triggered command will empty the line that I use the tab-trigger within when in fact the command is supposed to replace or alter the line in some way, not delete it.
I first noticed the behavior when using Mike Mellor's GTD2 bundle and at first thought that it was his scripts that weren't working on my system. After some back and forth communication between Mike and I, I was able to see that this problem happens with MOST commands that are tab-triggered.... MOST but not ALL. I could understand all of them not working, but most of the few that exist in the bundles I have active don't work while one does.
Here's a list of the commands and their bundles:
GTD2: delegate (python script) wait (python script) undo state change (python script) done (python script)
Objective-C: alloc (ruby script) super (doesn't seem to, but haven't the time to layout test code) (python script)
The one example that does work is...
Ruby: word_wrap() (ruby script)
The only common thread I can see is the path to the executable at the top of the shell script. The ones that fail all are shell scripts in which they define the path to the exec file at the top:
#!/usr/bin/env python #!/usr/bin/env ruby
But then, there are other scripts that AREN'T tab-triggered and also use shell scripts with the defined path that work.
I'm using TextMate Version 1.5.3 (1269) on OSX 10.4.8 on a 1GHz PowerPC G4 powerbook.
Any help narrowing this problem down would be greatly appreciated.
Thanks Mike
On 12. Oct 2006, at 22:24, Michael Gregoire wrote:
The problem is that a tab-triggered command will empty the line that I use the tab-trigger within when in fact the command is supposed to replace or alter the line in some way, not delete it.
So the problem is that effectively the script generate an empty result?
What if you select the command manually from the menu?
What if you change it from using /usr/bin/env to the direct path to the script interpreter?
What if you create a new account on your system and try it from there?
Yeah. The same result when choosing from the menu.
I'll check the other suggestions.
On Oct 12, 2006, at 6:23 PM, Allan Odgaard wrote:
On 12. Oct 2006, at 22:24, Michael Gregoire wrote:
The problem is that a tab-triggered command will empty the line that I use the tab-trigger within when in fact the command is supposed to replace or alter the line in some way, not delete it.
So the problem is that effectively the script generate an empty result?
What if you select the command manually from the menu?
What if you change it from using /usr/bin/env to the direct path to the script interpreter?
What if you create a new account on your system and try it from there?
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Well I tried all suggestions. Still not working.
On Oct 12, 2006, at 6:23 PM, Allan Odgaard wrote:
On 12. Oct 2006, at 22:24, Michael Gregoire wrote:
The problem is that a tab-triggered command will empty the line that I use the tab-trigger within when in fact the command is supposed to replace or alter the line in some way, not delete it.
So the problem is that effectively the script generate an empty result?
What if you select the command manually from the menu?
What if you change it from using /usr/bin/env to the direct path to the script interpreter?
What if you create a new account on your system and try it from there?
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 13. Oct 2006, at 01:44, Michael Gregoire wrote:
Well I tried all suggestions. Still not working.
Try make your own command with a scripting language, make it output something. Try it also with HTML output.
Also try write e.g. ‘date’ in a document and press ⌃R to execute that as a line.
If that works, try select these two lines and ⌃R:
#!/bin/sh date
If that works, then try it with one of the commands, etc.
Not sure why you're suggesting key-command based commands... I've already stated that those work fine.... it is specifically tab- triggered commands.
'date' ^R works fine as expected... so does the version with #!/bin/sh
I'll add that to a command and apply a tab-trigger to see how it works.
On Oct 13, 2006, at 8:49 AM, Allan Odgaard wrote:
On 13. Oct 2006, at 01:44, Michael Gregoire wrote:
Well I tried all suggestions. Still not working.
Try make your own command with a scripting language, make it output something. Try it also with HTML output.
Also try write e.g. ‘date’ in a document and press ⌃R to execute that as a line.
If that works, try select these two lines and ⌃R:
#!/bin/sh date
If that works, then try it with one of the commands, etc.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 13. Oct 2006, at 15:14, Michael Gregoire wrote:
Not sure why you're suggesting key-command based commands... I've already stated that those work fine.... it is specifically tab- triggered commands.
In that case try change the tab trigger to a key equivalent and see if that changes the outcome.
Though you replied that “none of my suggestions worked” where one of them was selecting the item via the menu, so I don’t see how you established it had to do with tab triggers.
I know... it's just that I've only had problems with commands that are tab triggered. But as you'll see in my other response just sent previously, it seems that tab-triggers are definitely not the problem.
Something about those specific commands isn't working.
On Oct 13, 2006, at 9:23 AM, Allan Odgaard wrote:
On 13. Oct 2006, at 15:14, Michael Gregoire wrote:
Not sure why you're suggesting key-command based commands... I've already stated that those work fine.... it is specifically tab- triggered commands.
In that case try change the tab trigger to a key equivalent and see if that changes the outcome.
Though you replied that “none of my suggestions worked” where one of them was selecting the item via the menu, so I don’t see how you established it had to do with tab triggers.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Well I applied the following to a command:
#!/bin/sh date
and set it to:
Input: None Output: Replace Selected Text
with a tab trigger of 'date'.
No problem. I also tried it with output set to "Insert as Text" and it worked.
So there doesn't seem to be any issue with tab-triggered commands... it seems to be certain scripts... but I can't tell what the common thread is between those scripts that separates them from the rest that do work.
I do know that no key-command triggered commands are a problem.
On Oct 13, 2006, at 8:49 AM, Allan Odgaard wrote:
On 13. Oct 2006, at 01:44, Michael Gregoire wrote:
Well I tried all suggestions. Still not working.
Try make your own command with a scripting language, make it output something. Try it also with HTML output.
Also try write e.g. ‘date’ in a document and press ⌃R to execute that as a line.
If that works, try select these two lines and ⌃R:
#!/bin/sh date
If that works, then try it with one of the commands, etc.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate