shellsplit(line) private

Splits a string into an array of tokens in the same way the UNIX Bourne shell does.

argv = Shellwords.split('here are "two words"')
argv #=> ["here", "are", "two words"]

String#shellsplit is a shortcut for this function.

argv = 'here are "two words"'.shellsplit
argv #=> ["here", "are", "two words"]
Show source
Register or log in to add new notes.