1DDGR(1)                          User Commands                         DDGR(1)
2
3
4

NAME

6       ddgr - DuckDuckGo from the terminal
7

SYNOPSIS

9       ddgr [OPTIONS] [KEYWORD [KEYWORD ...]]
10

DESCRIPTION

12       ddgr is a command-line tool to search DuckDuckGo. ddgr shows the title,
13       URL and text context for each result. Results  are  fetched  in  pages.
14       Keyboard  shortcuts  are  available  for  page  navigation. Results are
15       indexed and a result URL can be opened in a  browser  using  the  index
16       number.  There  is no configuration file as aliases serve the same pur‐
17       pose for  this  utility.  Supports  sequential  searches  in  a  single
18       instance.
19
20       Features
21
22         * Fast and clean (no ads, stray URLs or clutter), custom color
23         * Designed to deliver maximum readability at minimum space
24         * Instant answers (which appear in the html version of DDG)
25         * Specify the number of search results to show per page
26         * Navigate result pages from omniprompt, open URLs in browser
27         * Search and option completion scripts for Bash, Zsh and Fish
28         * DuckDuckGo Bang support (along with completion)
29         * Open the first result directly in browser (as in I'm Feeling Ducky)
30         * Non-stop searches: fire new searches at omniprompt without exiting
31         * Keywords (e.g. filetype:mime, site:somesite.com) support
32         * Limit search by time, specify region, disable safe search
33         *  HTTPS  proxy  support,  Do  Not Track set, optionally disable User
34       Agent
35         * Support custom url handler script or cmdline utility
36         * Comprehensive documentation, man page with handy usage examples
37         * Minimal dependencies
38

OPTIONS

40       -h, --help
41              Show help text and exit.
42
43       -n, --num=N
44              Show N results per page (default 10). N must be  between  0  and
45              25. N=0 disables fixed paging and shows actual number of results
46              fetched per page.
47
48       -r, --reg=REG
49              Region-specific search e.g.  'us-en'  for  US  (default);  visit
50              https://duckduckgo.com/params.
51
52       -C, --nocolor
53              Disable color output.
54
55       --colors=COLORS
56              Set  output  colors.  Refer  to  the  COLORS  section  below for
57              details.
58
59       -j, --ducky
60              Open the first result in  a  web  browser;  implies  --noprompt.
61              Feeling Ducky?
62
63       -t, --time=SPAN
64              Time  limit  search  [d=past  day,  w=past  week,  m=past month]
65              (default=any time).
66
67       -w, --site=SITE
68              Search a site using DuckDuckGo.
69
70       -x, --expand
71              Expand URLs instead of showing only the domain name (default).
72
73       -p, --proxy=URI
74              Tunnel traffic through  an  HTTP  proxy.  URI  is  of  the  form
75              [http[s]://][user:pwd@]host[:port].  The  proxy server must sup‐
76              port HTTP CONNECT tunneling and must not block port 443 for  the
77              relevant  DuckDuckGo  hosts. If a proxy is not explicitly given,
78              the https_proxy or HTTPS_PROXY environment variable  (if  avail‐
79              able) is used instead.
80
81       -I, --noinstant
82              Disable instant answer.
83
84       --unsafe
85              Disable safe search.
86
87       --noua Disable user agent. Results are fetched faster.
88
89       --json Output in JSON format; implies --noprompt.
90
91       --gb, --gui-browser
92              Open a bang directly in a GUI browser.
93
94       --np, --noprompt
95              Perform search and exit; do not prompt for further interactions.
96
97       --url-handler=UTIL
98              Custom script or command-line utility to open urls with.
99
100       --show-browser-logs
101              Do  not  suppress browser output when opening result in browser;
102              that is, connect stdout and stderr of the browser to ddgr's std‐
103              out  and stderr instead of /dev/null. By default, browser output
104              is suppressed (due to certain graphical  browsers  spewing  mes‐
105              sages  to  console) unless the BROWSER environment variable is a
106              known text-based browser:  elinks,  links,  lynx,  w3m  or  www-
107              browser.
108
109       -v, --version
110              Show version number and exit.
111
112       -d, --debug
113              Enable debugging.
114

OMNIPROMPT KEYS

116       n, p, f
117              Fetch the next, previous or first set of search results.
118
119       index  Open the result corresponding to index in browser.
120
121       o [index|range|a ...]
122              Open  space-separated  result  indices,  numeric  ranges  or all
123              indices, if 'a' is specified, in the browser.
124
125       O [index|range|a ...]
126              Works similar  to  key  'o',  but  tries  to  ignore  text-based
127              browsers  (even  if  BROWSER  is  set)  and  open links in a GUI
128              browser.
129
130       d keywords
131              Initiate a new DuckDuckGo  search  for  keywords  with  original
132              options.  This  key  should  be  used  to search omniprompt keys
133              (including itself) and indices.
134
135       x      Toggle url expansion.
136
137       c index
138              Copy url to clipboard.
139
140       q, ^D, double Enter
141              Exit ddgr.
142
143       ?      Show omniprompt help.
144
145       *      Any other string initiates a new search with original options.
146

COLORS

148       ddgr allows you to customize the color scheme via a six-letter  string,
149       reminiscent of BSD LSCOLORS. The six letters represent the colors of
150
151       - indices
152       - titles
153       - URLs
154       - metadata/publishing info
155       - abstracts
156       - prompts
157
158       respectively. The six-letter string is passed in either as the argument
159       to the --colors option, or as the value  of  the  environment  variable
160       DDGR_COLORS.
161
162       We offer the following colors/styles:
163
164         ┌───────┬───────────────────────────────────────────────────┐
165         │Letter │ Color/Style                                       │
166         ├───────├───────────────────────────────────────────────────┤
167         │a      │ black                                             │
168         │b      │ red                                               │
169         │c      │ green                                             │
170         │d      │ yellow                                            │
171         │e      │ blue                                              │
172         │f      │ magenta                                           │
173         │g      │ cyan                                              │
174         │h      │ white                                             │
175         │i      │ bright black                                      │
176         │j      │ bright red                                        │
177         │k      │ bright green                                      │
178         │l      │ bright yellow                                     │
179         │m      │ bright blue                                       │
180         │n      │ bright magenta                                    │
181         │o      │ bright cyan                                       │
182         │p      │ bright white                                      │
183         │A-H    │ bold version of the lowercase-letter color        │
184         │I-P    │ bold version of the lowercase-letter bright color │
185         │x      │ normal                                            │
186         │X      │ bold                                              │
187         │y      │ reverse video                                     │
188         │Y      │ bold reverse video                                │
189         └───────┴───────────────────────────────────────────────────┘
190
191       The default colors string is oCdgxy, which stands for
192
193       - bright cyan indices
194       - bold green titles
195       - yellow URLs
196       - cyan metadata/publishing info
197       - normal abstracts
198       - reverse video prompts
199
200       Note that
201
202       - Bright  colors (implemented as \x1b[90m - \x1b[97m) may not be
203         available in all color-capable terminal emulators;
204
205       - Some terminal  emulators  draw  bold  text  in  bright  colors
206         instead;
207
208       - Some  terminal  emulators  only  distinguish  between bold and
209         bright colors via a default-off switch.
210
211       Please consult the manual of your terminal emulator as  well  as
212       https://en.wikipedia.org/wiki/ANSI_escape_code for details.
213

ENVIRONMENT

215       BROWSER
216              Overrides       the       default      browser.      Ref:
217              http://docs.python.org/library/webbrowser.html
218
219       DDGR_COLORS
220              Refer to the COLORS section.
221
222       DISABLE_PROMPT_COLOR
223              Force a plain omniprompt if you are  facing  issues  with
224              colors at the prompt.
225
226       HTTPS_PROXY, https_proxy
227              Refer to the --proxy option.
228

EXAMPLES

230       1.  DuckDuckGo hello world:
231
232              ddgr hello world
233
234       2.  I'm Feeling Ducky search:
235
236              ddgr -j lucky ducks
237
238       3.  DuckDuckGo Bang search 'hello world' in Wikipedia:
239
240              ddgr !w hello world
241              ddgr \!w hello world // bash-specific, need to escape ! on bash
242
243           Bangs  work  at  the omniprompt too. To look up bangs, visit
244           https://duckduckgo.com/bang?#bangs-list.
245
246       4.  Bang alias to fire from the cmdline, open results in  a  GUI
247           browser and exit:
248
249              alias bang='ddgr --gb --np'
250
251              bang !w hello world
252              bang \!w hello world // bash-specific, need to escape ! on bash
253
254       5.  Website specific search:
255
256              ddgr -w amazon.com digital camera
257
258           Site specific search continues at omniprompt.
259
260       6.  Search for a specific file type:
261
262              ddgr instrumental filetype:mp3
263
264       7.  Fetch results on IPL cricket from India in English:
265
266              ddgr -r in-en IPL cricket
267
268           To  find  your  region  parameter  token visit https://duck
269           duckgo.com/params.
270
271       8.  Search quoted text:
272
273              ddgr it\'s a \"beautiful world\" in spring
274
275       9.  Show complete urls in search results (instead of only domain
276           name):
277
278              ddgr -x ddgr
279
280       10. Use  a  custom  color  scheme,  e.g.,  one warm color scheme
281           designed for Solarized Dark:
282
283              ddgr --colors bjdxxy hello world
284
285              DDGR_COLORS=bjdxxy ddgr hello world
286
287       11. Tunnel traffic through an HTTPS proxy, e.g., a local Privoxy
288           instance listening on port 8118:
289
290              ddgr --proxy localhost:8118 hello world
291
292           By   default   the   environment  variable  https_proxy  (or
293           HTTPS_PROXY) is used, if defined.
294
295       12. Look up n, p, o, O, q, d keywords or a result index  at  the
296           omniprompt: as the omniprompt recognizes these keys or index
297           strings as commands, you need to prefix them with d, e.g.,
298
299              d n
300              d d keywords
301              d 1
302

AUTHOR

304       Arun Prakash Jana <engineerarun@gmail.com>
305

HOME

307       https://github.com/jarun/ddgr
308

REPORTING BUGS

310       https://github.com/jarun/ddgr/issues
311

LICENSE

313       Copyright © 2016-2018 Arun Prakash Jana <engineerarun@gmail.com>
314
315       License    GPLv3+:    GNU    GPL    version    3    or     later
316       <http://gnu.org/licenses/gpl.html>.
317       This  is  free software: you are free to change and redistribute
318       it. There is NO WARRANTY, to the extent permitted by law.
319
320
321
322Version 1.6                       16 Nov 2018                          DDGR(1)
Impressum