Skip to content

Commit fa239e4

Browse files
pomdtrmattisssa
pomdtr
authored andcommitted
Add I'm feeling lucky cmd using ddgr
capitalize placeholder, add region as a setting improve description add region setting Add long flag for readability remove stderr
1 parent fe2b629 commit fa239e4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Required parameters:
4+
# @raycast.schemaVersion 1
5+
# @raycast.title I'm Feeling Ducky
6+
# @raycast.mode silent
7+
8+
# Optional parameters:
9+
# @raycast.icon ./images/duck-duck-go.png
10+
# @raycast.argument1 { "type": "text", "placeholder": "Query" }
11+
# @raycast.packageName Web Searches
12+
13+
# Documentation:
14+
# @raycast.description Open the first DuckDuckGo search result page for your query (also supports bang!)
15+
# @raycast.author Achille Lacoin
16+
# @raycast.authorURL https://github.com/pomdtr
17+
18+
# region-specific search e.g. 'us-en' for US (default);
19+
# visit https://duckduckgo.com/params
20+
REGION=us-en
21+
22+
if ! command -v tldr &>/dev/null; then
23+
echo "ddgr is not installed."
24+
echo "Installation instructions: https://github.com/jarun/ddgr#installation"
25+
exit 1
26+
fi
27+
28+
query=$1
29+
ddgr --ducky --noprompt "$query" --reg "$REGION" &> /dev/null

0 commit comments

Comments
 (0)