global

def shellescape(str)

def shellescape(str)
    return str unless str
    if FFI::Platform::OS == 'windows'
        '"' + str.gsub('"', '""') + '"'
    else
        str.shellescape
    end
end