Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A surprising fact I /do/ know about DDG: they don't update bang searches anymore, which was one of my favorite differentiators. This feature adds a lot of utility to DDG as a browser default search engine.

You can search "!w Gabriel Weinberg" and it will open the Wikipedia article because of the leading exclamation mark and w. If a site changes their search url, you can submit the precise new pattern they should use for a redirect. If a new service pops up, you can use the same form to request a new search prefix. These form submissions could give someone at DDG an easy interface to verify quickly and approve or reject them.

These form submissions get ignored and have been for years at this point.



A primary problem is we get overwhelingly spammed with submissions. They are not completely ignored. We have maintainers, but as a relatively small team given the surface area of what we're working on, they have been de-prioritized. That said, I think some better tooling could probably get be put in place at this point to help us.


Are you aware of Firefox's search keyword feature? You can bookmark the URL of a web site's search result page, replace the search text query parameter with %s, and enter a keyword in the bookmark details. From then on, entering that keyword followed by some new text in the address bar will perform the new search.

You can choose keywords that don't start with !, so typing them is easier than using Duck Duck Go's bang feature.


I use this a lot, but the problem with this, that still hasn't been fixed after all these years, is if you have 2 or more keyboard layouts, you can't make more than one bookmark pointing to the same URL with different search prefixes.

So if, for example, you wanted to make

> x <search_term>

and

> y <search_term>

both work the same, x and y being letters from 2 different alphabets but mapped to the same keys, you couldn't, without some JavaScript. If you just added those 2 keywords, even if you manually edited or created your bookmarks, one bookmark would override the other and the other would appear empty with no keyword.

The workaround I found was using a bookmark with this code in it (instead of the usual URL):

javascript:(function(){var keywords="%s";var mainURL="https://<URL>/";var searchURL="https://<URL>/<params>-"+keywords;if(keywords==""||keywords=="%"+"s"){window.location=mainURL}else{window.location=searchURL}})();

Where https://<URL>/<params> is something like https://example.org/search/q-.

It's slower and sometimes doesn't work if you type "y" and then the query too fast, especially if you're pasting the query. So sometimes it doesn't work and searches with the browser's default search engine for "y <query>".


I'm guessing the number of people this affects is approximately 1.


The number would be most of the people who use the keyboard shortcuts && who use 2 or more layouts && who don't want to change languages to search for something.

It's just muscle memory for me.

CTRL+T -> x <search_term> -> ENTER

Most often I enter <search_term> with CTRL+V, so the sequence is:

CTRL+T -> x CTRL+V -> ENTER

Nowhere in that sequence is the keyboard layout important (if you don't write anything, but just paste).

Just like CTRL+T works even if you're not writing in a layout where the "T" key is mapped to the letter "T", so should "x" work no matter what it's mapped to.


At least 2.

Being able to put language-specific shortcuts on keys that change with the keyboard layout is damn useful.

Why does software have such powerful modes for Python and JavaScript, but never for French or English?


I think everyone who regularly writes eg both Spanish and English, or Chinese and English etc will be affected. That's a LOT of people. Not all languages rely heavily on accents or special symbols but those do. (For example in Spanish you don't want to mix up 'año' and 'ano' :)


You can make the URLs slightly different, with the same result on most sites, by adding an ampersand:

https://en.wikipedia.org/wiki/Special:Search?search=%s

https://en.wikipedia.org/wiki/Special:Search?&search=%s

Each of those can have a different keyword.


You can also use a self hosted searxng as front-end. It's got many options for things like Wikipedia and it is being properly maintained. It's also really nice and 'quiet'. No ads or AI shoved in your face.


You can also just right-click on a text field and select "Add Search Engine" and it creates it for you, no need to manually edit URLs


Thanks for pointing it out. I actually use a plugin which rewrites search queries for custom "bangs" which I switched to after waiting for others to be fixed. I didn't realize that the same exists built in.


> You can search "!w Gabriel Weinberg" and it will open the Wikipedia article because of the leading exclamation mark and w

Just for anyone else who isn’t aware, the bang commands can be anywhere in the search string, and need not necessarily be at the beginning.

All these queries will take you to Wikipedia for the term:

"!w Gabriel Weinberg"

"Gabriel !w Weinberg"

"Gabriel Weinberg !w"

Many a times when I find the default DuckDuckGo search results inadequate and want to go to Google search, I just put a “!g” as a separate term anywhere within the search string and hit enter. This is especially useful on mobile where the search string may be a lot longer than the visible text box and I can’t be bothered to move the cursor.


Same here! Especially in an iphone, where for some reason moving the cursor was made extremely difficult compared to Android


Just press and hold the space button is not that difficult?


I’ve gotten used to it over enough time using an iPhone, but it is still both more difficult to use and less discoverable than the Android equivalent.


How does it work in android-land?


Tapping in different parts of the text box, or dragging the finger in the text box, allow a lot more precise control than what one can easily do by dragging the space bar in the iPhone keyboard, much closer to what you can do on a full computer with regular keyboard and mouse.

The difference is especially noticeable for tasks like editing / deleting / selecting specific parts of long URLs, and on smaller phones where the iPhone space bar is smaller than on larger phones.


I ended up just putting together my own bang provider (and stole the snaps feature from Kagi).

https://search.vale.rocks


I use bangs a lot in duckduckgo but this is my first time seeing the snaps feature from kagi and I feel like it can be useful too so your website is definitely really cool to see!

Like till now If I wanted to search something on reddit from duckduckgo, I would search "<search query> reddit"

But it was also an hit or miss sometimes so you are telling me that snaps can just @r <search query> and guarantee its from that is amazing!

Your list of resources feel good too, https://time.fyi and other tools are good too!

I would love it if your resources also included open source resources similar perhaps as I prefer open source tools mostly but even these resources are good too so thanks!


I use a similar system but inside of Alfred mac app, and they open in default browser app which routes the open request to the most recent browsers I've used. Enables me to work between different browsers more easily.


Then why not steal the shortcode list from Kagi as well to have much more websites supported? Their bang list is open source


Given that my search router is completely client side, importing such a huge collection would be huge and slow things down considerably.


This functionality has always been available in Firefox: Just add a keyword to a bookmark.


But not in Firefox Android, without a third party add-on


Well, not directly. When adding a keyword, I put it in the name of the bookmark in parentheses. Thus eg. https://news.ycombinator.com/newest is with the name "(hny) HN new" and keyword hny. When typing hny in the address field the bookmark comes up and I'll just tap it. You can also search only from the bookmarks.


Kagi has this bang redirect feature too.


> These form submissions get ignored and have been for years at this point.

Hmm, when I added !mt more than a decade ago it went live almost immediately...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: