# Shellwords alias bug?

**URL:** <https://www.ruby-forum.com/t/shellwords-alias-bug/125803>\
**Category:** Development\
**Created:** [January 12, 2008, 5:46am UTC](https://www.ruby-forum.com/t/shellwords-alias-bug/125803 "2008-01-12T05:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masahiro\_Kawato](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Masahiro\_Kawato](https://www.ruby-forum.com/u/Masahiro_Kawato)\
**Post date:** [January 12, 2008, 5:46am UTC](https://www.ruby-forum.com/t/shellwords-alias-bug/125803/1 "2008-01-12T05:46:00Z")

</div>

e$B@n8M$H?=$7$^$9!#e(B

Ruby 1.9.0  
e$B$Ne(Bshellwordse$B%i%$%V%i%j$K%P%0$i$7$-$b$N$r8+$D$1$?$N$G!"Js9p$7$^$9!#e(B

lib/shellwords.rb e$B$NCf$G!"e(BShellwords.escape e$B$,e(B  
Shellwords.shellsplit e$B$NJLL\>e(B  
e$B$H$7$FDj5A$5$l$F$$$^$9$,!"K\Mh$Oe(B Shellwords.shellescape  
e$B$NJLL\>$,@5$7$$$N$G$Oe(B  
e$B$J$$$G$7$g$&$+!)e(B

$ ruby -v  
ruby 1.9.0 (2007-12-25 revision 14709) [i686-linux]

$ irb  
irb(main):001:0\> require ‘shellwords’  
=\> true  
irb(main):002:0\> Shellwords.shellescape(‘test string’)  
=\> “test\ string”  
irb(main):003:0\> Shellwords.escape(‘test string’)  
=\> [“test”, “string”]

trunke$B$G$b=$@5$5$l$F$$$J$$$h$&$J$N$G!"0l1~%Q%C%A$r:n$C$F$\_$^$7$?!#e(B

# Index: lib/shellwords.rb

— lib/shellwords.rb (revision 15003)  
+++ lib/shellwords.rb (working copy)  
@@ -86,7 +86,7 @@  
module\_function :shellescape

class \<\< self

- alias escape shellsplit

- alias escape shellescape  
end

#
