Hacker News new | ask | show | jobs
by mglz 898 days ago
For people who don't know them yet: use DDG bangs. For example "!m restaurant [citynmae]" will immediately bring you to Google maps, "!w chemistry" will open Wikipedia etc. Super easy and powerful :)
4 comments

Setting stuff up for that in any browser worth it's salt isn't too difficult, skipping the entire middleman of any search engine.
But it's already set up for you in DDG, so why not use it?

Aside from the fact it's another HTTP request, but these days on the majority of computers and connections, that's a trivial thing.

I'll add that !aw to search the Arch Wiki and !aur to search the AUR are my two most favorite commands.

> But it's already set up for you in DDG, so why not use it?

Because if I wanna search Reddit, I'd prefer to have '!r' search directly within Reddit and not litter my browser history with tons of duckduckgo entries like this:

https://duckduckgo.com/l/?uddg=https%3A%2F%2Fwww.reddit.com%...

weird example considering just how bad Reddit's internal search is and always has been -- that's a site I've always preferred to search with an external search engine, be it Google, DDG, or Kagi lol

doesn't hurt to have options! to each his own

Best example I could come up with on-the-spot, because I already swapped out Google, Amazon, and Wikipedia on my Firefox install for native search engines, and needed to quickly generate search results from a DDG bang so I could show the accompanying history page. :P
> Aside from the fact it's another HTTP request

You’d think DDG could avoid this via JavaScript if they wanted to. Might be better for privacy, if not for their usage stats.

Years and years ago I'd configure this stuff in FF, but using DDG effectively auto-configures it for any browser, exactly the same, everywhere, all I have to do is set the default search engine. And it includes some that I do use but probably wouldn't have bothered to configure on my own.
Firefox Sync is end-to-end encrypted and will sync your keyword bookmarks across all of your devices. Sure, you have to set them up but it seems worth it to get the ones that work for me, not whatever duck duck go thinks is popular.
I've never wanted one and not found it in DDG, or found it named differently from what I'd have named it. Every now and then I try to guess one blind, and I don't think I've ever had it surprise me. And it works in any browser.
I guess you are the perfectly average human then. I am not so lucky.

I have `s` to search sourcegraph.com, DDG has !sg. `t` to use Google Translate, DDG has !gt, `i` to search IMDB, DDG has !imd or !imdb, v to search animated images, DDG has !gif, `ni` to search nixpkgs issues which DDG doesn't have (although they do have one for the nix repo at !nr which is pretty impressive. I use `nc` for this). Not to mention personalized shortcuts like searching my company's GitHub organization or JIRA tickets that would never be a public bang, much less have a 2 character shortcut.

I stopped there but it is clear to me that I benefit from making my own short aliases for the searches that I use most. Plus it is nice to not send my logs to a third party and get improved performance.

It's better to lose the inconvenient ! and use a browser that supports prefixes in the search bar

Then you can "w chemistry" to open Wikipedia with a list of suggestions from the same Wikipedia ("Chemistry (Girls Aloud album)") in the same place

I think everyone in the thread knows about "search engines" in Chrome and bookmark keywords in Firefox. The crux of the issue is that there are more than 10,000 bang commands in DDG. Setting up even a popular subset in any given browser is a significant investment. It's fine if it's the browser you use 99% of the time, but for those spanning multiple computers, phones, and other devices, simply using bang commands is a strict win.

https://duckduckgo.com/bangs

99% of the time you use <0.1% of the bangs, so setting those up isn't a significant investment. Then there are also the downsides mentioned above (less convenient, no preview, not portable across search engines), so no, it's not a strict win, but an inferior alternative which is superior only in those cases where you can't setup something better
If I went that route, I’d have to set them up on my phone, tablet, laptop, desktop, etc, all of which have different operating systems/web browsers.

I guess I could implement them as a web server, and point all my devices at it.

Some browsers sync these settings, so that removes a lot of the complexity. But in general, you're repeating the same mistake. No, you wouldn't have to do that, you'd just set it up on the devices you use the most to get the most convenience in the most common cases, and then use the less convenient option on others.

There is no point in making 100% of your experience worse just because you can't make 100% of your experience better

None of the browsers I use across those devices sync settings well. Even if it was 100% firefox, I don't want to trust the cloud, and can't be bothered to set up a mozilla sync server just for this (I don't use bookmarks, and there aren't any other settings I want to sync).

Also, as it is, I make 100% of my experience better by switching all the browsers to a search engine that provides better results than google and has !bang support.

There are at least two such search engines: duck duck go and kagi.

Something this doesn't do that DDG bangs do, is let me append it, or even stick it in the middle of a search. I can just type it wherever my cursor happens to be, other than in the middle of a term. This comes up when I search something in DDG then change my mind and want to use a bang.
good point, and it's smart enough to ignore when quoted

Wish they also allowed changing the !prefix

I agree, it is nice and privacy respecting, but I take umbrige with the google-maps. I am not really using Gmaps and I have everyone in my orbit exposed to alternatives. Just because.... like cato used to say...... I believe that Google should be destroyed.
DDG was great anyway, but discovering their !bangs was a revelation. Super cool stuff!
They should add bang-buttons at the top of their result pages. Didn't find what you were looking for? Just hit one of the bang buttons.
Been using these !bangs for a while.. also works with bang!