Browse code

Add `websearch`

Robert Cranston authored on 24/11/2025 22:08:42
Showing 2 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+websearch()
2
+{
3
+  # See <https://duckduckgo.com/bangs>.
4
+  xdg-open "https://duckduckgo.com/lite/?q=!ducky ${2+site:}$*"
5
+}
... ...
@@ -2,10 +2,15 @@
2 2
 
3 3
 [Dotfile][]s for searching the [web][] from the [shell][].
4 4
 
5
+Provided shell functions:
6
+
7
+-   `websearch [<site> [<terms>...]]`: The first [DuckDuckGo][] search result.
8
+
5 9
 [`dotfiles-websearch`]: https://git.rcrnstn.net/rcrnstn/dotfiles-websearch
6 10
 [dotfile]: https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory#Unix_and_Unix-like_environments
7 11
 [web]: https://en.wikipedia.org/wiki/World_Wide_Web
8 12
 [shell]: https://en.wikipedia.org/wiki/Unix_shell
13
+[DuckDuckGo]: https://en.wikipedia.org/wiki/DuckDuckGo
9 14
 
10 15
 ## License
11 16