https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782020-03-29T04:59:38ZRuby Issue Tracking SystemRuby master - Feature #16741: Implement Shellwords.shellescape correctly for Windowshttps://bugs.ruby-lang.org/issues/16741?journal_id=848032020-03-29T04:59:38Zznz (Kazuhiro NISHIYAMA)
<ul></ul><p>I think adding <code>Shellwords.cmdescape</code> is better than changing <code>Shellwords.shellescape</code>.</p>
<p>Some environments on Windows support both bash and cmd.</p> Ruby master - Feature #16741: Implement Shellwords.shellescape correctly for Windowshttps://bugs.ruby-lang.org/issues/16741?journal_id=848042020-03-29T05:17:55Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>I agree with <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/14">@znz (Kazuhiro NISHIYAMA)</a>. IMO, a gem named <code>cmdwords</code> or something would be a good start for the feature instead of directly extending <code>shellwords</code>.</p> Ruby master - Feature #16741: Implement Shellwords.shellescape correctly for Windowshttps://bugs.ruby-lang.org/issues/16741?journal_id=848052020-03-29T06:07:40Zsawa (Tsuyoshi Sawada)
<ul><li><strong>Subject</strong> changed from <i>Implement Shellwords.shellescape correctly on Windows</i> to <i>Implement Shellwords.shellescape correctly for Windows</i></li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/84805/diff?detail_id=56712">diff</a>)</li></ul> Ruby master - Feature #16741: Implement Shellwords.shellescape correctly for Windowshttps://bugs.ruby-lang.org/issues/16741?journal_id=848062020-03-29T07:54:05Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>I'm curious for what purpose you need to escape paths.<br>
To pass it to another program, it is better to <code>spawn</code> or <code>system</code> with split array.</p>