fd icon indicating copy to clipboard operation
fd copied to clipboard

Filename error with unexpected escape in `--exec` on Windows

Open TroyDanielFZ opened this issue 4 years ago • 4 comments

When use the --exec command on windows, the {} isn't properly replaced for files start with rvbt etc under folders. The expected result is:

folder\thread.txt
folder\var.txt

while the actaul reslt is:

folder^thread.txt
folder^Kar.txt

where the ^t and ^K are control keycodes.

TroyDanielFZ avatar Feb 01 '21 09:02 TroyDanielFZ

This isn't the same thing as #310, is it? If it is, try using e.g. fd -x <command> "{}" as mentioned here.

evanjs avatar Feb 02 '21 17:02 evanjs

@evanjs Thank you for your comment. After tring the solution provided in #310, this problem is resovled. It is possibly the same problem as #310 .

TroyDanielFZ avatar Feb 12 '21 16:02 TroyDanielFZ

@evanjs Thank you for your comment. After tring the solution provided in #310, this problem is resovled. It is possibly the same problem as #310 .

TroyDanielFZ avatar Feb 12 '21 16:02 TroyDanielFZ

@TroyDanielFZ Thank you for reporting this, and thanks for resolving it @evanjs.

It feels like something that should be documented. Maybe we could modify the help text on Windows to add a remark about needing to quote {}?

By the way: note that you can always skip a trailing {} argument. fd … -x cmd is equivalent to fd … -x cmd "{}".

sharkdp avatar Feb 13 '21 21:02 sharkdp