init commit
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# @describe Use this function to search DuckDuckGo for a query.
|
||||
# @meta require-tools ddgr
|
||||
# @option --query! The query to search for.
|
||||
# @option --max-results=5 The number of returned results.
|
||||
|
||||
main() {
|
||||
ddgr --num $argc_max_results --json "$argc_query" | \
|
||||
jq -r '.[] | "**[\(.title)](\(.url))**\n\(.abstract)\n"'
|
||||
}
|
||||
|
||||
eval "$(argc --argc-eval "$0" "$@")"
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# @describe Executes a shell command and returns the output.
|
||||
# @option --shell-command~ "Shell command to execute, such as `ls -la`"
|
||||
|
||||
main() {
|
||||
eval $argc_shell_command
|
||||
}
|
||||
|
||||
eval "$(argc --argc-eval "$0" "$@")"
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# @describe Get the current weather in a given location.
|
||||
# @option --location! The city and state, e.g. San Francisco, CA
|
||||
|
||||
main() {
|
||||
curl "https://wttr.in/$(echo "$argc_location" | sed 's/ /+/g')?format=4&M"
|
||||
}
|
||||
|
||||
eval "$(argc --argc-eval "$0" "$@")"
|
||||
Reference in New Issue
Block a user