From df200c943a1dcfa040f334b8006e495af39205fd Mon Sep 17 00:00:00 2001 From: Zachary Craig Date: Fri, 18 Jul 2025 06:44:05 -0400 Subject: [PATCH 01/16] feat(keychain): support >2.9 (#13189) Co-authored-by: Carlo Sala --- plugins/keychain/keychain.plugin.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh index f122f7982..8caf671f5 100644 --- a/plugins/keychain/keychain.plugin.zsh +++ b/plugins/keychain/keychain.plugin.zsh @@ -19,8 +19,15 @@ function { # load additional options zstyle -a :omz:plugins:keychain options options - # start keychain... - keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST + # Check keychain version to decide whether to use --agents + 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 _keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh" From dc3bbcda2689b26cfb16e714225e263fa74e3f70 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Fri, 18 Jul 2025 13:53:14 +0300 Subject: [PATCH 02/16] feat(web-search): add RubyGems.org (#13210) --- plugins/web-search/README.md | 1 + plugins/web-search/web-search.plugin.zsh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md index d0b03dff2..ed484f237 100644 --- a/plugins/web-search/README.md +++ b/plugins/web-search/README.md @@ -47,6 +47,7 @@ Available search contexts are: | `youtube` | `https://www.youtube.com/results?search_query=` | | `deepl` | `https://www.deepl.com/translator#auto/auto/` | | `dockerhub` | `https://hub.docker.com/search?q=` | +| `gems` | `https://rubygems.org/search?query=` | | `npmpkg` | `https://www.npmjs.com/search?q=` | | `packagist` | `https://packagist.org/?query=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` | diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index ff77faed7..4eb42be57 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -28,6 +28,7 @@ function web_search() { youtube "https://www.youtube.com/results?search_query=" deepl "https://www.deepl.com/translator#auto/auto/" dockerhub "https://hub.docker.com/search?q=" + gems "https://rubygems.org/search?query=" npmpkg "https://www.npmjs.com/search?q=" packagist "https://packagist.org/?query=" gopkg "https://pkg.go.dev/search?m=package&q=" @@ -83,6 +84,7 @@ alias ask='web_search ask' alias youtube='web_search youtube' alias deepl='web_search deepl' alias dockerhub='web_search dockerhub' +alias gems='web_search gems' alias npmpkg='web_search npmpkg' alias packagist='web_search packagist' alias gopkg='web_search gopkg' From 8425e9774ea4be998a51c8c73c7f6e33000f9176 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Mon, 21 Jul 2025 10:04:10 +0200 Subject: [PATCH 03/16] fix(keychain): reversed logic Closes #13106 --- plugins/keychain/keychain.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh index 8caf671f5..ce5351bce 100644 --- a/plugins/keychain/keychain.plugin.zsh +++ b/plugins/keychain/keychain.plugin.zsh @@ -24,9 +24,9 @@ function { # 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 + else + keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST fi # Get the filenames to store/lookup the environment from From 2ac69955e84d5ab2407e848275dfc2768b3b1531 Mon Sep 17 00:00:00 2001 From: Kevin De Keyser Date: Mon, 21 Jul 2025 17:11:35 +0800 Subject: [PATCH 04/16] fix(termsupport): ensure non-error return code (#13217) --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 994c9c322..852a543c5 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -53,7 +53,7 @@ function omz_termsupport_precmd { # Runs before executing the command function omz_termsupport_preexec { - [[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return + [[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return 0 emulate -L zsh setopt extended_glob From ff97957f1ccb33b1c1c27e47e2e24789ce2ae33f Mon Sep 17 00:00:00 2001 From: Bacluc Date: Mon, 21 Jul 2025 18:37:09 +0200 Subject: [PATCH 05/16] feat(tmux): avoid autostart inside `zed` editor (#13220) --- plugins/tmux/tmux.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index d2729ec09..4c184c2d0 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -188,7 +188,7 @@ function _tmux_directory_session() { alias tds=_tmux_directory_session # Autostart if not already in tmux and enabled. -if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" ]]; then +if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" && -z "$ZED_TERM" ]]; then # Actually don't autostart if we already did and multiple autostarts are disabled. if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then export ZSH_TMUX_AUTOSTARTED=true From e3e468d1388d262b0018350a1248a176bfb31660 Mon Sep 17 00:00:00 2001 From: jishudashen Date: Tue, 22 Jul 2025 00:39:25 +0800 Subject: [PATCH 06/16] chore: fix typos (#13219) --- lib/completion.zsh | 2 +- plugins/dnf/_dnf5 | 2 +- plugins/dotnet/dotnet.plugin.zsh | 2 +- plugins/git/git.plugin.zsh | 2 +- plugins/systemadmin/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 5a233a322..3823c2544 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -40,7 +40,7 @@ fi # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories -# Use caching so that commands like apt and dpkg complete are useable +# Use caching so that commands like apt and dpkg complete are usable zstyle ':completion:*' use-cache yes zstyle ':completion:*' cache-path $ZSH_CACHE_DIR diff --git a/plugins/dnf/_dnf5 b/plugins/dnf/_dnf5 index 9cbf451a8..3422fae32 100644 --- a/plugins/dnf/_dnf5 +++ b/plugins/dnf/_dnf5 @@ -272,7 +272,7 @@ _dnf5-repoquery() { for v in enhance obsolete provide recommend require suggest supplement; do opts+=( "--what${v}s=[limit to packages that $v specified capabilities]:list of capability: ") done - # mutually exclusive formating options + # mutually exclusive formatting options opts+=( + '(format)' '--conflicts[display capabilities that the package conflicts with]' diff --git a/plugins/dotnet/dotnet.plugin.zsh b/plugins/dotnet/dotnet.plugin.zsh index adc1ec678..2b7782474 100644 --- a/plugins/dotnet/dotnet.plugin.zsh +++ b/plugins/dotnet/dotnet.plugin.zsh @@ -10,7 +10,7 @@ _dotnet_completion() { compdef _dotnet_completion dotnet -# Aliases bellow are here for backwards compatibility +# Aliases below are here for backwards compatibility # added by Shaun Tabone (https://github.com/xontab) alias dn='dotnet new' diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 1d043da35..335eaa8d0 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -86,7 +86,7 @@ function work_in_progress() { # Aliases # (sorted alphabetically by command) # (order should follow README) -# (in some cases force the alisas order to match README, like for example gke and gk) +# (in some cases force the alias order to match README, like for example gke and gk) # alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' diff --git a/plugins/systemadmin/README.md b/plugins/systemadmin/README.md index 7ff21a635..7847e15e9 100644 --- a/plugins/systemadmin/README.md +++ b/plugins/systemadmin/README.md @@ -49,4 +49,4 @@ plugins=(... systemadmin) | geteip | Gather information regarding an external IP address using [icanhazip.com](https://icanhazip.com) | | getip | Determine the local IP Address with `ip addr` or `ifconfig` | | clrz | Clear zombie processes | -| conssec | Show number of concurrent connections per second based on ngnix/access.log file or another log file if specified | +| conssec | Show number of concurrent connections per second based on nginx/access.log file or another log file if specified | From 537807c863a90c51a4ec6fbb6b818c3668472425 Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Tue, 22 Jul 2025 01:58:09 +0900 Subject: [PATCH 07/16] feat(alias-finder): use ripgrep if possible (#13043) Co-authored-by: Carlo Sala --- plugins/alias-finder/README.md | 8 +++++--- plugins/alias-finder/alias-finder.plugin.zsh | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/alias-finder/README.md b/plugins/alias-finder/README.md index a9bbd0838..b24f8d4ac 100644 --- a/plugins/alias-finder/README.md +++ b/plugins/alias-finder/README.md @@ -11,6 +11,8 @@ plugins=(... alias-finder) To enable it for every single command, set zstyle in your `~/.zshrc`. +If the user has installed `rg`([ripgrep](https://github.com/BurntSushi/ripgrep)), it will be used because it's faster. Otherwise, it will use the `grep` command. + ```zsh # ~/.zshrc @@ -28,7 +30,7 @@ When you execute a command alias finder will look at your defined aliases and su Running the un-aliased `git status` command: ```sh -╭─tim@fox ~/repo/gitopolis ‹main› +╭─tim@fox ~/repo/gitopolis ‹main› ╰─$ git status gst='git status' # <=== shorter suggestion from alias-finder @@ -40,7 +42,7 @@ nothing to commit, working tree clean Running a shorter `git st` alias from `.gitconfig` that it suggested : ```sh -╭─tim@fox ~/repo/gitopolis ‹main› +╭─tim@fox ~/repo/gitopolis ‹main› ╰─$ git st gs='git st' # <=== shorter suggestion from alias-finder ## main...origin/main @@ -48,7 +50,7 @@ gs='git st' # <=== shorter suggestion from alias-finder Running the shortest `gs` shell alias that it found: ```sh -╭─tim@fox ~/repo/gitopolis ‹main› +╭─tim@fox ~/repo/gitopolis ‹main› ╰─$ gs # <=== no suggestions alias-finder because this is the shortest ## main...origin/main diff --git a/plugins/alias-finder/alias-finder.plugin.zsh b/plugins/alias-finder/alias-finder.plugin.zsh index 2351a439e..6f24c7089 100644 --- a/plugins/alias-finder/alias-finder.plugin.zsh +++ b/plugins/alias-finder/alias-finder.plugin.zsh @@ -43,7 +43,11 @@ alias-finder() { filter="^'?.{1,$((cmdLen - 1))}'?=" # some aliases is surrounded by single quotes fi - alias | grep -E "$filter" | grep -E "=$finder" + if (( $+commands[rg] )); then + alias | rg "$filter" | rg "=$finder" + else + alias | grep -E "$filter" | grep -E "=$finder" + fi if [[ $exact == true ]]; then break # because exact case is only one From 788b5776c03996d6c88dce786f9e0879a0c3aa6e Mon Sep 17 00:00:00 2001 From: Wagner Moreira <47096330+wagnermor@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:29:47 -0300 Subject: [PATCH 08/16] feat(web-search): add search with `claude.ai` and `grok.com` (#13222) --- plugins/web-search/README.md | 2 ++ plugins/web-search/web-search.plugin.zsh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md index ed484f237..26017a533 100644 --- a/plugins/web-search/README.md +++ b/plugins/web-search/README.md @@ -52,6 +52,8 @@ Available search contexts are: | `packagist` | `https://packagist.org/?query=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` | | `chatgpt` | `https://chatgpt.com/?q=` | +| `claude` | `https://claude.ai/new?q=` | +| `grok` | `https://grok.com/?q=` | | `reddit` | `https://www.reddit.com/search/?q=` | | `ppai` | `https://www.perplexity.ai/search/new?q=` | diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 4eb42be57..b04302ad6 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -33,6 +33,8 @@ function web_search() { packagist "https://packagist.org/?query=" gopkg "https://pkg.go.dev/search?m=package&q=" chatgpt "https://chatgpt.com/?q=" + grok "https://grok.com/?q=" + claude "https://claude.ai/new?q=" reddit "https://www.reddit.com/search/?q=" ppai "https://www.perplexity.ai/search/new?q=" ) @@ -89,6 +91,8 @@ alias npmpkg='web_search npmpkg' alias packagist='web_search packagist' alias gopkg='web_search gopkg' alias chatgpt='web_search chatgpt' +alias grok='web_search grok' +alias claude='web_search claude' alias reddit='web_search reddit' alias ppai='web_search ppai' @@ -108,3 +112,4 @@ if [[ ${#ZSH_WEB_SEARCH_ENGINES} -gt 0 ]]; then done unset engines key fi + From 13d4176a686507678ffd1b889838356f95f217e0 Mon Sep 17 00:00:00 2001 From: Gregory Menezes Date: Wed, 23 Jul 2025 16:16:18 +1000 Subject: [PATCH 09/16] fix(web-search): rename alias to `claudeai` to avoid conflict with CLI (#13224) --- plugins/web-search/README.md | 2 +- plugins/web-search/web-search.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md index 26017a533..bc017a1f1 100644 --- a/plugins/web-search/README.md +++ b/plugins/web-search/README.md @@ -52,7 +52,7 @@ Available search contexts are: | `packagist` | `https://packagist.org/?query=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` | | `chatgpt` | `https://chatgpt.com/?q=` | -| `claude` | `https://claude.ai/new?q=` | +| `claudeai` | `https://claude.ai/new?q=` | | `grok` | `https://grok.com/?q=` | | `reddit` | `https://www.reddit.com/search/?q=` | | `ppai` | `https://www.perplexity.ai/search/new?q=` | diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index b04302ad6..14fc613bb 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -34,7 +34,7 @@ function web_search() { gopkg "https://pkg.go.dev/search?m=package&q=" chatgpt "https://chatgpt.com/?q=" grok "https://grok.com/?q=" - claude "https://claude.ai/new?q=" + claudeai "https://claude.ai/new?q=" reddit "https://www.reddit.com/search/?q=" ppai "https://www.perplexity.ai/search/new?q=" ) From 70f0e5285f802ce6eb7feea4588ff8917246233e Mon Sep 17 00:00:00 2001 From: Malav Bhavsar Date: Fri, 25 Jul 2025 00:53:51 -0700 Subject: [PATCH 10/16] fix(web-search): rename `claude` alias (#13229) Rename the 'claude' alias to 'claudeai' in the web-search plugin to prevent conflicts with the Claude CLI tool. This ensures users can access both the web search functionality and the Claude CLI without collision. --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 14fc613bb..98826ef72 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -92,7 +92,7 @@ alias packagist='web_search packagist' alias gopkg='web_search gopkg' alias chatgpt='web_search chatgpt' alias grok='web_search grok' -alias claude='web_search claude' +alias claudeai='web_search claudeai' alias reddit='web_search reddit' alias ppai='web_search ppai' From 52f7ad6913cd039c32f4088d101c30db2492d518 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 18:55:43 +0200 Subject: [PATCH 11/16] chore(deps): bump certifi in /.github/workflows/dependencies (#13218) Bumps [certifi](https://github.com/certifi/python-certifi) from 2025.4.26 to 2025.7.14. - [Commits](https://github.com/certifi/python-certifi/compare/2025.04.26...2025.07.14) --- updated-dependencies: - dependency-name: certifi dependency-version: 2025.7.14 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dependencies/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies/requirements.txt b/.github/workflows/dependencies/requirements.txt index d2c8bdcc9..4c55ff760 100644 --- a/.github/workflows/dependencies/requirements.txt +++ b/.github/workflows/dependencies/requirements.txt @@ -1,4 +1,4 @@ -certifi==2025.4.26 +certifi==2025.7.14 charset-normalizer==3.4.2 idna==3.10 PyYAML==6.0.2 From 98a182d71b59a24d6b694d3e6b7a49212c06e04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 28 Jul 2025 19:13:35 +0200 Subject: [PATCH 12/16] ci: add strict permissions to `dependencies.yml` workflow (#13232) Just use `contents:read` initial permission. The other permissions needed are those attached to the @ohmyzsh GitHub App. --- .github/workflows/dependencies.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 6c7387089..b4a17912b 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -4,6 +4,9 @@ on: schedule: - cron: "0 6 * * 0" +permissions: + contents: read + jobs: check: name: Check for updates From 5c804257ceb5b3062b876afae290adf72c474aad Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Mon, 28 Jul 2025 19:20:50 +0200 Subject: [PATCH 13/16] ci: use `actions/create-github-app-token` (#13233) --- .github/workflows/dependencies.yml | 10 +++++----- .github/workflows/project.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index b4a17912b..0b8eeda93 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -18,11 +18,11 @@ jobs: with: fetch-depth: 0 - name: Authenticate as @ohmyzsh - id: generate_token - uses: ohmyzsh/github-app-token@v2 + id: generate-token + uses: actions/create-github-app-token@v2 with: - app_id: ${{ secrets.OHMYZSH_APP_ID }} - private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} + app-id: ${{ secrets.OHMYZSH_APP_ID }} + private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} - name: Setup Python uses: actions/setup-python@v5 with: @@ -30,7 +30,7 @@ jobs: cache: "pip" - name: Process dependencies env: - GH_TOKEN: ${{ steps.generate_token.outputs.token }} + GH_TOKEN: ${{ steps.generate-token.outputs.token }} GIT_APP_NAME: ohmyzsh[bot] GIT_APP_EMAIL: 54982679+ohmyzsh[bot]@users.noreply.github.com TMP_DIR: ${{ runner.temp }} diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 2c2a1cdaa..8fd4e15d4 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -17,13 +17,13 @@ jobs: if: github.repository == 'ohmyzsh/ohmyzsh' steps: - name: Authenticate as @ohmyzsh - id: generate_token - uses: ohmyzsh/github-app-token@v2 + id: generate-token + uses: actions/create-github-app-token@v2 with: - app_id: ${{ secrets.OHMYZSH_APP_ID }} - private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} + app-id: ${{ secrets.OHMYZSH_APP_ID }} + private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }} - name: Store app token - run: echo "GH_TOKEN=${{ steps.generate_token.outputs.token }}" >> "$GITHUB_ENV" + run: echo "GH_TOKEN=${{ steps.generate-token.outputs.token }}" >> "$GITHUB_ENV" - name: Read project data env: ORGANIZATION: ohmyzsh From a6beb0f5958e935d33b0edb6d4470c3d7c4e8917 Mon Sep 17 00:00:00 2001 From: Parintorn Thammasitboon <159538649+parintorn0@users.noreply.github.com> Date: Fri, 1 Aug 2025 15:08:48 +0700 Subject: [PATCH 14/16] feat(jonathan): add conda support (#13243) --- themes/jonathan.zsh-theme | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme index da6ed2281..5185ebf77 100644 --- a/themes/jonathan.zsh-theme +++ b/themes/jonathan.zsh-theme @@ -8,14 +8,15 @@ function theme_precmd { local rubypromptsize=${#${(%)$(ruby_prompt_info)}} local pwdsize=${#${(%):-%~}} local venvpromptsize=$((${#$(virtualenv_prompt_info)})) + local condapromptsize=$((${#$(conda_prompt_info)})) # Truncate the path if it's too long. - if (( promptsize + rubypromptsize + pwdsize + venvpromptsize > TERMWIDTH )); then + if (( promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize > TERMWIDTH )); then (( PR_PWDLEN = TERMWIDTH - promptsize )) elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then - PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${PR_HBAR}:)}" + PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${PR_HBAR}:)}" else - PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}" + PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}" fi } @@ -104,7 +105,7 @@ fi PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\ ${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\ ${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\ -${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\ +${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\ ${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\ ${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\ From ef96242b9baad6b2211c386cb9af9418ace5d876 Mon Sep 17 00:00:00 2001 From: xusd320 Date: Thu, 7 Aug 2025 14:46:00 +0800 Subject: [PATCH 15/16] feat(web-search): add crates.io, docs.rs (#13250) --- plugins/web-search/web-search.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 98826ef72..93237f4e2 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -37,6 +37,8 @@ function web_search() { claudeai "https://claude.ai/new?q=" reddit "https://www.reddit.com/search/?q=" ppai "https://www.perplexity.ai/search/new?q=" + rscrate "https://crates.io/search?q=" + rsdoc "https://docs.rs/releases/search?query=" ) # check whether the search engine is supported @@ -95,6 +97,8 @@ alias grok='web_search grok' alias claudeai='web_search claudeai' alias reddit='web_search reddit' alias ppai='web_search ppai' +alias rscrate='web_search rscrate' +alias rsdoc='web_search rsdoc' #add your own !bang searches here alias wiki='web_search duckduckgo \!w' From 9d8d4cf41482a95127ca41faecc0a7ee0781ca2e Mon Sep 17 00:00:00 2001 From: drjaska <88596812+drjaska@users.noreply.github.com> Date: Fri, 8 Aug 2025 12:23:24 +0300 Subject: [PATCH 16/16] feat(extract): support `.pk{3,4,7}` files (#13254) --- plugins/extract/README.md | 97 +++++++++++++++--------------- plugins/extract/_extract | 3 + plugins/extract/extract.plugin.zsh | 4 +- 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/plugins/extract/README.md b/plugins/extract/README.md index e0f571521..7bedfb1c6 100644 --- a/plugins/extract/README.md +++ b/plugins/extract/README.md @@ -14,53 +14,56 @@ plugins=(... extract) ## Supported file extensions -| Extension | Description | -| :---------------- | :----------------------------------- | -| `7z` | 7zip file | -| `Z` | Z archive (LZW) | -| `apk` | Android app file | -| `aar` | Android library file | -| `bz2` | Bzip2 file | -| `cab` | Microsoft cabinet archive | -| `cpio` | Cpio archive | -| `deb` | Debian package | -| `ear` | Enterprise Application aRchive | -| `exe` | Windows executable file | -| `gz` | Gzip file | -| `ipa` | iOS app package | -| `ipsw` | iOS firmware file | -| `jar` | Java Archive | -| `lrz` | LRZ archive | -| `lz4` | LZ4 archive | -| `lzma` | LZMA archive | -| `obscpio` | cpio archive used on OBS | -| `rar` | WinRAR archive | -| `rpm` | RPM package | -| `sublime-package` | Sublime Text package | -| `tar` | Tarball | -| `tar.bz2` | Tarball with bzip2 compression | -| `tar.gz` | Tarball with gzip compression | -| `tar.lrz` | Tarball with lrzip compression | -| `tar.lz` | Tarball with lzip compression | -| `tar.lz4` | Tarball with lz4 compression | -| `tar.xz` | Tarball with lzma2 compression | -| `tar.zma` | Tarball with lzma compression | -| `tar.zst` | Tarball with zstd compression | -| `tbz` | Tarball with bzip compression | -| `tbz2` | Tarball with bzip2 compression | -| `tgz` | Tarball with gzip compression | -| `tlz` | Tarball with lzma compression | -| `txz` | Tarball with lzma2 compression | -| `tzst` | Tarball with zstd compression | -| `vsix` | VS Code extension zip file | -| `war` | Web Application archive (Java-based) | -| `whl` | Python wheel file | -| `xpi` | Mozilla XPI module file | -| `xz` | LZMA2 archive | -| `zip` | Zip archive | -| `zlib` | zlib archive | -| `zst` | Zstandard file (zstd) | -| `zpaq` | Zpaq file | +| Extension | Description | +| :---------------- | :-------------------------------------- | +| `7z` | 7zip file | +| `apk` | Android app file | +| `aar` | Android library file | +| `bz2` | Bzip2 file | +| `cab` | Microsoft cabinet archive | +| `cpio` | Cpio archive | +| `deb` | Debian package | +| `ear` | Enterprise Application aRchive | +| `exe` | Windows executable file | +| `gz` | Gzip file | +| `ipa` | iOS app package | +| `ipsw` | iOS firmware file | +| `jar` | Java Archive | +| `lrz` | LRZ archive | +| `lz4` | LZ4 archive | +| `lzma` | LZMA archive | +| `obscpio` | cpio archive used on OBS | +| `pk3` | Renamed Zip archive used by Quake games | +| `pk4` | Renamed Zip archive used by Quake games | +| `pk7` | Renamed 7zip file used by Quake games | +| `rar` | WinRAR archive | +| `rpm` | RPM package | +| `sublime-package` | Sublime Text package | +| `tar` | Tarball | +| `tar.bz2` | Tarball with bzip2 compression | +| `tar.gz` | Tarball with gzip compression | +| `tar.lrz` | Tarball with lrzip compression | +| `tar.lz` | Tarball with lzip compression | +| `tar.lz4` | Tarball with lz4 compression | +| `tar.xz` | Tarball with lzma2 compression | +| `tar.zma` | Tarball with lzma compression | +| `tar.zst` | Tarball with zstd compression | +| `tbz` | Tarball with bzip compression | +| `tbz2` | Tarball with bzip2 compression | +| `tgz` | Tarball with gzip compression | +| `tlz` | Tarball with lzma compression | +| `txz` | Tarball with lzma2 compression | +| `tzst` | Tarball with zstd compression | +| `vsix` | VS Code extension zip file | +| `war` | Web Application archive (Java-based) | +| `whl` | Python wheel file | +| `xpi` | Mozilla XPI module file | +| `xz` | LZMA2 archive | +| `Z` | Z archive (LZW) | +| `zip` | Zip archive | +| `zlib` | zlib archive | +| `zst` | Zstandard file (zstd) | +| `zpaq` | Zpaq file | See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for more information regarding archive formats. diff --git a/plugins/extract/_extract b/plugins/extract/_extract index 0b43e86bc..6641443d3 100644 --- a/plugins/extract/_extract +++ b/plugins/extract/_extract @@ -19,6 +19,9 @@ local -a exts=( lz4 lzma obscpio + pk3 + pk4 + pk7 rar rpm sublime-package diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index aa3fd00e6..d8cbc8b94 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -76,11 +76,11 @@ EOF (*.lz4) lz4 -d "$full_path" ;; (*.lzma) unlzma "$full_path" ;; (*.z) uncompress "$full_path" ;; - (*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx) unzip "$full_path" ;; + (*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx|*.pk3|*.pk4) unzip "$full_path" ;; (*.rar) unrar x -ad "$full_path" ;; (*.rpm) rpm2cpio "$full_path" | cpio --quiet -id ;; - (*.7z | *.7z.[0-9]*) 7za x "$full_path" ;; + (*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;; (*.deb) command mkdir -p "control" "data" ar vx "$full_path" > /dev/null