Ah, yes, that works with a decent shell, like bash, but it doesn't work in the stinkin' Windows cmd.exe. This works:
#!bash.exe echo "$TM_SELECTED_TEXT" | sass-convert --from sass --to scss --stdin But that's because I've got bash in my Windows PATH courtesy of MSysGit. I was trying to avoid that dependency. Charles On 4 August 2010 00:35, Chris Eppstein <ch...@eppsteins.net> wrote: > Silly rubyist, some things are better done with shell :P > Try this for your command body: > > echo "$TM_SELECTED_TEXT" | sass-convert --from sass --to scss > > Chris > On Tue, Aug 3, 2010 at 4:25 PM, Charles Roper <reac...@charlesroper.co.uk> > wrote: >> >> Hi, >> >> Is it possible to pass a string to SassConvert? I can do something like >> this: >> >> require 'rubygems' >> require 'haml/exec' >> STDIN = ENV['TM_SELECTED_TEXT'] >> opts = Haml::Exec::SassConvert.new(%w{--from sass --to scss --stdin}) >> opts.parse! >> >> But that gives me a warning about STDIN already being defined. Is >> there a more elegant way to approach this? >> >> TM_SELECTED_TEXT contains this: "body\n font-family: >> $base_font_family\n color: $cat_shadow" >> >> Cheers, >> Charles >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Haml" group. >> To post to this group, send email to h...@googlegroups.com. >> To unsubscribe from this group, send email to >> haml+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/haml?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to h...@googlegroups.com. > To unsubscribe from this group, send email to > haml+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to h...@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.