[SVN] Re: Escaping Ruby string for $DIALOG parmeters

Allan Odgaard mailinglist at textmate.org
Tue Jan 19 13:19:52 UTC 2010


On 15 Jan 2010, at 16:55, textmate at jxpx777.otherinbox.com wrote:

> I've posted this to StackOverflow http://stackoverflow.com/questions/2072797/escaping-a-ruby-string-for-textmates-dialog-command 
>  but since it is specifically related to bundle development, I  
> wanted to ask here as well in case anyone has thoughts about how to  
> reliably escape a Ruby string for passing into $DIALOG. I have some  
> arbitrary strings that I need to pass in as parameters and right  
> now, I am having a frustrating time trying to get those strings  
> escaped in a way that works reliably with the $DIALOG command. Feel  
> free to respond here or on SO, and I apologize for the "double" post.

You can require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"

Then use ‘e_sh «variable»’ e.g.: %x{ "$DIALOG" nib --load #{e_sh path}}




More information about the textmate-dev mailing list