For ages I've wanted DuckDuckGo to add a "!copy" bang, which acts like the "!" operator (automatically navigates to the first search result) but instead of going to the page, it copies the link to my clipboard.
There are plenty of projects I'm familiar with but don't know the canonical URL off the top of my head - when I link someone else to them I have to look up their homepage. This would make this process much faster.
I just realized I need this for myself and quickly cooked up a solution using tridactyl, ddgr, and jq that fits perfectly in my workflow. Everything is reduced to just typing `:cp <SEARCH QUERY>` without moving to a new tab or losing flow.
The entire function is basically this (requires Tridactyl native messenger).
This kind of thing makes me uneasy, and is an example of why I don't enjoy the web platform for applications.
In this case, we have Firefox, which has built-in integration for DDG, as well as lots and lots of capability for querying and processing JSON. And on top of that, we are adding a command that drops to the command line to make a series of command calls to different programs for sending and extracting a search query. All to return 1 URL. It's nuts.
Maybe, but I'm pretty sure browsers block the clipboard functions unless they were triggered via user input. I don't know if a page load counts as a valid trigger.
Hey. I have long been wanted to know from someone who has used both Tridactyl and Surfingkeys. On the surface level it seems like they have a larger set of features, but maybe almost all of those can be done in Tridactyl as well. Can you please tell me how these two compare?
I built a simple node JS server to use as my default search engine. What you describe could be a 2-line change to my code.
My motivation was using Google "I'm Feeling Lucky" without JS. The node app detects the "!lucky" bang, downloads the search results, finds the first link, and redirects to it.
Hi jchook, i would love to play with it and might try to port it to cloudflare worker for personal use :) I was thinking of exact same thing before bed last night when someone at work commented on how much revenue from Ad Google loses from "Im feeling lucky" feature which bypass all Ads
> For ages I've wanted DuckDuckGo to add a "!copy" bang, which acts like the "!" operator (automatically navigates to the first search result) but instead of going to the page, it copies the link to my clipboard.
Why? I'm seriously curious about cases in which any of these can be useful.
The only operator I use is "!", which is DDG's version of "I am feeling lucky". And I only use this because Google's silently phasing out the functionality[1].
I use this frequently with stuff like mdn, where I know the exact page and which search terms will get me there, but it's not worth bookmarking (I have Firefox set to only autocomplete bookmarks, not history). For example, "justify-content mdn !"
I've always been frustrated that the !mdn bang didn't have this behaviour by default. Looks like I can achieve the same result as you suggest with "! mdn justify-content" which should ease the change in muscle memory. Thank you!
Bangs are cool but i don't think one can remember many bangs.
This site is also very good. But, it's unfortunately not much use to me as i would directly search the term with 'site:' during the time i would take to search for specific bang.
Also, if i wanted to search specific site, i would add it in search engines of my browser.
I don't use this, but looking at that list, I would disagree. I just looked up some of the top sites I'd want to use and I wouldn't have guessed any of them
Wikipedia -> !w
Youtube -> !you
reddit user -> !reu
subreddit -> !reddits
also !reddit points to new version, I'd want !redditold
Twitter -> !tweet
Steam -> !steme (???)
Twitch -> !ttv
That being said, if you're on DDG, there's pretty good auto complete on bangs so you can find it by typing the name and looking at the favicons.
There are multiple aliases. For instance, I use !yt for YouTube (just checked and !youtube also works), and !twitch for Twitch. I'll agree with the parent in that it's very rare that I'm unable to guess the bang that I want.
Yup, throwing my hat into this ring of agreement. I used to have tons of special search engines in Chrome to do this, often aliased as name or something, and I switched to DDG and started using their Bang's just to realize that most of my custom search engines were obsolete and like 2-3 needed to be retrained in my head.
author here, i find myself using more specialized search engines like github search (the best code search engine right now https://docs.github.com/en/free-pro-team@latest/github/searc... ); so specialized search engines might be the place to go when the big guys fail to find something. So it's not always the same as searching with site: ...
I do remember some 4 of them. Those are the ones that I use reasonable frequently. A page like this is nice because you can look in that and see some new operator that would be very useful, but you didn't know of it.
I use those operators instead of setting a new search provider because switching providers is a mouse action, while adding the operator is just some few more key presses.
So these all just directly search for that term on the (usually substandard) internal website search box?
I don't get the appeal. I want the bang to show a good/filtered SERP, not load some other site directly. (similar to a `site:x` search on Google I guess.)
What I'd really like to use is a search engine that had custom ranking of domains. I'd heavily weigh it to only show Stack Exchange, Reddit, and forum posts.
Or a `!discussions` bang operator that filtered DDG results into that set.
Bangs are nice as a quick shortcut to specialized search engines like etymology online, google image search, wikipedia, or whatever.
You can set up your browser to do this (some keyword changes the search), but it's convenient that DDG already has it built in, so the only setup needs to be switching your default search engine.
I don't know why anyone would ever use DDG's bangs feature if it wasn't their default search engine. That's just a weird extra step.
I've always been in the "I don't get it" boat with DDG bang operators. When I last tried switching it to my default search engine, I felt like any time I needed to search DDG for "!{bang} {query}" I could have just searched Google for "{query}" and gotten the result I was looking for. In many cases, Google will give even better results for siteX than siteX's own search, because Google is likely to correct for things like common spelling errors or word substitutions.
Granted, I haven't given DDG an earnest try in a couple of years, so the DDG non-bang search results may have gotten better, but the fact that their bangs are still heavily touted as a killer feature doesn't give me much faith.
I would call my use of bangs getting to a specific page on another site rather that searching another site. For instance, I get a lot of use out of the wolfram alpha bang, !wa, in those uses I'm not searching as much as I'm inputting a calculation for wolfram alpha to perform and the bang let's me skip a step by typing "!wa {quety/calculation}" into my address bar. Similarly, if ddg is your default search engine, you can lookup a url on archive.is just by prepending it with "!archiveis " in the address bar.
On Google I just search for "define wordtodefine" (which isn't must longer and might even be faster to type) or even just "wordtodefine" (Google seems to be pretty good at knowing whether a single-word search is likely to be looking for the definition).
The most obvious reason why you'd use DDG is for the privacy aspects and the bang operators make it super easy to quickly use Google for those times you need it which limits the amount of information they have.
The appeal is I can just try it without going to a site just to search. I want to search Target, I try !target. I want to search IMDB, I give !imdb a try. Usually it just works. Straight to the results. I hear you on the domain thing, but nothing springs to mind.
I use `!rust` all the time when I just want to pull up the rust docs quickly, since their search is much more effective when I just want to know about the API for a File or something, though I don't get much more value out of them than that.
And I've just learned I can use `!posix` to search the open group, which I'll probably use whenever I get upset with macOS's man pages again.
I agree for many many sites, but do sometimes find it useful - specifically when you know exactly what you want from a particular site, but don't know the URL. Example: !deb for debian package information.
Whereas I Google or Duck for "mtg black lotuss" I'll almost certainly get the correct results. I feel like I'd just get frustrated with the much worse text parsing of each site's search field.
Although it is interesting that this "Scryfall" site that owns "!mtg" isn't on the first SERP for Google or DDG.
You're right, but everytime I'm searching for magic cards I want to see them in scryfall. It gives you so much more information about the card that I'm okay with having to fix a typo
Being able to see price, reprints, legality, etc is great
Also, the best part about scryfall is it's searching paramaters. If I want to see the most expensive red creature cards currently legal in standard, I can do `!mtg color:r sort:usd legal:standard type:creature` and it's right there
It's made building decks so much easier for me with these easy text searches, as someone who loves being able to do things with a keyboard rather than selecting these parameters using a mouse on something like Gatherer
Well, the appeal is that you can set your searchbox for DDG, and easily search all those others site when you want, no need to load search pages or change search providers.
And it's appealing to me, so I do that. Most people won't agree, most people don't even mess with search providers, but it's doesn't harm them either.
The page lists all !bang search operators on one page, i think the feature is easier to use when you have all of them in one page; The page is kept in sync with all duckduckgo search operators by a nightly build process. The build script/motivation for the project is here https://github.com/MoserMichael/duckduckbang (my previous submission got ShowHN in the title instead of Show HN, so submitting a second time)
One pet peeve is that I'd like to search Hacker News, however searching with Angolia sucks (via !hn). I get more relevant results if I do a site:news.ycombinator.com filter in Google. Would appreciate a bang for searching on HN that uses Google or Startpage.
---
I have my own search keywords in Firefox, if you're using Firefox or Chrome I recommend setting your own search keywords. You have more flexibility in adding stuff that's relevant for you, and it's going to sync on your mobile device too (it's the reason for why I'm using Firefox on iOS). It increases privacy too. Makes no sense to send all of your searches to DDG first.
Safari is the only one where you're out of luck, and need DuckDuckGo's bangs.
It would add to discoverability if a reminder of the bang appeared besides the search results (could be under a config setting), that way one could learn the bangs associated with their most used sites easily.
That's a good suggestion, though DDG has a financial incentive to keep users going through DDG's search page. OTOH, DDG created and supports bang shortcuts so they want people to use them. :)
DDG could show a bang suggestion if any of the top search results are for sites that have bang shortcuts. Or suggest "Didn't find what you're looking for? Try !g" if the number of results found is small.
you get a help text in a tooltip (hover text) with the URL of the search engine - when the mouse hovers over the link; I think that adding the url directly to the table entry might clutter up the page.
I much prefer Firefox's "keyword" favourites. For example, I have a "cpp ..." search that automatically searched cppreference, another one "cmake ..." that searches CMake's documentation, and so on and so forth
1. Open the bookmarks view (probably Menu → Library → Bookmarks or Ctrl+Shift+B; not sure on macOS).
2. In the toolbar, within the Import & Backup menu button, use Backup… or Export Bookmarks to HTML….
3. Observe the file format (JSON for one, HTML for the other) and replicate its effects for all the items you wish to add.
4. Restore or import your new bookmarks.
I haven’t actually done this for over a decade. I suspect the backup/restore route might replace all bookmarks and the export/import route might just add new bookmarks, but I don’t know.
What I’d really like is an extension that could manage all of these (sync with DuckDuckGo’s bangs, allow enabling and disabling individually, by group, &c., renaming bangs), but Mozilla have said “We have no plans to allow adding search engine dynamically via WebExtensions. We've had too many problems with hijacking.” (https://bugzilla.mozilla.org/show_bug.cgi?id=1268401#c37.) So anything like this would need to be a program that could run locally and either mess with Firefox’s databases directly (places.sqlite, I think), or provide you with the relevant files for you to import manually. I’ve thought of making such a thing, but I’ve not done it yet. Part of the reason is lack of a good data source: for using DuckDuckGo bangs, you need a list that includes the destination of each bang, which I don’t think they provide in any principled way, so you’d be left just polling them.
I hadn't thought about the search highjacking problem but it does help explain why Mozilla is intentionally making it harder to mess with the search engine settings. It does sound like an external program would be the only way to do it...
those bangs are really a nice feature. my most often used bang in 2020 unfortunately still remains !g for every time I search something that is related to finding solutions for code / software engineering (or copy paste a problem line from syslog etc). ddg is in almost every case not showing me the most relevant result I want.
I gave up on DDG after giving it a go for a year or so ... I don't know if Google prioritises Stack Overflow or what, but that's what I'm after, most of the time, and DDG just doesn't give me that.
1) We can ctrl-f to search obv, but add a filter up top that just fuzzies anything matching
2) Let me condense the header of a category, like how comments can hide their children in here
3) Both of the links in an entry go to the same thing, ala:
`discworld` and `!discworld` can be clicked to do the same thing, populate the box up top, which _does_ let you click & press return. But it might be cool if one populated, and the other just took you to the !bang in ddg. Not in a new tab! The user can force it in a new tab if they want
edit: I know #3 basically says "so just take the user to duckduckgo.com?q=!discworld which'll take 'em to whatever site that resolves to?" yeah pr much that, heh
> Durability is the guarantee that data can be accessed after a failure. It seems like this should be very simple: either your system provides durable data storage, or it does not. However, durability is not a binary yes/no property, and instead should be defined as the kinds of failures you want your data to survive. Since there is usually some performance penalty for durability, many systems provide a way for only "important" writes to be durable, while "normal" writes will eventually be durable, with no specific guarantee about when.
I believe we should return to dual-disk systems with separate disk/flash drive dedicated for executable code (OS+apps+swap) and for user data storage. And this can be especially easy now as NVMe drives and micro/SD cards can be so small and low-power.
Performance is very important for the drive where you load your executable from and where you put your swap. The speed of this disk actually defines the user experience. At the same time it rarely is a serious problem if it fails - you can just replace it and re-install everything. The user data (like documents, pictures, multimedia files, source codes etc.) storage usually doesn't really need to be that fast to access but it really should be durable as its failure often means loss of some unique valuable data which is a result of work expensive or impossible to repeat in required time.
One small annoyance is that bangs can be set with the exclamation mark _after_ the term, however, only if that bang (with exclamation at the end) was explicitly submitted.
For many of my regulars, both exist (!w & w!, !gmaps & gmaps!) but as this isn't standard, it can lead to holes. For example, !hackernews works but hackernews! not.
It would be great if all bangs could have both variants as standard rather than allowing submission of one but not the other.
These bangs have honestly changed the way I browse. With Ctrl+T, Ctrl+L, Ctrl+W, and tab-switching, the browser feels like vim in a small way.
Without my mouse, I can open a new tab or switch to a new tab and immediately search Wikipedia, Amazon, IMDB, etc. All of this helps me not need Google if I know the best domain to look in, and it saves time.
DDG should show them at the bottom of their first search result page.
That way, starting a new search with a bang operator wouldn't be such a hassle, e.g. on mobile, where it takes like 7 screen-taps to restart a search with e.g. "!g" appended to it.
You can add "!g" to your dictionary and initiate it with a quick swipe (e.g. I use "bang" to add it). Cool thing is, that you can add it anywhere in your query - DDG will pick it up
Cool, but I assume you still need to select the query and click it again to place the cursor, and possibly add a space, and then finally press enter (?)
that will navigate to first result. It's named after the "I'm Feeling Lucky" button that used to exist on Google. It's useful with Firefox keyword bookmarks to navigate to specific pages quickly.
Bookmark: Python's PEPs
Location: https://duckduckgo.com/?q=!ducky+site%3Awww.python.org%2Fdev%2Fpeps+%22pep+%s%22
Keyword: pep
I've developed muscle memory for `g! <query>` even on mobile.
I started using DuckDuckGo in an attempt to unGoogle my life, but I'm starting to realise that DDG won't do as a google replacement. It displays annoying ads with no clear way to disable them and the quality of search results is significantly worse.
The one thing I don't like is that it goes through ddg. This makes sense implementation wise since it's a web site. But I wish it was built into the browser for when I use ddg in my browser URL field. Every once in a while ddg takes a while to respond.
Firefox has a similar feature. You can define your own keyword rule, for example, to macro-expand
hn duckduckgo
into
https://hn.algolia.com/?q=duckduckgo
and thus get a shortcut to HN's own site search (Algolia), without involving Google/DDG/etc. To do this, you need simply to bookmark the URL
https://hn.algolia.com/?q=%s
and set the bookmark's "keyword" property to "hn". Then "hn" becomes a special operator in the omnibar, which eats the rest of the search string and substitutes it into its bookmark's "%s" parameter.
(This isn't limited to search engine query strings: it's general-purpose template expansion on the URL string).
There appear to be a number of dictionaries improperly listed under "Online Services / Tools" instead of "Translation / General". Though I have no idea how to fix that, or even how to report it as an issue
This page, as with the Show HN, groups bangs by category (Entertainment
Multimedia
News
Online Services
Research
Shopping
Tech
Translation).
There is a search feature (match on bang or URL) as well, with, of course, its own bang: !bang
In my experience, it's possible to, very roughly, define bounds to search results and usefulness or approach:
- 0 results is the null set. Obvious but worth noting.
- 1 result is an identity. That is, a search returning precisely one entity identifies that entity. (This relationship may not be persistent over time).
- To 10 results is a near universally useful set. SERPs, news sites, and many other interfaces focus on this scale. Ontologies typically branch to about 2-30 items. HN's front page lists 30 items. The Presidential Daily Brief runs about ten items. This apparently taxes the attention of some incumbents.
- To 100 results remains tractable to the determined user. This means a capacity to identify specific item(s) of interest without necessarily resorting to recordkeeping. More detailed news sites might include as many articles. A print newspaper typically runs 100-250 individual stories per day.
- To 1,000 results is methodologically tractable, though some recording and filtering system is all but certainly required. These need not be programmatic or algorithmic though often are. News wires (AP, AFP, Reuters, UPI) typically run 1,000--5,000 items/day.
- To 1,000,000 results, jumping a few orders of magnitude, typically requires some technical searching or sorting capacity. Again, not necessarily algorithmic (a large print library collection of a million or more volumes can be managed through paper based systems, though seldom is now, and requires extensive structure of stacks, index, circulation, and reshelving).
- To ~1 billion items is all but certainly programmatic.
- Greater thaan a trilliion items enters the realm of probabalistic matches, relevance, and AI.
I'm not aware of specific research in this area but would be quite interested in references.
The classification would suggest bang search rather than comprehensive listing as being of interest to most peoople though.
Sources: Seveeral of the values above are discussed here:
That's one of my motivations for writing bangin. There are some sites I want to use bangs with which are either too niche or otherwise fall foul of DuckDuckGo's rules.
There are plenty of projects I'm familiar with but don't know the canonical URL off the top of my head - when I link someone else to them I have to look up their homepage. This would make this process much faster.