summaryrefslogtreecommitdiff
path: root/lib/shellwords.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shellwords.rb')
-rw-r--r--lib/shellwords.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/shellwords.rb b/lib/shellwords.rb
index 66092c8999..0030f0784f 100644
--- a/lib/shellwords.rb
+++ b/lib/shellwords.rb
@@ -64,6 +64,13 @@ module Shellwords
# argv = Shellwords.split('here are "two words"')
# argv #=> ["here", "are", "two words"]
#
+ # Note, however, that this is not a command line parser. Shell
+ # metacharacters except for the single and double quotes and
+ # backslash are not treated as such.
+ #
+ # argv = Shellwords.split('ruby my_prog.rb | less')
+ # argv #=> ["ruby", "my_prog.rb", "|", "less"]
+ #
# String#shellsplit is a shortcut for this function.
#
# argv = 'here are "two words"'.shellsplit