Compare commits

...

3 Commits

Author SHA1 Message Date
Thomas Boyer 19b15e9aea
Merge 01e06b931a into 5c17bcd21f 2025-01-08 09:49:22 +01:00
Bhanu 5c17bcd21f
feat(web-search): add perplexity.ai (#12815) 2025-01-08 09:34:00 +01:00
Thomas Boyer 01e06b931a feat(direnv): warn user if direnv not found
Instead of silently not installing the shell hooks, issue a warning (then keep doing nothing).
2024-12-10 15:20:44 +01:00
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Don't continue if direnv is not found # If direnv is not found, don't continue and print a warning
command -v direnv &>/dev/null || return if ! command -v direnv &>/dev/null; then
echo "Warning: direnv not found. Please install direnv and ensure it's in your PATH before using this plugin."
return
fi
_direnv_hook() { _direnv_hook() {
trap -- '' SIGINT; trap -- '' SIGINT;

View File

@ -52,6 +52,7 @@ Available search contexts are:
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
| `chatgpt` | `https://chatgpt.com/?q=` | | `chatgpt` | `https://chatgpt.com/?q=` |
| `reddit` | `https://www.reddit.com/search/?q=` | | `reddit` | `https://www.reddit.com/search/?q=` |
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
Also there are aliases for bang-searching DuckDuckGo: Also there are aliases for bang-searching DuckDuckGo:

View File

@ -33,6 +33,7 @@ function web_search() {
gopkg "https://pkg.go.dev/search?m=package&q=" gopkg "https://pkg.go.dev/search?m=package&q="
chatgpt "https://chatgpt.com/?q=" chatgpt "https://chatgpt.com/?q="
reddit "https://www.reddit.com/search/?q=" reddit "https://www.reddit.com/search/?q="
ppai "https://www.perplexity.ai/search/new?q="
) )
# check whether the search engine is supported # check whether the search engine is supported
@ -87,6 +88,7 @@ alias packagist='web_search packagist'
alias gopkg='web_search gopkg' alias gopkg='web_search gopkg'
alias chatgpt='web_search chatgpt' alias chatgpt='web_search chatgpt'
alias reddit='web_search reddit' alias reddit='web_search reddit'
alias ppai='web_search ppai'
#add your own !bang searches here #add your own !bang searches here
alias wiki='web_search duckduckgo \!w' alias wiki='web_search duckduckgo \!w'