custom tab completion with whitespaces

2017-07-01 10:00:53

I'm trying to write a custom completion function for filenames and sometimes they can have whitespaces.

So far I've been using this

command! -nargs=1 -complete=customlist,MyComplete MyFunc execute MyFunc()

But it only completes the last word even with nargs=1.

Is there any way to complete arguments containing white spaces?