fzf as optional dependency
pickfire opened this issue Β· comments
π Feature Request
Checklist
- No duplicate issues/PRs
- Are you running the latest
downgrade
release from the AUR?
Background
I already have skim, not planning to install fzf, is it possible to have fzf as an optional dependency?
Proposed feature
Make fzf an optional dependency.
Hi @pickfire,
Thanks for the feature request. Yes this is possible, but we would have to significantly re-work downgrade
. Based on a discussion with @pbrisbin, following are the points we will need to work on:
- Introduce a new CLI option where the user can explicitly provide a fuzzy finder
- If no fuzzy finder is specified, we define a list of fuzzy finders like
skim
andfzf
and check if they are installed. If they are installed, we use the first one found - If no fuzzy finder is installed, we use the default selection menu from
v10.1.1
- Make the list of supported fuzzy finders optional dependencies in our
PKGBUILD
instead of hard dependencies - Modify
downgrade
to provide different scripts, each following the UNIX philosophy of specializing in one major area; for exampledowngrade-search
,downgrade-select
,downgrade-install
anddowngrade
Feel free to discuss further here.
Thanks for summarizing our talk Atreya! Just to clarify a bit about effort (IMO):
(1) and (2) are relatively easy, but we are choosing not to do (4) until we've got (3), which could be a bit of effort, but I don't think qualifies as "significantly re-work". I'm excited about (5), which is where the "significantly re-work" lies. If Atreya agrees that is a valuable architecture to pursue, I might do that first and only -- because it brings 1-4 for free. If not, I would probably plan to do 1-4 and not worry about 5 yet at all.
Modify downgrade to provide different scripts, each following the UNIX philosophy of specializing in one major area; for example downgrade-search, downgrade-select, downgrade-install and downgrade
This would be interesting, I never heard of downgrade select, so far I always know what to downgrade so I just downgrade a package. Thanks for looking into this since some applications would not even bother with non-fzf support but at the very least I think fzf is optional for them.
I'm excited about (5), which is where the "significantly re-work" lies. If Atreya agrees that is a valuable architecture to pursue, I might do that first and only -- because it brings 1-4 for free.
@pbrisbin ah I understand. I think it makes more sense to go with 5 first. It will entail more work but I can imagine it being super useful for future developments as well.
I'll be quite busy this week, but will try to get to this and #158 from next week onwards.