blob: a04b1b0c6a43c37192238107b6657445244607de (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env bash
set -e
# @describe Perform a web search using DuckDuckGo API to get up-to-date information or additional context.
# Use this when you need current information or feel a search could provide a better answer.
# @meta require-tools ddgr
# @env DDG_MAX_RESULTS=5 The max results to return.
# @option --query! The query to search for.
main() {
ddgr -n $DDG_MAX_RESULTS --json "$argc_query"
}
eval "$(argc --argc-eval "$0" "$@")"
|