Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

Hello, I have findprg set like this: set findprg='fd %A %s'

But when I run :find logo folder/, it doesn't work correctly and doesn't take into account that it should be searched only in folder/. (This is fd's format)

Another issue is the find command doesn't complete if I type :find logo <complete here> for the folder part. I have to type :find <complete folder here first> and then put the cursor between find and the folder name to input my search term.

Is this possible? Thank you!

1 Answer

0 votes
by

Hi.

But when I run :find logo folder/, it doesn't work correctly and doesn't take into account that it should be searched only in folder/. (This is fd's format)

It ends up executing fd logo folder/ ., so folder/ doesn't contribute to the result.

Another issue is the find command doesn't complete if I type :find logo <complete here> for the folder part. I have to type :find <complete folder here first> and then put the cursor between find and the folder name to input my search term.

:find expects path to be the first argument in which case it keeps %A empty and puts all parameters into %s, which also produces incorrect invocation of fd.

Despite all complexity of several macros in 'findprg' looks like specifying search paths explicitly won't work for fd (using selection or :range should work).

...