Open danielkrajnik opened 1 year ago
Thx for the idea. This is already on my TODO list. I'll probably add additional command line flags to control the output and sort oder. So something like this: fsearch --output="${path}\t${size}" --sort="${name}" --search="*.pdf"
I'll see if I can squeeze this in to the 0.3 release.
Oh I haven't seen the TODO list, thanks. That's good to hear, hopefully it won't take too long to add it.
Yes, I think that there could be more useful options, but the less verbose the better I'd say, for example when using plocate locate portfolio .pdf home
command is the same as locate "*portfolio*.pdf*home"
. Also ideally without the equal signs 😅
Yes, I think that there could be more useful options, but the less verbose the better I'd say, for example when using plocate locate portfolio .pdf home command is the same as locate "portfolio.pdf*home".
I guess one way to reduce the verbosity is to have a dedicated binary (e.g. fsearch-cli
or fsearchq
) for the CLI interface, something like:
fsearch-cli [OPTIONAL_FLAGS] LIST_OF_SEARCH_TERMS
Because I don't want to get rid of the functionality to forward searches to the GUI with fsearch --search=SEARCH_TERM
.
when using plocate
locate portfolio .pdf home
command is the same aslocate "*portfolio*.pdf*home"
I don't think so, the former (which is also how FSearch works) will find home_portfolio.pdf
and portfolio_home.pdf
and portfolio.pdf.home
(i.e. the order doesn't matter), while the later will only find portfolio.pdf.home
because that's the only one which has portolio
followed by .pdf
followed by home
.
So the equivalent to locate portfolio .pdf home
with fsearch-cli
would simply be fsearch-cli portfolio .pdf home
Also ideally without the equal signs
Yes, the equal signs can already be omitted. (fsearch --search test
is the same as fsearch --search=test
)
fsearch-cli
orfsearchq
great idea
the equivalent to
locate portfolio .pdf home
withfsearch-cli
would simply befsearch-cli portfolio .pdf home
Yes, that would be perfect. Sorry, all I meant is that the syntax without the special characters (* " or =) would seem to be better (less typing).
hope this can be implemented, thanks a lot
Describe the solution you'd like CLI interface in fsearch, e.g.
fsearch --search .pdf
would output resulting file paths tostdout
instead of opening fsearch gui. This would allow us to build pipelines around fsearch with other command line tools.Describe alternatives you've considered GNU mlocate provides it already, but it's a bit of a pain to maintain two databases.
Additional context It's been mentioned in this issue, but API was proposed instead.
If we could add this kind of CLI an option to sort results by name or date would probably be useful, as well.