How to get a list of files that match some pattern if filenames may contain \n
character?
Update: I want solution in pure vimscript, so that it will depend on nothing but vim.
Update2:
Expected output of glob function
Consider the following script:
:!touch /test ; mkdir /test$'\n' ; touch /test$'\n'/test
:echo glob('/**/test')
/test
/test
/test
That is the output of glob
function. I want it be the following:
:echo NewGlob('/**/test')
['/test', '/test
/test']