-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General improvements #103
General improvements #103
Conversation
2751dec
to
04a35b8
Compare
Thank you for your contributions! 👍 Just so you know - it will take me some time to review them. |
all good :-) In general I am confident. The only thing we might need to revert back is the Looking forward to your feedback! |
Sorry for leaving this open for so long. I use extrakto a lot and it's quite stable. I do not like to accept changes that change internals without any benefit other than making it look nice internally. If you are still interested, could you try a smaller PR first? Thanks |
I could just have removed the parts you consider too invasive, you know? That's why several commits were made. Would you mind clarifying what exactly was changing the internals in a way you don't like? the |
OK, there may be some miscommunication. Sorry if this didn't come across as intended. Closing this PR does not mean I don't appreciate your efforts. Starting a new PR with smaller changes is IMO a better workflow than picking commits here, so that's why I closed it. I think the changes to extrakto.py and the ones you labeled "cosmetic" are unnecessary. Do the changes work with Bash 5.0? Could you put the "Fix and simplify filter modes validation" into a new PR? |
I just wanted to fix a small issue I had but I got carried away and somehow ended up with a bigger PR.
What this PR does:
New variable
Introduces
extrakto_fzf_unset_default_opts
in order to unset the environment variableFZF_DEFAULT_OPS
.I found out that certain operations would not work with my default
FZF_DEFAULT_OPS
value.For example:
Having the option
-1
(or--select-1
) will makeextracto
's pop-up disappear immediately when there is 0 or just 1 match thus preventing you from switching to another filter.Fix and simplify filter modes validation
This is what I wanted to fix originally.
Even though
extrakto_filter_order
exists, if you try to use another filter likeurl
it will just not work.Now this is fixed:
I also converted this into a standard array rather than an associative array because it makes things simpler and easier.
Support other modes
Extra modes added:
Cosmetics
Some linting with quoting, remove unnecessary
echo
and add--word
as a parameter for the sake of consistency.How to try?
Before this PR:
And no matter what you did, the filters would always be:
word all line
Now calling
extracto
will give you theurl
filter as default as expected.