7 module Puppet::Parser::Functions
8 newfunction(:shell_split, :type => :rvalue, :doc => <<-EOS
9 Splits a string into an array of tokens in the same way the Bourne shell does.
11 This function behaves the same as ruby's Shellwords.shellsplit() function
15 raise(Puppet::ParseError, "shell_split(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1
17 string = arguments[0].to_s
19 result = Shellwords.shellsplit(string)
25 # vim: set ts=2 sw=2 et :