Skip to content
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

:open url's rather than engines aliases when calling quterofi/open with --invert #6

Open
cortsf opened this issue Jul 19, 2024 · 0 comments
Labels
wontfix This will not be worked on

Comments

@cortsf
Copy link
Owner

cortsf commented Jul 19, 2024

Consider the following example when calling quterofi/open with --invert

ddg hello world

Here quterofi will call :open ddg hello world when the user accepts this entry, since the last word is not a valid search engine declared in engines.toml and thus, quterofi performs no inversion. This is on purpose, for qb to fallback to the normal behavior (in which the first word can match an engine) in case the user forgets to set the engine at the end instead of the beginning.

But it's also possible and easy to construct and send the complete url when the user accepts this entry. For the above example the underlying command would be:

:open https://duckduckgo.com/?q=hello+world&ia=web

This prevents the first word to be (potentially) interpreted as a search engine alias, making the behavior of quterofi compatible with the strict definition of --invert

With this aproach it could be possible to make qb engine agnostic (i.e: unaware of any search engine), if the user relies exclusively on quterofi to search stuff. Not sure why this could be considered an advantage, since parsing engines does not adds any noticeable lag at startup, at least on a decent modern computer.

Question: Do I care about it? Not much. Do I like it? No, actually I like :open ddg hello world more.

@cortsf cortsf changed the title Avoid first word to be interpreted as search engine when calling with --invert :open url's rather than engines aliases when calling quterofi/open with --invert Jul 19, 2024
@cortsf cortsf added the wontfix This will not be worked on label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant