1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 12:21:00 +01:00

2 Commits

Author SHA1 Message Date
Nihad Abbasov
dc3bbcda26 feat(web-search): add RubyGems.org (#13210) 2025-07-18 12:53:14 +02:00
Zachary Craig
df200c943a feat(keychain): support >2.9 (#13189)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2025-07-18 12:44:05 +02:00
3 changed files with 12 additions and 2 deletions

View File

@@ -19,8 +19,15 @@ function {
# load additional options # load additional options
zstyle -a :omz:plugins:keychain options options zstyle -a :omz:plugins:keychain options options
# start keychain... # Check keychain version to decide whether to use --agents
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST local version_string=$(keychain --version 2>&1 | head -n 2 | tail -n 1 | cut -d ' ' -f 4)
# start keychain, only use --agents for versions below 2.9.0
autoload -Uz is-at-least
if is-at-least 2.9 "$version_string"; then
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
else
keychain ${^options:-} ${^identities} --host $SHORT_HOST
fi
# Get the filenames to store/lookup the environment from # Get the filenames to store/lookup the environment from
_keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh" _keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh"

View File

@@ -47,6 +47,7 @@ Available search contexts are:
| `youtube` | `https://www.youtube.com/results?search_query=` | | `youtube` | `https://www.youtube.com/results?search_query=` |
| `deepl` | `https://www.deepl.com/translator#auto/auto/` | | `deepl` | `https://www.deepl.com/translator#auto/auto/` |
| `dockerhub` | `https://hub.docker.com/search?q=` | | `dockerhub` | `https://hub.docker.com/search?q=` |
| `gems` | `https://rubygems.org/search?query=` |
| `npmpkg` | `https://www.npmjs.com/search?q=` | | `npmpkg` | `https://www.npmjs.com/search?q=` |
| `packagist` | `https://packagist.org/?query=` | | `packagist` | `https://packagist.org/?query=` |
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` |

View File

@@ -28,6 +28,7 @@ function web_search() {
youtube "https://www.youtube.com/results?search_query=" youtube "https://www.youtube.com/results?search_query="
deepl "https://www.deepl.com/translator#auto/auto/" deepl "https://www.deepl.com/translator#auto/auto/"
dockerhub "https://hub.docker.com/search?q=" dockerhub "https://hub.docker.com/search?q="
gems "https://rubygems.org/search?query="
npmpkg "https://www.npmjs.com/search?q=" npmpkg "https://www.npmjs.com/search?q="
packagist "https://packagist.org/?query=" packagist "https://packagist.org/?query="
gopkg "https://pkg.go.dev/search?m=package&q=" gopkg "https://pkg.go.dev/search?m=package&q="
@@ -83,6 +84,7 @@ alias ask='web_search ask'
alias youtube='web_search youtube' alias youtube='web_search youtube'
alias deepl='web_search deepl' alias deepl='web_search deepl'
alias dockerhub='web_search dockerhub' alias dockerhub='web_search dockerhub'
alias gems='web_search gems'
alias npmpkg='web_search npmpkg' alias npmpkg='web_search npmpkg'
alias packagist='web_search packagist' alias packagist='web_search packagist'
alias gopkg='web_search gopkg' alias gopkg='web_search gopkg'