Check out my project [ff](https://github.com/genotrance/ff) that is a Windows wrapper for fzf written in Nim. It aims to improve the experience of using fzf on Windows and simplify various routine tasks.
I understand your challenge, it was a pain to figure this out. Hope this helps. [https://github.com/genotrance/ff/blob/master/ff.nim#L57](https://github.com/genotrance/ff/blob/master/ff.nim#L57)
