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