[TxMt] Re: Spaces in the path/to/TextMate.app

Matt Neuburg matt at tidbits.com
Fri Jul 24 23:53:50 UTC 2009

On 7/24/09 4:13 PM, in article
8C7F4FD1-DB7A-4B8B-9D4C-52F66E12C257 at gmail.com, "Timothy Bates"
<timothy.c.bates at gmail.com> wrote:

> hmm.
> I'm guessing many people will have a space in the path.
> is it not feasible to just pass the path once through
> escapeshellarg()  or escapeshellcmd() (or whatever they are in Ruby)
> at the top of the script?
> i.e.,
> $rawPath = "s pa ce";
> $Path = escapeshellcmd($rawPath);

Yeah, in other words you're telling me that I just have to suck it up. Well,
that's what I'm trying to do...! :)

What really caught me with my pants down is that in Ruby, a path used in
IO.popen has to receive explicit escaping, although a path used in (say)
"require" does not. However, I believe my pants are now back up again.

I did notice, though, doing a Google search on stuff like "TextMate space
pathname", that I'm not the only person ever to encounter this issue.


matt neuburg, phd = matt at tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!

More information about the textmate mailing list