Skip to content

Allow multiple searches on single URLs#58

Open
Zheckan wants to merge 5 commits intopsidex:masterfrom
Zheckan:feat/multi-bang-trigger
Open

Allow multiple searches on single URLs#58
Zheckan wants to merge 5 commits intopsidex:masterfrom
Zheckan:feat/multi-bang-trigger

Conversation

@Zheckan
Copy link
Copy Markdown

@Zheckan Zheckan commented Oct 8, 2025

Solves issue #54

Added multi-trigger that allows to have multiple searches at one bang

By default uses !! trigger to activate multi search. In issue discussion was suggested to use:

as suggested it would need some sort of command modifier to indicate that you want to do that.

I thought that adding toggle to every option will result in clattered UI. My solution proposes to have a new optional and configurable trigger (by default !!). So by searching !!g cat dog it will open 2 tabs for two searches.

About question:

What about if you want to search for more than one word? I feel it could get quite complicated

I decided to add possibility of searching multiple words inside [], for example: !g [hello world] hello world will result in 3 tabs for hello world, hello and world searcher.

By default Multi Trigger is turned off and can be modified (added validation, so it can not be same as regular trigger), multiple words search is turned on.


  • Added pnpm entries to .gitignore to avoid committing pnpm files while keeping npm as the single source of truth.
  • Added npm script: "lint:fix" to auto-fix issues via Biome (npx biome lint ./src --fix).

Code is tested in Chrome and Firefox. I hope PR was done correctly, if not, happy to rewrite and fix issues as needed

//btw, thanks for your incredible extension

- Added a new `multiTrigger` option in the configuration to allow users to specify multiple search triggers.
- Updated the `getRedirects` function to handle both single and multi-trigger scenarios.
- Included OptionsTabPanel in UI for setting the multi-trigger, with validation to prevent conflicts with the standard trigger.
@psidex
Copy link
Copy Markdown
Owner

psidex commented Nov 21, 2025

Sorry I've been busy, will try to look at this soon

@psidex
Copy link
Copy Markdown
Owner

psidex commented Mar 31, 2026

Hi, sorry for the long delay and thanks for the PR, I really appreciate your contribution.

A few bits of feedback:

  • I'm not a fan of the square brackets, it feels a bit clunky. But maybe it's the best way to do it? I can't think of a better alternative to be fair so maybe just ignore me
  • I would appreciate some more comments in the code, including the new function you added and on the new branches/loops that the multi trigger handling has added
  • The diff for the options UI is weird, why does it say every line has been changed?
  • There's now a merge conflict

All that being said, I would caution against spending a lot more time on this, I just haven't had a lot of time to do open source work recently and I can't guarantee I will be able to come back to this soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants