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

Custom config for search engine stops at '&' #1

Open
Vagahbond opened this issue Nov 1, 2023 · 3 comments · May be fixed by #2
Open

Custom config for search engine stops at '&' #1

Vagahbond opened this issue Nov 1, 2023 · 3 comments · May be fixed by #2

Comments

@Vagahbond
Copy link

I tried configuring this plugin to search stuff on nix packages repo.

Config(
  prefix: "?",
  engines: [
    Custom(
      name: "google",
      url: "google.com/search?q={}",
    ),
    Custom(
      name: "nix packages",
      url: "search.nixos.org/packages?query={}&channel=unstable",
    ),
  ],
)

Code above works, but the "channel=unstable" part is ignored.

When doing this :

Config(
  prefix: "?",
  engines: [
    Custom(
      name: "google",
      url: "google.com/search?q={}",
    ),
    Custom(
      name: "nix packages",
      url: "search.nixos.org/packages?channel=unstable&query={}",
    ),
  ],
)

It does not work with the query.

I believe the string is truncated when finding a &.

@FromWau FromWau linked a pull request Jun 10, 2024 that will close this issue
@FromWau
Copy link

FromWau commented Jun 10, 2024

Hi @Vagahbond, I opened a PR that fixes your issue. I don't know if your problem still bothers you, but you can check out my fork with the fix and build it yourself.
Fork: https://github.com/FromWau/plugin-websearch/tree/main

Instructions if u need them:

  1. git clone https://github.com/FromWau/plugin-websearch.git ~/plugin-websearch
  2. cd ~/plugin-websearch
  3. cargo build --release
  4. copy the .so to your dots -> cp -p ~/plugin-websearch/target/release/libwebsearch.so ~/.config/anyrun/plugins/

@Vagahbond
Copy link
Author

Hi, thanks for notifying me, I will check that when I see my computer again

@Vagahbond
Copy link
Author

Hey, so using your fork as a flake input for my anyrun config the issue is effectively fixed !

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 a pull request may close this issue.

2 participants