Live data from Hacker News

All DuckDuckGo bang operators on one page

mosermichael.github.io

111–120 of 140 posts

Re: All DuckDuckGo bang operators on one page

#111
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.

Re: All DuckDuckGo bang operators on one page

#112
post #52
post #27

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]. 1. https://support.google.com/websearch/thread/15794018

I filed a support request with StartPage.com to offer the "I'm Feeling Lucky" functionality and never got a response. Maybe if more people ask...

Forget about StartPage:

https://news.ycombinator.com/item?id=21371577

Startpage is now owned by an advertising company (reddit.com)

182 points by rahuldottech 10 months ago | 82 comments

Re: All DuckDuckGo bang operators on one page

#113
A DuckDuckGo feature I’d love to see is for multiple bangs to open new browser tabs, e.g.

  hoverboard !as !gs !target !walmart
would open separate tabs of “hoverboard” results from Amazon Smile, Google Shopping, Target.com, and Walmart.com.

Re: All DuckDuckGo bang operators on one page

#114
post #109

Earlier quoted context omitted.

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 o…

This is neat, I hope it will also work with the Tridactyl's search bar

Tridactyl can't use the bookmarks suggested above but you can do something similar with `:set searchurls.hn https://hn.algolia.com/?q=%s`.

Re: All DuckDuckGo bang operators on one page

#115

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 fas…

> 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.

Re: All DuckDuckGo bang operators on one page

#116

Earlier quoted context omitted.

For many sites, you can probably just guess the bang without much hassle. The easiest example is IMDb, but my success rate guessing is pretty high. Plus, most people tend to spend most of their time on just a few sites. Knowing one or two bangs is useful enough.

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…

Also you can use !wfr, !wit, !wde for the French, Italian or German version of Wikipedia.

The same goes for Amazon: !a, !afr, !ade, and so on...

Re: All DuckDuckGo bang operators on one page

#117
post #75

Earlier quoted context omitted.

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 ` without moving to a new tab or losing flow. The entire function is basically this (requires Tridactyl native messenger). command cp js -p tri.native.run('cd ~ && ddgr --json -n 1 ' +JS_ARG + '| jq -r ".[0].url" | xclip -sel clip') [1] htt…

Is this dangerous if the link is able to inject Bash commands as the value of JS_ARG? If so, that's RCE and that's bad. Is it possible to do this using the HTML5 clipboard functions instead?

JS_ARG here is coming from the user - `:cp [search term]` would be typed interactively into our iframe which pages don't have access to.

Tridactyl provides a `:shellescape` function for sanitising untrusted input but I don't think it is needed in this case.

Re: All DuckDuckGo bang operators on one page

#118
post #75

Earlier quoted context omitted.

Is this dangerous if the link is able to inject Bash commands as the value of JS_ARG? If so, that's RCE and that's bad. Is it possible to do this using the HTML5 clipboard functions instead?

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.

`document.execCommand("copy")` works without user input - https://developer.mozilla.org/en-US/docs/Web/API/Document/ex....

Re: All DuckDuckGo bang operators on one page

#120
The page doesn't list my favorite operator,

  !ducky 
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
Type in the browser address bar:

  pep  8 
Will navigate to: https://www.python.org/dev/peps/pep-0008/
Post reply on HN