From: Justin Collins Date: 2013-03-06T15:48:59+09:00 Subject: Re: Shellwords.escape works incorrect under windows On 03/05/2013 07:38 PM, Leonid Shagabutdinov wrote: > I didn't found where to post bug reports, so I decide to start new > topic. > > Shellwords.escape works incorrect under windows (tested for Windows 7 > x64), here is example: > > > Actual result: > > irb(main):001:0> require 'shellwords' > => true > > irb(main):002:0> `echo #{Shellwords.escape( '123>' )} test` # should > echo "123> test", but echo nothing > => "" > > irb(main):003:0> File.read( 'test' ) # but writes file "test" > => "123\\\n" > > > Expected result: > > irb(main):001:0> `echo 132^> test` # the correct escape sequence, echoed > "123> test" > => "132> test\n" > > > I didn't found github or any repository for Shellwords, so I can't > create issue in right place. Is there any place where issues for > stdlibs/corelibs are located? > You can report issues here: https://bugs.ruby-lang.org/ The code for shellwords is here: https://github.com/ruby/ruby/blob/trunk/lib/shellwords.rb Looks like it is explicitly for Bourne shells, with no consideration for Windows. On the upside, it is just Ruby so should be easy to add what you need. -Justin