Some time ago, someone posted a message about a runtime error with bundles. The problem was never resolved in the mailing list, but perhaps it was outside the list...
I'm seeing the same problem. Whenever I try to execute a python script within TextMate using <command>r, I see this error:
csh: setenv: Too many arguments. /bin/bash: line 2: : command not found
My default shell for my terminal sessions is tcsh, not bash. If that's any help...
The very same script executes fine in a terminal window. If I execute from TextMate using the Bundle -> Run Script (terminal), it works fine. If I just execute the script in a terminal window, it works fine. Open the script in BBEdit, and execute via the #! menu and it works fine.
Similarly, perl scripts return the same dumb error, yet work fine elsewhere.
I updated all my bundles with subversion, per the help file. I added /Library/Application Support/TextMate/ and /Library/Application Support/TextMate/Bundles like the instructions indicated, and then added the bundles I expect to use.
Perhaps someone can tell me the error I've made. Until then, back to BBEdit...
TextMate version 1.5.6, Mac OS X 10.4.10, MacBook Pro.
--
Richard Brosnahan Editor in Chief Broz News http://broznews.org
I have never let my schooling interfere with my education. Mark Twain, author
Last time someone had a similar-sounding problem, it was because they had something in their .tcshrc that failed when the current working directory was not the home directory. The easy way to test for this is to rename your .tcshrc so that tcsh can't find it, and see if the problem goes away.
If that works, go through your .tcshrc and try to find the mistake. If you can't, then post it here, and I'm sure one of us will be able to help.
Robin
Son of a gun! You are correct. Thank you for the suggestion!
I renamed the .tcshrc file so it would not load, and now TM will execute the python and perl stuff just fine using <command>r.
I've tried to debug this file, but never found anything wrong with it. Indeed, all environment variables and set variables load fine. It certainly doesn't bail out before reaching the end. Is it possible that this sets a variable that TM doesn't expect?
Here is the script (I am sure the mail server will wrap lines where they are not really wrapped). I would be grateful if someone would point out my mistakes.
#!/bin/tcsh setenv CVSROOT "/usr/local/cvsroot" setenv PYLIB /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5 setenv JAVA_HOME /Library/Java/Home setenv ANT_HOME /usr/local/ant setenv PATH /usr/local/ant/bin:$PATH setenv MYSQL_HOME /usr/local/mysql setenv PATH /usr/local/mysql/bin:$PATH setenv EDITOR "/Users/broz/bbeditshell.sh" setenv PYTHONDOCS /Developer/Documentation/Python
# for subversion setenv PATH /usr/local/bin:$PATH setenv LC_CTYPE "en_US.UTF-8" setenv LANG "en_US.UTF-8"
# for darwinPorts
setenv PATH /opt/local/bin:/opt/local/sbin:$PATH # for X11 # setenv DISPLAY :0.0
# for ctags alias btags '/usr/local/bin/ctags --excmd=number --tag-relative=no --fields=+a+m+n+S -R `pwd`'
# source /usr/share/tcsh/examples/rc
# history stuff # does not work. wish it did # set savehist=(99 merge) # set autolist # bindkey -k page-down history-search-forward # bindkey -k page-up history-search-backward # history keys # bind '"M-e": history-search-backward' # bind '"M-r": history-search-forward' # Setting PATH for MacPython 2.5 # The orginal version is saved in .cshrc.pysave
set path=(/Library/Frameworks/Python.framework/Versions/Current/bin $path)
# according to http://tcshrc.sourceforge.net/, # I'm supposed to add this line due to a bug source $HOME/.tcshrc.local
some time around 7.8.2007 3:51 PM, someone named Robin Houston at robin.houston@gmail.com typed these words:
Last time someone had a similar-sounding problem, it was because they had something in their .tcshrc that failed when the current working directory was not the home directory. The easy way to test for this is to rename your .tcshrc so that tcsh can't find it, and see if the problem goes away.
If that works, go through your .tcshrc and try to find the mistake. If you can't, then post it here, and I'm sure one of us will be able to help.
Robin
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 7/8/07, Richard Brosnahan broz@mac.com wrote:
Here is the script (I am sure the mail server will wrap lines where they are not really wrapped). I would be grateful if someone would point out my mistakes.
Ah, okay. I think it's the oldest mistake in the book: not quoting your strings. (That works fine until the value of a variable contains a space.)
For example, change setenv PATH /usr/local/ant/bin:$PATH to setenv PATH "/usr/local/ant/bin:$PATH" and similarly with the other strings.
I imagine that's the problem: I'm guessing that the value of $PATH from within TextMate has a space in it. (Perhaps the path to your Textmate.app contains a space?)
Robin
That did it. While none of the paths within .tcshrc had a space, there is a space in the path to TextMate. I quoted all the path strings in .tcshrc, and verified the other startup scripts were properly quoted. Fixed it right up.
Thanks very much for helping me straighten this out.
I'm kinda surprised this didn't affect other applications on my system. I am glad to get it sorted out.
some time around 7.9.2007 4:04 AM, someone named Robin Houston at robin.houston@gmail.com typed these words:
On 7/8/07, Richard Brosnahan broz@mac.com wrote:
Here is the script (I am sure the mail server will wrap lines where they are not really wrapped). I would be grateful if someone would point out my mistakes.
Ah, okay. I think it's the oldest mistake in the book: not quoting your strings. (That works fine until the value of a variable contains a space.)
For example, change setenv PATH /usr/local/ant/bin:$PATH to setenv PATH "/usr/local/ant/bin:$PATH" and similarly with the other strings.
I imagine that's the problem: I'm guessing that the value of $PATH from within TextMate has a space in it. (Perhaps the path to your Textmate.app contains a space?)
Robin
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
--
Richard Brosnahan Editor in Chief Broz News http://broznews.org
Small opportunities are often the beginning of great enterprises. Demosthenes, statesman