U:RDoc::NormalModule[iI"Shellwords:EF@0o:RDoc::Markup::Document: @parts[o;;['S:RDoc::Markup::Heading: leveli: textI"3Manipulates strings like the UNIX Bourne shell;To:RDoc::Markup::BlankLineo:RDoc::Markup::Paragraph;[I"IThis module manipulates strings according to the word parsing rules ;TI"of the UNIX Bourne shell.;T@o; ;[I"GThe shellwords() function was originally a port of shellwords.pl, ;TI"Ibut modified to conform to the Shell & Utilities volume of the IEEE ;TI"'Std 1003.1-2008, 2016 Edition [1].;T@S; ; i; I" Usage;T@o; ;[I"QYou can use Shellwords to parse a string into a Bourne shell friendly Array.;T@o:RDoc::Markup::Verbatim;[ I"require 'shellwords' ;TI" ;TI"3argv = Shellwords.split('three blind "mice"') ;TI")argv #=> ["three", "blind", "mice"] ;T: @format0o; ;[I"COnce you've required Shellwords, you can use the #split alias ;TI"String#shellsplit.;T@o;;[I"*argv = "see how they run".shellsplit ;TI",argv #=> ["see", "how", "they", "run"] ;T;0o; ;[I"2Be careful you don't leave a quote unmatched.;T@o;;[I">argv = "they all ran after the farmer's wife".shellsplit ;TI"9 #=> ArgumentError: Unmatched double quote: ... ;T;0o; ;[I"IIn this case, you might want to use Shellwords.escape, or its alias ;TI"String#shellescape.;T@o; ;[I"RThis method will escape the String for you to safely use with a Bourne shell.;T@o;;[I"/argv = Shellwords.escape("special's.txt") ;TI" argv #=> "special\\'s.txt" ;TI"system("cat " + argv) ;T;0o; ;[I"LShellwords also comes with a core extension for Array, Array#shelljoin.;T@o;;[I"argv = %w{ls -lta lib} ;TI"system(argv.shelljoin) ;T;0o; ;[I"SYou can use this method to create an escaped string out of an array of tokens ;TI"Lseparated by a space. In this example we used the literal shortcut for ;TI"Array.new.;T@S; ; i; I" Authors;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"Wakou Aoyama;To;;0;[o; ;[I"%Akinori MUSHA ;T@S; ; i; I" Contact;To;;;;[o;;0;[o; ;[I":Akinori MUSHA (current maintainer);T@S; ; i; I"Resources;T@o; ;[I"Ž1: {IEEE Std 1003.1-2008, 2016 Edition, the Shell & Utilities volume}[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html];T: @fileI"lib/shellwords.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[[[[I" class;T[[: public[ [I" escape;FI"lib/shellwords.rb;T[I" join;F@r[I"shellescape;F@r[I"shelljoin;F@r[I"shellsplit;F@r[I"shellwords;F@r[I" split;F@r[:protected[[: private[[I" instance;T[[;[[;[[;[ [@v@r[@x@r[@z@r[@|@r[[U:RDoc::Context::Section[i0o;;[;0;0[@f@fcRDoc::TopLevel