diff --git a/.github/dependencies.yml b/.github/dependencies.yml index ff239c657..b59cf9ed0 100644 --- a/.github/dependencies.yml +++ b/.github/dependencies.yml @@ -12,7 +12,7 @@ dependencies: plugins/gradle: repo: gradle/gradle-completion branch: master - version: dd3a8adb47e51b1f6e4dc180cb04bd02d5fccd4a + version: d8bc301a1fdeed8dc1dd9675138e1d9b7ddc5e4e precopy: | set -e find . ! -name _gradle ! -name LICENSE -delete @@ -46,7 +46,7 @@ dependencies: plugins/z: branch: master repo: agkozak/zsh-z - version: cf9225feebfae55e557e103e95ce20eca5eff270 + version: acd0e1984df350c189f8f9c4956ec586b6c73fca precopy: | set -e test -e README.md && mv -f README.md MANUAL.md diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 330bdbcf1..c8a8982b6 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -16,7 +16,7 @@ jobs: contents: write # this is needed to push commits and branches steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit diff --git a/.github/workflows/dependencies/requirements.txt b/.github/workflows/dependencies/requirements.txt index 91d0503df..61e06597c 100644 --- a/.github/workflows/dependencies/requirements.txt +++ b/.github/workflows/dependencies/requirements.txt @@ -1,6 +1,6 @@ -certifi==2026.2.25 +certifi==2026.4.22 charset-normalizer==3.4.7 -idna==3.11 +idna==3.13 PyYAML==6.0.3 requests==2.33.1 semver==3.0.4 diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 052aa198c..6431134c1 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -26,7 +26,7 @@ jobs: - macos-latest steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit @@ -47,7 +47,7 @@ jobs: - test steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9bd2ac9ff..1356bcd4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: if: github.repository == 'ohmyzsh/ohmyzsh' steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index c81567bbb..f943842af 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'ohmyzsh/ohmyzsh' steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit - name: Authenticate as @ohmyzsh diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 2e6f7d0ac..b7f385ed7 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Harden the runner (Audit all outbound calls) - uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 + uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1 with: egress-policy: audit @@ -60,6 +60,6 @@ jobs: retention-days: 5 - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 + uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3 with: sarif_file: results.sarif diff --git a/lib/git.zsh b/lib/git.zsh index 7345be818..3a03dbd4d 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -255,7 +255,7 @@ function git_remote_status() { fi if [[ -n $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]]; then - git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX${remote:gs/%/%%}$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX" + git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX${remote//\%/%%}$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX" fi echo $git_remote_status diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 4c1613eed..6e129c509 100644 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -67,6 +67,9 @@ function bgnotify_appid { elif [[ -n $WAYLAND_DISPLAY ]] && ([[ -n $SWAYSOCK ]] || [[ -n $I3SOCK ]]) && (( ${+commands[swaymsg]} )); then # wayland+sway local app_id=$(bgnotify_find_sway_appid) [[ -n "$app_id" ]] && echo "$app_id" || echo $EPOCHSECONDS + elif [[ -n $NIRI_SOCKET ]]; then # niri + local app_id=$(bgnotify_find_niri_appid) + [[ -n "$app_id" ]] && echo "$app_id" || echo $EPOCHSECONDS elif [[ -z $WAYLAND_DISPLAY ]] && [[ -n $DISPLAY ]] && (( ${+commands[xprop]} )); then xprop -root _NET_ACTIVE_WINDOW 2>/dev/null | cut -d' ' -f5 else @@ -106,6 +109,12 @@ function bgnotify_find_sway_appid { fi } +function bgnotify_find_niri_appid { + if (( ${+commands[jq]} )); then + niri msg -j windows | jq '.[] | select(.is_focused) | {app_id, id} | join(",")' + fi +} + function bgnotify_programid { case "$TERM_PROGRAM" in iTerm.app) echo 'com.googlecode.iterm2' ;; diff --git a/plugins/brew/README.md b/plugins/brew/README.md index ab0b9cd73..07c387380 100644 --- a/plugins/brew/README.md +++ b/plugins/brew/README.md @@ -40,7 +40,7 @@ the `brew` binary before sourcing `oh-my-zsh.sh` and it'll set up the environmen | `bo` | `brew outdated` | List installed formulae that have an updated version available. | | `br` | `brew reinstall` | Reinstall a formula. | | `brewp` | `brew pin` | Pin a specified formula so that it's not upgraded. | -| `brews` | `brew list -1` | List installed formulae or the installed files for a given formula. | +| `brews` | _function_ | List installed leaf formulae with their dependencies, then casks. | | `brewsp` | `brew list --pinned` | List pinned formulae, or show the version of a given formula. | | `brh` | `brew reinstall --HEAD` | Reinstall a formula with --HEAD | | `bs` | `brew search` | Perform a substring search of cask tokens and formula names for text. | diff --git a/plugins/fnm/README.md b/plugins/fnm/README.md index 00fab5cd4..3d3914d07 100644 --- a/plugins/fnm/README.md +++ b/plugins/fnm/README.md @@ -2,8 +2,34 @@ This plugin adds autocompletion for [fnm](https://github.com/Schniz/fnm) - a Node.js version manager. -To use it, add `fnm` to the plugins array in your zshrc file: +To use it, add `fnm` to the plugins array in your `.zshrc` file: ```zsh plugins=(... fnm) ``` + +## Configuration + +These settings should go in your `.zshrc` file, before Oh My Zsh is sourced. + +### Autostart + +If set, the plugin will automatically start fnm for the session, running the `fnm env`: + +```zsh +zstyle ':omz:plugins:fnm' autostart yes +``` + +Default: `no` (disabled) + +### Use on cd + +If set, the Node.js version will be switched based on the requirements of the current directory (recommended): + +```zsh +zstyle ':omz:plugins:fnm' use-on-cd yes +``` + +Default: `yes` (enabled) + +Check out the [official documentation](https://github.com/Schniz/fnm/blob/master/docs/commands.md) for the available fnm variables. diff --git a/plugins/fnm/fnm.plugin.zsh b/plugins/fnm/fnm.plugin.zsh index 6219025cd..90a5ae811 100644 --- a/plugins/fnm/fnm.plugin.zsh +++ b/plugins/fnm/fnm.plugin.zsh @@ -11,3 +11,11 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_fnm" ]]; then fi fnm completions --shell=zsh >| "$ZSH_CACHE_DIR/completions/_fnm" &| + +if zstyle -t ':omz:plugins:fnm' autostart; then + local -a fnm_env_cmd + if zstyle -T ':omz:plugins:fnm' use-on-cd; then + fnm_env_cmd+=("--use-on-cd") + fi + eval "$(fnm env --shell=zsh $fnm_env_cmd)" +fi diff --git a/plugins/gradle/_gradle b/plugins/gradle/_gradle index 588f33011..2dbb66df4 100644 --- a/plugins/gradle/_gradle +++ b/plugins/gradle/_gradle @@ -34,18 +34,16 @@ __gradle-set-build-file() { local default_gradle_build_file_name="build.gradle" if [[ -r $gradle_settings_file ]]; then - default_gradle_build_file_name=${$(grep "^rootProject\.buildFileName" $gradle_settings_file | \ + local build_file_name=${$(grep "^rootProject\.buildFileName" $gradle_settings_file | \ sed -n -e "s/rootProject\.buildFileName = [\'\"]\(.*\)[\'\"]/\1/p")} - default_gradle_build_file_name="${default_gradle_build_file:-build.gradle}" + default_gradle_build_file_name="${build_file_name:-build.gradle}" fi - local default_gradle_build_file="$project_root_dir/$default_gradle_build_file_name" - if [[ ! -f $default_gradle_build_file ]]; then - default_gradle_build_file="$project_root_dir/build.gradle.kts" + gradle_build_file="$project_root_dir/$default_gradle_build_file_name" + if [[ ! -f $gradle_build_file ]]; then + gradle_build_file="$project_root_dir/build.gradle.kts" fi - - gradle_build_file=$default_gradle_build_file } __gradle-set-cache-name() { @@ -214,6 +212,7 @@ __gradle_subcommand() { '--dsl=[Set the build script DSL to be used in generated scripts.]' \ '--incubating[Allow the generated build to use new features and APIs.]' \ '--insecure-protocol=[How to handle insecure URLs used for Maven Repositories.]' \ + '--into=[Set the directory where the project is generated.]' \ '--java-version=[Provides java version to use in the project.]' \ '--overwrite[Allow existing files in the build directory to be overwritten?]' \ '--package=[Set the package for source files.]' \ @@ -228,6 +227,7 @@ __gradle_subcommand() { '--all[Show additional tasks and detail.]' \ '--group=[Show tasks for a specific group.]' \ '--groups=[Show tasks for specific groups (can be used multiple times to specify multiple groups).]' \ + '--provenance[Show task provenance information]' \ '--types[Show task class types]' && ret=0 ;; (test) @@ -245,11 +245,15 @@ __gradle_subcommand() { '--gradle-distribution-url=[The URL to download the Gradle distribution from.]' \ '--gradle-version=[The version of the Gradle distribution required by the wrapper. The following labels are allowed: latest, release-candidate, release-milestone, release-nightly, and nightly.]' \ '--network-timeout=[Timeout in ms to use when the wrapper is performing network operations.]' \ + '--retries=[The number of download retries.]' \ + '--retry-back-off-ms=[The initial back off in milliseconds between retries (doubles on each failure).]' \ '--validate-url[Sets task to validate the configured distribution url.]' && ret=0 ;; (*) _arguments -C \ - '-Dgradle.user.home=[Specifies the Gradle user home directory. Defaults to ~/.gradle]:gradle.user.home:_directories' \ + '-Dcom.gradle.develocity.plugin.version=[Version of the Develocity plugin to auto-apply, must be 4.4.0 or higher if Develocity URL is specified as well.]' \ + '-Dcom.gradle.develocity.url=[Default URL of the Develocity server to publish Build Scan to. Triggers auto-application of the Develocity plugin if not already applied.]' \ + '-Dgradle.user.home=[Specifies the Gradle user home directory. Default is ~/.gradle.]:gradle.user.home:_directories' \ '-Dorg.gradle.caching.debug=[]' \ '-Dorg.gradle.caching=[Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds.]:org.gradle.caching:(true false)' \ '-Dorg.gradle.configuration-cache.entries-per-key=[]' \ @@ -260,25 +264,25 @@ __gradle_subcommand() { '-Dorg.gradle.configuration-cache.integrity-check=[]' \ '-Dorg.gradle.configuration-cache.max-problems=[]' \ '-Dorg.gradle.configuration-cache.parallel=[]' \ - '-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Defaults to fail.]:org.gradle.configuration cache.problems:(fail warn)' \ + '-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn)' \ '-Dorg.gradle.configuration-cache.read-only=[]' \ '-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]' \ '-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]' \ - '-Dorg.gradle.configureondemand=[Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]' \ - '-Dorg.gradle.console.unicode=[Specifies which character types are allowed in console output to generate. Values are 'auto' (default), 'disable' or 'enable'.]' \ - '-Dorg.gradle.console=[Specifies which type of console output to generate. Values are 'plain', 'colored', 'auto' (default), 'rich' or 'verbose'.]:org.gradle.console:(plain auto rich verbose)' \ - '-Dorg.gradle.continue=[Continue task execution after a task failure.]' \ + '-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]' \ + '-Dorg.gradle.console.unicode=[Specifies which character types are allowed in the console output. Supported values are 'auto' (default), 'disable', or 'enable'.]' \ + '-Dorg.gradle.console=[Specifies which type of console output to generate. Supported values are 'plain', 'colored', 'auto' (default), 'rich', or 'verbose'.]:org.gradle.console:(plain auto rich verbose)' \ + '-Dorg.gradle.continue=[Continues task execution after a task failure.]' \ '-Dorg.gradle.continuous.quietperiod=[]' \ '-Dorg.gradle.daemon.healthcheckinterval=[]' \ '-Dorg.gradle.daemon.idletimeout=[]' \ '-Dorg.gradle.daemon.registry.base=[]:org.gradle.daemon.registry.base:_directories' \ - '-Dorg.gradle.daemon=[Uses the Gradle daemon to run the build. Starts the daemon if not running.]' \ + '-Dorg.gradle.daemon=[Uses the Gradle daemon to run the build. Starts the daemon if it is not running.]' \ '-Dorg.gradle.debug.host=[]' \ '-Dorg.gradle.debug.port=[]' \ '-Dorg.gradle.debug.server=[]' \ '-Dorg.gradle.debug.suspend=[]' \ '-Dorg.gradle.debug=[]:org.gradle.debug:(true false)' \ - '-Dorg.gradle.dependency.verification=[Configures the dependency verification mode. Values are 'strict', 'lenient' or 'off'.]:org.gradle.dependency.verification:(strict lenient off)' \ + '-Dorg.gradle.dependency.verification=[Configures the dependency verification mode. Supported values are 'strict', 'lenient', or 'off'.]:org.gradle.dependency.verification:(strict lenient off)' \ '-Dorg.gradle.java.home=[]:org.gradle.java.home:_directories' \ '-Dorg.gradle.java.installations.auto-detect=[]' \ '-Dorg.gradle.java.installations.auto-download=[]' \ @@ -289,71 +293,73 @@ __gradle_subcommand() { '-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug)' \ '-Dorg.gradle.logging.stacktrace=[]' \ '-Dorg.gradle.native=[]' \ - '-Dorg.gradle.parallel=[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false)' \ - '-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Values are 'normal' (default) or 'low']:org.gradle.priority:(normal low)' \ - '-Dorg.gradle.problems.report=[(Experimental) enables HTML problems report]' \ - '-Dorg.gradle.projectcachedir=[Specify the project-specific cache directory. Defaults to .gradle in the root project directory.]:org.gradle.projectcachedir:_directories' \ + '-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false)' \ + '-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low)' \ + '-Dorg.gradle.problems.report=[Enables the HTML problems report.]' \ + '-Dorg.gradle.projectcachedir=[Specifies the project-specific cache directory. Default is .gradle in the root project directory.]:org.gradle.projectcachedir:_directories' \ '-Dorg.gradle.tooling.parallel=[]' \ '-Dorg.gradle.unsafe.isolated-projects=[]' \ '-Dorg.gradle.vfs.verbose=[]' \ - '-Dorg.gradle.vfs.watch=[Enables watching the file system for changes, allowing data about the file system to be re-used for the next build.]:org.gradle.vfs.watch:(true false)' \ - '-Dorg.gradle.warning.mode=[Specifies which mode of warnings to generate. Values are 'all', 'fail', 'summary'(default) or 'none']' \ + '-Dorg.gradle.vfs.watch=[Enables file system watching. Reuses file system data for subsequent builds.]:org.gradle.vfs.watch:(true false)' \ + '-Dorg.gradle.warning.mode=[Specifies which mode of warnings to generate. Supported values are 'all', 'fail', 'summary' (default), or 'none'.]' \ '-Dorg.gradle.welcome=[]:org.gradle.welcome:(once never)' \ - '-Dorg.gradle.workers.max=[Configure the number of concurrent workers Gradle is allowed to use.]' \ + '-Dorg.gradle.workers.max=[Configures the maximum number of concurrent workers Gradle is allowed to use.]' \ (--no-build-cache)'--build-cache[Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds.]' \ (--no-configuration-cache)'--configuration-cache[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]' \ - '--configuration-cache-problems[Configures how the configuration cache handles problems (fail or warn). Defaults to fail.]:configuration cache problems:(fail warn)' \ - (--no-configure-on-demand)'--configure-on-demand[Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. (incubating)]' \ - '--console[Specifies which type of console output to generate. Values are 'plain', 'colored', 'auto' (default), 'rich' or 'verbose'.]:console:(plain auto rich verbose)' \ - '--console-unicode[Specifies which character types are allowed in console output to generate. Values are 'auto' (default), 'disable' or 'enable'.]' \ - (--no-continue)'--continue[Continue task execution after a task failure.]' \ + '--configuration-cache-problems[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:configuration cache problems:(fail warn)' \ + (--no-configure-on-demand)'--configure-on-demand[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. (incubating)]' \ + '--console[Specifies which type of console output to generate. Supported values are 'plain', 'colored', 'auto' (default), 'rich', or 'verbose'.]:console:(plain auto rich verbose)' \ + '--console-unicode[Specifies which character types are allowed in the console output. Supported values are 'auto' (default), 'disable', or 'enable'.]' \ + (--no-continue)'--continue[Continues task execution after a task failure.]' \ {-t,--continuous}'[Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change.]' \ - (--no-daemon)'--daemon[Uses the Gradle daemon to run the build. Starts the daemon if not running.]' \ - (--quiet,-q,--warn,-w,--info,-i){-d,--debug}'[Log in debug mode (includes normal stacktrace).]' \ - {-F,--dependency-verification}'[Configures the dependency verification mode. Values are 'strict', 'lenient' or 'off'.]:dependency verification:(strict lenient off)' \ - {-m,--dry-run}'[Run the builds with all task actions disabled.]' \ - \*{-x,--exclude-task}'[Specify a task to be excluded from execution.]' \ + (--no-daemon)'--daemon[Uses the Gradle daemon to run the build. Starts the daemon if it is not running.]' \ + (--quiet,-q,--warn,-w,--info,-i){-d,--debug}'[Sets log level to debug. Includes the normal stacktrace.]' \ + {-F,--dependency-verification}'[Configures the dependency verification mode. Supported values are 'strict', 'lenient', or 'off'.]:dependency verification:(strict lenient off)' \ + '--develocity-plugin-version[Version of the Develocity plugin to auto-apply, must be 4.4.0 or higher if Develocity URL is specified as well.]' \ + '--develocity-url[Default URL of the Develocity server to publish Build Scan to. Triggers auto-application of the Develocity plugin if not already applied.]' \ + {-m,--dry-run}'[Runs the build with all task actions disabled.]' \ + \*{-x,--exclude-task}'[Specifies a task to exclude from execution.]' \ '--export-keys[Exports the public keys used for dependency verification.]' \ '--foreground[Starts the Gradle daemon in the foreground.]' \ - (--stacktrace,-s){-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \ - {-g,--gradle-user-home}'[Specifies the Gradle user home directory. Defaults to ~/.gradle]:gradle user home:_directories' \ - \*'--include-build[Include the specified build in the composite.]:include build:_directories' \ - (--quiet,-q,--warn,-w,--debug,-d){-i,--info}'[Set log level to info.]' \ - \*{-I,--init-script}'[Specify an initialization script.]:init script:_files -g \*.gradle(|.kts)' \ - '--max-workers[Configure the number of concurrent workers Gradle is allowed to use.]' \ + (--stacktrace,-s){-S,--full-stacktrace}'[Prints the full (very verbose) stacktrace for all exceptions.]' \ + {-g,--gradle-user-home}'[Specifies the Gradle user home directory. Default is ~/.gradle.]:gradle user home:_directories' \ + \*'--include-build[Includes the specified build in the composite.]:include build:_directories' \ + (--quiet,-q,--warn,-w,--debug,-d){-i,--info}'[Sets the log level to info.]' \ + \*{-I,--init-script}'[Specifies an initialization script.]:init script:_files -g \*.gradle(|.kts)' \ + '--max-workers[Configures the maximum number of concurrent workers Gradle is allowed to use.]' \ (--build-cache)'--no-build-cache[Disables the Gradle build cache.]' \ (--configuration-cache)'--no-configuration-cache[Disables the configuration cache.]' \ (--configure-on-demand)'--no-configure-on-demand[Disables the use of configuration on demand. (incubating)]' \ - (--continue)'--no-continue[Stop task execution after a task failure.]' \ - (--daemon)'--no-daemon[Do not use the Gradle daemon to run the build. Useful occasionally if you have configured Gradle to always run with the daemon by default.]' \ - (--parallel)'--no-parallel[Disables parallel execution to build projects.]' \ - (--problems-report)'--no-problems-report[(Experimental) disables HTML problems report]' \ - {-a,--no-rebuild}'[Do not rebuild project dependencies.]' \ + (--continue)'--no-continue[Stops task execution after a task failure.]' \ + (--daemon)'--no-daemon[Runs the build without the Gradle daemon. Useful occasionally if you have configured Gradle to always run with the daemon by default.]' \ + (--parallel)'--no-parallel[Disables parallel project execution.]' \ + (--problems-report)'--no-problems-report[Disables the HTML problems report. (incubating)]' \ + {-a,--no-rebuild}'[Disables rebuilding of project dependencies.]' \ (--scan)'--no-scan[Disables the creation of a Build Scan.]' \ - (--watch-fs)'--no-watch-fs[Disables watching the file system.]' \ - '--offline[Execute the build without accessing network resources.]' \ - (--no-parallel)'--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \ - '--priority[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Values are 'normal' (default) or 'low']' \ - (--no-problems-report)'--problems-report[(Experimental) enables HTML problems report]' \ - '--profile[Profile build execution time and generates a report in the /reports/profile directory.]' \ - '--project-cache-dir[Specify the project-specific cache directory. Defaults to .gradle in the root project directory.]:project cache dir:_directories' \ - {-p,--project-dir}'[Specifies the start directory for Gradle. Defaults to current directory.]:project dir:_directories' \ - '--property-upgrade-report[(Experimental) Runs build with experimental property upgrade report.]' \ - (--warn,-w,--info,-i,--debug,-d){-q,--quiet}'[Log errors only.]' \ - {-U,--refresh-dependencies}'[Refresh the state of dependencies.]' \ - '--refresh-keys[Refresh the public keys used for dependency verification.]' \ + (--watch-fs)'--no-watch-fs[Disables file system watching.]' \ + '--offline[Runs the build without accessing network resources.]' \ + (--no-parallel)'--parallel[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \ + '--priority[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]' \ + (--no-problems-report)'--problems-report[Enables the HTML problems report. (incubating)]' \ + '--profile[Profiles build execution time. Generates a report in the /reports/profile directory.]' \ + '--project-cache-dir[Specifies the project-specific cache directory. Default is .gradle in the root project directory.]:project cache dir:_directories' \ + {-p,--project-dir}'[Specifies the start directory for Gradle. Default is the current directory.]:project dir:_directories' \ + '--property-upgrade-report[Runs the build with the experimental property upgrade report. (incubating)]' \ + (--warn,-w,--info,-i,--debug,-d){-q,--quiet}'[Logs errors only.]' \ + {-U,--refresh-dependencies}'[Refreshes the state of dependencies.]' \ + '--refresh-keys[Refreshes the public keys used for dependency verification.]' \ '--rerun[Causes the task to be re-run even if up-to-date.]' \ - '--rerun-tasks[Ignore previously cached task results.]' \ - (--no-scan)'--scan[Generate a Build Scan (powered by Develocity).]' \ + '--rerun-tasks[Ignores previously cached task results.]' \ + (--no-scan)'--scan[Generates a Build Scan (powered by Develocity).]' \ {-V,--show-version}'[Print version info and continue.]' \ - (--full-stacktrace,-S){-s,--stacktrace}'[Print out the stacktrace for all exceptions.]' \ - '--task-graph[Print task graph instead of executing tasks.]' \ - \*'--update-locks[Perform a partial update of the dependency lock, letting passed in module notations change version. (incubating)]' \ - (--quiet,-q,--info,-i,--debug,-d){-w,--warn}'[Set log level to warn.]' \ - '--warning-mode[Specifies which mode of warnings to generate. Values are 'all', 'fail', 'summary'(default) or 'none']:warning mode:(all summary none)' \ - (--no-watch-fs)'--watch-fs[Enables watching the file system for changes, allowing data about the file system to be re-used for the next build.]' \ - '--write-locks[Persists dependency resolution for locked configurations, ignoring existing locking information if it exists]' \ - {-M,--write-verification-metadata}'[Generates checksums for dependencies used in the project (comma-separated list)]' && ret=0 + (--full-stacktrace,-S){-s,--stacktrace}'[Prints the stacktrace for all exceptions.]' \ + '--task-graph[Prints the task graph instead of executing tasks.]' \ + \*'--update-locks[Performs a partial update of the dependency lock. Allows passed-in module notations to change version. (incubating)]' \ + (--quiet,-q,--info,-i,--debug,-d){-w,--warn}'[Sets the log level to warn.]' \ + '--warning-mode[Specifies which mode of warnings to generate. Supported values are 'all', 'fail', 'summary' (default), or 'none'.]:warning mode:(all summary none)' \ + (--no-watch-fs)'--watch-fs[Enables file system watching. Reuses file system data for subsequent builds.]' \ + '--write-locks[Persists dependency resolution for locked configurations. Ignores existing locking information if it exists.]' \ + {-M,--write-verification-metadata}'[Generates checksums for dependencies used in the project. Accepts a comma-separated list.]' && ret=0 ;; esac @@ -379,7 +385,9 @@ _gradle() { typeset -A opt_args _arguments -C \ -'-Dgradle.user.home=[Specifies the Gradle user home directory. Defaults to ~/.gradle]:gradle.user.home:_directories:->argument-expected' \ +'-Dcom.gradle.develocity.plugin.version=[Version of the Develocity plugin to auto-apply, must be 4.4.0 or higher if Develocity URL is specified as well.]:->argument-expected' \ + '-Dcom.gradle.develocity.url=[Default URL of the Develocity server to publish Build Scan to. Triggers auto-application of the Develocity plugin if not already applied.]:->argument-expected' \ + '-Dgradle.user.home=[Specifies the Gradle user home directory. Default is ~/.gradle.]:gradle.user.home:_directories:->argument-expected' \ '-Dorg.gradle.caching.debug=[]:->argument-expected' \ '-Dorg.gradle.caching=[Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds.]:org.gradle.caching:(true false):->argument-expected' \ '-Dorg.gradle.configuration-cache.entries-per-key=[]:->argument-expected' \ @@ -390,25 +398,25 @@ _gradle() { '-Dorg.gradle.configuration-cache.integrity-check=[]:->argument-expected' \ '-Dorg.gradle.configuration-cache.max-problems=[]:->argument-expected' \ '-Dorg.gradle.configuration-cache.parallel=[]:->argument-expected' \ - '-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Defaults to fail.]:org.gradle.configuration cache.problems:(fail warn):->argument-expected' \ + '-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn):->argument-expected' \ '-Dorg.gradle.configuration-cache.read-only=[]:->argument-expected' \ '-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]:->argument-expected' \ '-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]:->argument-expected' \ - '-Dorg.gradle.configureondemand=[Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]:->argument-expected' \ - '-Dorg.gradle.console.unicode=[Specifies which character types are allowed in console output to generate. Values are 'auto' (default), 'disable' or 'enable'.]:->argument-expected' \ - '-Dorg.gradle.console=[Specifies which type of console output to generate. Values are 'plain', 'colored', 'auto' (default), 'rich' or 'verbose'.]:org.gradle.console:(plain auto rich verbose):->argument-expected' \ - '-Dorg.gradle.continue=[Continue task execution after a task failure.]:->argument-expected' \ + '-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]:->argument-expected' \ + '-Dorg.gradle.console.unicode=[Specifies which character types are allowed in the console output. Supported values are 'auto' (default), 'disable', or 'enable'.]:->argument-expected' \ + '-Dorg.gradle.console=[Specifies which type of console output to generate. Supported values are 'plain', 'colored', 'auto' (default), 'rich', or 'verbose'.]:org.gradle.console:(plain auto rich verbose):->argument-expected' \ + '-Dorg.gradle.continue=[Continues task execution after a task failure.]:->argument-expected' \ '-Dorg.gradle.continuous.quietperiod=[]:->argument-expected' \ '-Dorg.gradle.daemon.healthcheckinterval=[]:->argument-expected' \ '-Dorg.gradle.daemon.idletimeout=[]:->argument-expected' \ '-Dorg.gradle.daemon.registry.base=[]:org.gradle.daemon.registry.base:_directories:->argument-expected' \ - '-Dorg.gradle.daemon=[Uses the Gradle daemon to run the build. Starts the daemon if not running.]:->argument-expected' \ + '-Dorg.gradle.daemon=[Uses the Gradle daemon to run the build. Starts the daemon if it is not running.]:->argument-expected' \ '-Dorg.gradle.debug.host=[]:->argument-expected' \ '-Dorg.gradle.debug.port=[]:->argument-expected' \ '-Dorg.gradle.debug.server=[]:->argument-expected' \ '-Dorg.gradle.debug.suspend=[]:->argument-expected' \ '-Dorg.gradle.debug=[]:org.gradle.debug:(true false):->argument-expected' \ - '-Dorg.gradle.dependency.verification=[Configures the dependency verification mode. Values are 'strict', 'lenient' or 'off'.]:org.gradle.dependency.verification:(strict lenient off):->argument-expected' \ + '-Dorg.gradle.dependency.verification=[Configures the dependency verification mode. Supported values are 'strict', 'lenient', or 'off'.]:org.gradle.dependency.verification:(strict lenient off):->argument-expected' \ '-Dorg.gradle.java.home=[]:org.gradle.java.home:_directories:->argument-expected' \ '-Dorg.gradle.java.installations.auto-detect=[]:->argument-expected' \ '-Dorg.gradle.java.installations.auto-download=[]:->argument-expected' \ @@ -419,75 +427,77 @@ _gradle() { '-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug):->argument-expected' \ '-Dorg.gradle.logging.stacktrace=[]:->argument-expected' \ '-Dorg.gradle.native=[]:->argument-expected' \ - '-Dorg.gradle.parallel=[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false):->argument-expected' \ - '-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Values are 'normal' (default) or 'low']:org.gradle.priority:(normal low):->argument-expected' \ - '-Dorg.gradle.problems.report=[(Experimental) enables HTML problems report]:->argument-expected' \ - '-Dorg.gradle.projectcachedir=[Specify the project-specific cache directory. Defaults to .gradle in the root project directory.]:org.gradle.projectcachedir:_directories:->argument-expected' \ + '-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false):->argument-expected' \ + '-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low):->argument-expected' \ + '-Dorg.gradle.problems.report=[Enables the HTML problems report.]:->argument-expected' \ + '-Dorg.gradle.projectcachedir=[Specifies the project-specific cache directory. Default is .gradle in the root project directory.]:org.gradle.projectcachedir:_directories:->argument-expected' \ '-Dorg.gradle.tooling.parallel=[]:->argument-expected' \ '-Dorg.gradle.unsafe.isolated-projects=[]:->argument-expected' \ '-Dorg.gradle.vfs.verbose=[]:->argument-expected' \ - '-Dorg.gradle.vfs.watch=[Enables watching the file system for changes, allowing data about the file system to be re-used for the next build.]:org.gradle.vfs.watch:(true false):->argument-expected' \ - '-Dorg.gradle.warning.mode=[Specifies which mode of warnings to generate. Values are 'all', 'fail', 'summary'(default) or 'none']:->argument-expected' \ + '-Dorg.gradle.vfs.watch=[Enables file system watching. Reuses file system data for subsequent builds.]:org.gradle.vfs.watch:(true false):->argument-expected' \ + '-Dorg.gradle.warning.mode=[Specifies which mode of warnings to generate. Supported values are 'all', 'fail', 'summary' (default), or 'none'.]:->argument-expected' \ '-Dorg.gradle.welcome=[]:org.gradle.welcome:(once never):->argument-expected' \ - '-Dorg.gradle.workers.max=[Configure the number of concurrent workers Gradle is allowed to use.]:->argument-expected' \ + '-Dorg.gradle.workers.max=[Configures the maximum number of concurrent workers Gradle is allowed to use.]:->argument-expected' \ (--no-build-cache)'--build-cache[Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds.]' \ (--no-configuration-cache)'--configuration-cache[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]' \ - '--configuration-cache-problems[Configures how the configuration cache handles problems (fail or warn). Defaults to fail.]:configuration cache problems:(fail warn):->argument-expected' \ - (--no-configure-on-demand)'--configure-on-demand[Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. (incubating)]' \ - '--console[Specifies which type of console output to generate. Values are 'plain', 'colored', 'auto' (default), 'rich' or 'verbose'.]:console:(plain auto rich verbose):->argument-expected' \ - '--console-unicode[Specifies which character types are allowed in console output to generate. Values are 'auto' (default), 'disable' or 'enable'.]:->argument-expected' \ - (--no-continue)'--continue[Continue task execution after a task failure.]' \ + '--configuration-cache-problems[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:configuration cache problems:(fail warn):->argument-expected' \ + (--no-configure-on-demand)'--configure-on-demand[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. (incubating)]' \ + '--console[Specifies which type of console output to generate. Supported values are 'plain', 'colored', 'auto' (default), 'rich', or 'verbose'.]:console:(plain auto rich verbose):->argument-expected' \ + '--console-unicode[Specifies which character types are allowed in the console output. Supported values are 'auto' (default), 'disable', or 'enable'.]:->argument-expected' \ + (--no-continue)'--continue[Continues task execution after a task failure.]' \ {-t,--continuous}'[Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change.]' \ - (--no-daemon)'--daemon[Uses the Gradle daemon to run the build. Starts the daemon if not running.]' \ - (--quiet,-q,--warn,-w,--info,-i){-d,--debug}'[Log in debug mode (includes normal stacktrace).]' \ - {-F,--dependency-verification}'[Configures the dependency verification mode. Values are 'strict', 'lenient' or 'off'.]:dependency verification:(strict lenient off):->argument-expected' \ - {-m,--dry-run}'[Run the builds with all task actions disabled.]' \ - \*{-x,--exclude-task}'[Specify a task to be excluded from execution.]' \ + (--no-daemon)'--daemon[Uses the Gradle daemon to run the build. Starts the daemon if it is not running.]' \ + (--quiet,-q,--warn,-w,--info,-i){-d,--debug}'[Sets log level to debug. Includes the normal stacktrace.]' \ + {-F,--dependency-verification}'[Configures the dependency verification mode. Supported values are 'strict', 'lenient', or 'off'.]:dependency verification:(strict lenient off):->argument-expected' \ + '--develocity-plugin-version[Version of the Develocity plugin to auto-apply, must be 4.4.0 or higher if Develocity URL is specified as well.]:->argument-expected' \ + '--develocity-url[Default URL of the Develocity server to publish Build Scan to. Triggers auto-application of the Develocity plugin if not already applied.]:->argument-expected' \ + {-m,--dry-run}'[Runs the build with all task actions disabled.]' \ + \*{-x,--exclude-task}'[Specifies a task to exclude from execution.]' \ '--export-keys[Exports the public keys used for dependency verification.]' \ '--foreground[Starts the Gradle daemon in the foreground.]' \ - (--stacktrace,-s){-S,--full-stacktrace}'[Print out the full (very verbose) stacktrace for all exceptions.]' \ - {-g,--gradle-user-home}'[Specifies the Gradle user home directory. Defaults to ~/.gradle]:gradle user home:_directories:->argument-expected' \ + (--stacktrace,-s){-S,--full-stacktrace}'[Prints the full (very verbose) stacktrace for all exceptions.]' \ + {-g,--gradle-user-home}'[Specifies the Gradle user home directory. Default is ~/.gradle.]:gradle user home:_directories:->argument-expected' \ {-h,--help}'[Shows a help message.]' \ - \*'--include-build[Include the specified build in the composite.]:include build:_directories:->argument-expected' \ - (--quiet,-q,--warn,-w,--debug,-d){-i,--info}'[Set log level to info.]' \ - \*{-I,--init-script}'[Specify an initialization script.]:init script:_files -g \*.gradle(|.kts):->argument-expected' \ - '--max-workers[Configure the number of concurrent workers Gradle is allowed to use.]:->argument-expected' \ + \*'--include-build[Includes the specified build in the composite.]:include build:_directories:->argument-expected' \ + (--quiet,-q,--warn,-w,--debug,-d){-i,--info}'[Sets the log level to info.]' \ + \*{-I,--init-script}'[Specifies an initialization script.]:init script:_files -g \*.gradle(|.kts):->argument-expected' \ + '--max-workers[Configures the maximum number of concurrent workers Gradle is allowed to use.]:->argument-expected' \ (--build-cache)'--no-build-cache[Disables the Gradle build cache.]' \ (--configuration-cache)'--no-configuration-cache[Disables the configuration cache.]' \ (--configure-on-demand)'--no-configure-on-demand[Disables the use of configuration on demand. (incubating)]' \ - (--continue)'--no-continue[Stop task execution after a task failure.]' \ - (--daemon)'--no-daemon[Do not use the Gradle daemon to run the build. Useful occasionally if you have configured Gradle to always run with the daemon by default.]' \ - (--parallel)'--no-parallel[Disables parallel execution to build projects.]' \ - (--problems-report)'--no-problems-report[(Experimental) disables HTML problems report]' \ - {-a,--no-rebuild}'[Do not rebuild project dependencies.]' \ + (--continue)'--no-continue[Stops task execution after a task failure.]' \ + (--daemon)'--no-daemon[Runs the build without the Gradle daemon. Useful occasionally if you have configured Gradle to always run with the daemon by default.]' \ + (--parallel)'--no-parallel[Disables parallel project execution.]' \ + (--problems-report)'--no-problems-report[Disables the HTML problems report. (incubating)]' \ + {-a,--no-rebuild}'[Disables rebuilding of project dependencies.]' \ (--scan)'--no-scan[Disables the creation of a Build Scan.]' \ - (--watch-fs)'--no-watch-fs[Disables watching the file system.]' \ - '--offline[Execute the build without accessing network resources.]' \ - (--no-parallel)'--parallel[Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \ - '--priority[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Values are 'normal' (default) or 'low']:->argument-expected' \ - (--no-problems-report)'--problems-report[(Experimental) enables HTML problems report]' \ - '--profile[Profile build execution time and generates a report in the /reports/profile directory.]' \ - '--project-cache-dir[Specify the project-specific cache directory. Defaults to .gradle in the root project directory.]:project cache dir:_directories:->argument-expected' \ - {-p,--project-dir}'[Specifies the start directory for Gradle. Defaults to current directory.]:project dir:_directories:->argument-expected' \ - '--property-upgrade-report[(Experimental) Runs build with experimental property upgrade report.]' \ - (--warn,-w,--info,-i,--debug,-d){-q,--quiet}'[Log errors only.]' \ - {-U,--refresh-dependencies}'[Refresh the state of dependencies.]' \ - '--refresh-keys[Refresh the public keys used for dependency verification.]' \ + (--watch-fs)'--no-watch-fs[Disables file system watching.]' \ + '--offline[Runs the build without accessing network resources.]' \ + (--no-parallel)'--parallel[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]' \ + '--priority[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:->argument-expected' \ + (--no-problems-report)'--problems-report[Enables the HTML problems report. (incubating)]' \ + '--profile[Profiles build execution time. Generates a report in the /reports/profile directory.]' \ + '--project-cache-dir[Specifies the project-specific cache directory. Default is .gradle in the root project directory.]:project cache dir:_directories:->argument-expected' \ + {-p,--project-dir}'[Specifies the start directory for Gradle. Default is the current directory.]:project dir:_directories:->argument-expected' \ + '--property-upgrade-report[Runs the build with the experimental property upgrade report. (incubating)]' \ + (--warn,-w,--info,-i,--debug,-d){-q,--quiet}'[Logs errors only.]' \ + {-U,--refresh-dependencies}'[Refreshes the state of dependencies.]' \ + '--refresh-keys[Refreshes the public keys used for dependency verification.]' \ '--rerun[Causes the task to be re-run even if up-to-date.]' \ - '--rerun-tasks[Ignore previously cached task results.]' \ - (--no-scan)'--scan[Generate a Build Scan (powered by Develocity).]' \ + '--rerun-tasks[Ignores previously cached task results.]' \ + (--no-scan)'--scan[Generates a Build Scan (powered by Develocity).]' \ {-V,--show-version}'[Print version info and continue.]' \ - (--full-stacktrace,-S){-s,--stacktrace}'[Print out the stacktrace for all exceptions.]' \ - '--status[Shows status of running and recently stopped Gradle daemon(s).]' \ + (--full-stacktrace,-S){-s,--stacktrace}'[Prints the stacktrace for all exceptions.]' \ + '--status[Shows the status of running and recently stopped Gradle daemons.]' \ '--stop[Stops the Gradle daemon if it is running.]' \ - '--task-graph[Print task graph instead of executing tasks.]' \ - \*'--update-locks[Perform a partial update of the dependency lock, letting passed in module notations change version. (incubating)]' \ + '--task-graph[Prints the task graph instead of executing tasks.]' \ + \*'--update-locks[Performs a partial update of the dependency lock. Allows passed-in module notations to change version. (incubating)]' \ {-v,--version}'[Print version info and exit.]' \ - (--quiet,-q,--info,-i,--debug,-d){-w,--warn}'[Set log level to warn.]' \ - '--warning-mode[Specifies which mode of warnings to generate. Values are 'all', 'fail', 'summary'(default) or 'none']:warning mode:(all summary none):->argument-expected' \ - (--no-watch-fs)'--watch-fs[Enables watching the file system for changes, allowing data about the file system to be re-used for the next build.]' \ - '--write-locks[Persists dependency resolution for locked configurations, ignoring existing locking information if it exists]' \ - {-M,--write-verification-metadata}'[Generates checksums for dependencies used in the project (comma-separated list)]:->argument-expected' \ + (--quiet,-q,--info,-i,--debug,-d){-w,--warn}'[Sets the log level to warn.]' \ + '--warning-mode[Specifies which mode of warnings to generate. Supported values are 'all', 'fail', 'summary' (default), or 'none'.]:warning mode:(all summary none):->argument-expected' \ + (--no-watch-fs)'--watch-fs[Enables file system watching. Reuses file system data for subsequent builds.]' \ + '--write-locks[Persists dependency resolution for locked configurations. Ignores existing locking information if it exists.]' \ + {-M,--write-verification-metadata}'[Generates checksums for dependencies used in the project. Accepts a comma-separated list.]:->argument-expected' \ '(-)*:: :->task-or-option' && ret=0 if [[ $words[CURRENT] != -* && $state != "argument-expected" ]]; then diff --git a/plugins/jj/README.md b/plugins/jj/README.md index 6f10b5b99..c70e0558d 100644 --- a/plugins/jj/README.md +++ b/plugins/jj/README.md @@ -14,6 +14,7 @@ plugins=(... jj) | ------ | ----------------------------- | | jja | `jj abandon` | | jjb | `jj bookmark` | +| jjba | `jj bookmark advance` | | jjbc | `jj bookmark create` | | jjbd | `jj bookmark delete` | | jjbf | `jj bookmark forget` | diff --git a/plugins/jj/jj.plugin.zsh b/plugins/jj/jj.plugin.zsh index 4b0400f9d..9fca7ae00 100644 --- a/plugins/jj/jj.plugin.zsh +++ b/plugins/jj/jj.plugin.zsh @@ -36,6 +36,7 @@ function jj_prompt_template() { # Aliases (sorted alphabetically) alias jja='jj abandon' alias jjb='jj bookmark' +alias jjba='jj bookmark advance' alias jjbc='jj bookmark create' alias jjbd='jj bookmark delete' alias jjbf='jj bookmark forget' diff --git a/plugins/poetry-env/poetry-env.plugin.zsh b/plugins/poetry-env/poetry-env.plugin.zsh index d2d571dbe..5f6fd4511 100644 --- a/plugins/poetry-env/poetry-env.plugin.zsh +++ b/plugins/poetry-env/poetry-env.plugin.zsh @@ -15,7 +15,12 @@ _togglePoetryShell() { # Activate the environment if in a Poetry directory and no environment is currently active if [[ $in_poetry_dir -eq 1 ]] && [[ $poetry_active -ne 1 ]]; then venv_dir=$(poetry env info --path 2>/dev/null) - if [[ -n "$venv_dir" ]]; then + # Handle case where poetry returns "." for in-project virtual environments + if [[ "$venv_dir" == "." ]]; then + venv_dir="$PWD/.venv" + fi + # Only proceed if venv_dir is set and the activate script exists + if [[ -n "$venv_dir" && -f "${venv_dir}/bin/activate" ]]; then export poetry_active=1 export poetry_dir="$PWD" source "${venv_dir}/bin/activate" diff --git a/plugins/z/LICENSE b/plugins/z/LICENSE index b36aeb408..8befb303b 100644 --- a/plugins/z/LICENSE +++ b/plugins/z/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2025 Alexandros Kozak +Copyright (c) 2018-2026 Alexandros Kozak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/plugins/z/MANUAL.md b/plugins/z/MANUAL.md index eddf787dd..420535b27 100644 --- a/plugins/z/MANUAL.md +++ b/plugins/z/MANUAL.md @@ -24,16 +24,23 @@ Zsh-z is a drop-in replacement for `rupa/z` and will, by default, use the same d - [Case Sensitivity](#case-sensitivity) - [`ZSHZ_UNCOMMON`](#zshz_uncommon) - [Making `--add` work for you](#making---add-work-for-you) -- [Other Improvements and Fixes](#other-improvements-and-fixes) +- [Other Improvements to the Original Functionality of `rupa/z`](#other-improvements-to-the-original-functionality-of-rupa-z) - [Migrating from Other Tools](#migrating-from-other-tools) - [`COMPLETE_ALIASES`](#complete_aliases) -- [Known Bugs](#known-bugs) ## News
Here are the latest features and updates. +- May 1, 2026 + + Various tab completion bugs resolved. +- April 27, 2026 + + Fixes a bug where re-sourcing the script caused an infinite loop when tab was pressed. Props to @maheshpec for [successfully diagnosing the problem](https://github.com/ohmyzsh/ohmyzsh/pull/13715). + + Fixes a bug where the completion widget was not identifying options correctly. +- March 31, 2026 + + When the user hits tab after entering a command-line argument that uses spaces as wildcards (e.g., `z us lo bi`), the command line is clear of detritus (i.e., it looks like `z /usr/local/bin` instead of `z us lo /usr/local/bin`). + + Improved test for Docker containers. - August 24, 2023 + Zsh-z will now run when `setopt NO_UNSET` has been enabled (props @ntninja). - August 23, 2023 @@ -50,7 +57,7 @@ Zsh-z is a drop-in replacement for `rupa/z` and will, by default, use the same d + A bug was fixed which was preventing paths with spaces in them from being updated ([#61](https://github.com/agkozak/zsh-z/issues/61)). + If writing to the temporary database file fails, the database will not be clobbered (props @mafredri). - December 19, 2021 - + ZSH-z will now display tildes for `HOME` during completion when `ZSHZ_TILDE=1` has been set. + + Zsh-z will now display tildes for `HOME` during completion when `ZSHZ_TILDE=1` has been set. - November 11, 2021 + A bug was fixed which was preventing ranks from being incremented. + `--add` has been made to work with relative paths and has been documented for the user. @@ -71,7 +78,7 @@ Zsh-z is a drop-in replacement for `rupa/z` and will, by default, use the same d - July 29, 2021 + Temporarily disabling the use of `print -v`, which was mangling CJK multibyte strings. - July 27, 2021 - + Internal escaping of path names now works with older versions of ZSH. + + Internal escaping of path names now works with older versions of Zsh. + Zsh-z now detects and discards any incomplete or incorrectly formatted database entries. - July 10, 2021 + Setting `ZSHZ_TRAILING_SLASH=1` makes it so that a search pattern ending in `/` can match the end of a path; e.g. `z foo/` can match `/path/to/foo`. @@ -79,12 +86,12 @@ Zsh-z is a drop-in replacement for `rupa/z` and will, by default, use the same d + Setting `ZSHZ_TILDE=1` displays the `HOME` directory as `~`. - May 7, 2021 + Setting `ZSHZ_ECHO=1` will cause Zsh-z to display the new path when you change directories. - + Better escaping of path names to deal paths containing the characters ``\`()[]``. + + Better escaping of path names to deal with paths containing the characters ``\`()[]``. - February 15, 2021 + Ranks are displayed the way `rupa/z` now displays them, i.e. as large integers. This should help Zsh-z to integrate with other tools. - January 31, 2021 + Zsh-z is now efficient enough that, on MSYS2 and Cygwin, it is faster to run it in the foreground than it is to fork a subshell for it. - + `_zshz_precmd` simply returns if `PWD` is `HOME` or in `ZSH_EXCLUDE_DIRS`, rather than waiting for `zshz` to do that. + + `_zshz_precmd` simply returns if `PWD` is `HOME` or in `ZSHZ_EXCLUDE_DIRS`, rather than waiting for `zshz` to do that. - January 17, 2021 + Made sure that the `PUSHD_IGNORE_DUPS` option is respected. - January 14, 2021 @@ -171,7 +178,7 @@ is uncommented. Then find the section that specifies which modules are to be loa 'completion' \ 'prompt' -Add a backslash to the end of the last line add `'zsh-z'` to the list, e.g., +Add a backslash to the end of the last line and add `'zsh-z'` to the list, e.g., zstyle ':prezto:load' pmodule \ 'environment' \ @@ -279,7 +286,7 @@ Zsh-z has environment variables (they all begin with `ZSHZ_`) that change its be * `ZSHZ_OWNER` allows usage when in `sudo -s` mode (default: empty) * `ZSHZ_TILDE` displays the name of the `HOME` directory as a `~` (default: `0`) * `ZSHZ_TRAILING_SLASH` makes it so that a search pattern ending in `/` can match the final element in a path; e.g., `z foo/` can match `/path/to/foo` (default: `0`) -* `ZSHZ_UNCOMMON` changes the logic used to calculate the directory jumped to; [see below](#zshz_uncommon`) (default: `0`) +* `ZSHZ_UNCOMMON` changes the logic used to calculate the directory jumped to; [see below](#zshz_uncommon) (default: `0`) ## Case sensitivity @@ -324,7 +331,7 @@ A good example might involve a directory tree that has Git repositories within i (As a Zsh user, I tend to use `**` instead of `find`, but it is good to see how deep your directory trees go before doing that.) -## Other Improvements and Fixes +## Other Improvements to the Original Functionality of `rupa/z` * `z -x` works, with the help of `chpwd_functions`. * Zsh-z is compatible with Solaris. @@ -336,6 +343,7 @@ A good example might involve a directory tree that has Git repositories within i * Completions now work with options `-c`, `-r`, and `-t`. * If `~/foo` and `~/foob` are matches, `~/foo` is no longer considered the common root. Only a common parent directory can be a common root. * `z -x` and the new, recursive `z -xR` can now accept an argument so that you can remove directories other than `PWD` from the database. +* Zsh-z inherits `rupa/z`'s behavior of allowing spaces as wildcards (e.g., `z us lo bi` might take you to `/usr/local/bin`), but now completion of such command lines does not result in visual detritus. ## Migrating from Other Tools @@ -347,7 +355,7 @@ If you are coming to Zsh-z (or even to the original `rupa/z`, for that matter) f ## `COMPLETE_ALIASES` -`z`, or any alternative you set up using `$ZSH_CMD` or `$_Z_CMD`, is an alias. `setopt COMPLETE_ALIASES` divorces the tab completion for aliases from the underlying commands they invoke, so if you enable `COMPLETE_ALIASES`, tab completion for Zsh-z will be broken. You can get it working again, however, by adding under +`z`, or any alternative you set up using `$ZSHZ_CMD` or `$_Z_CMD`, is an alias. `setopt COMPLETE_ALIASES` divorces the tab completion for aliases from the underlying commands they invoke, so if you enable `COMPLETE_ALIASES`, tab completion for Zsh-z will be broken. You can get it working again, however, by adding under setopt COMPLETE_ALIASES @@ -356,10 +364,3 @@ the line compdef _zshz ${ZSHZ_CMD:-${_Z_CMD:-z}} That will re-bind `z` or the command of your choice to the underlying Zsh-z function. - -## Known Bug -It is possible to run a completion on a string with spaces in it, e.g., `z us bi` might take you to `/usr/local/bin`. This works, but as things stand, after the completion the command line reads - - z us /usr/local/bin. - -You get where you want to go, but the detritus on the command line is annoying. This is also a problem in `rupa/z`, but I am keen on eventually eliminating this glitch. Advice is welcome. diff --git a/plugins/z/_z b/plugins/z/_z index a493f35ba..a109841d6 100644 --- a/plugins/z/_z +++ b/plugins/z/_z @@ -5,7 +5,7 @@ # # https://github.com/agkozak/zsh-z # -# Copyright (c) 2018-2023 Alexandros Kozak +# Copyright (c) 2018-2026 Alexandros Kozak # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -37,25 +37,10 @@ emulate -L zsh (( ZSHZ_DEBUG )) && setopt LOCAL_OPTIONS WARN_CREATE_GLOBAL NO_WARN_NESTED_VAR 2> /dev/null -# TODO: This routine currently reproduces z's feature of allowing spaces to be -# used as wildcards in completions, so that -# -# z us lo bi -# -# can expand to -# -# z /usr/local/bin -# -# but it also reproduces z's buggy display on the commandline, viz. -# -# z us lo /usr/local/bin -# -# Address. - local completions expl completion local -a completion_list -completions=$(zshz --complete ${(@)words:1}) +completions=$(zshz --complete "${(@)words:1}") [[ -z $completions ]] && return 1 for completion in ${(f)completions[@]}; do diff --git a/plugins/z/z.plugin.zsh b/plugins/z/z.plugin.zsh index 39b832292..6df49822e 100644 --- a/plugins/z/z.plugin.zsh +++ b/plugins/z/z.plugin.zsh @@ -4,7 +4,7 @@ # # https://github.com/agkozak/zsh-z # -# Copyright (c) 2018-2025 Alexandros Kozak +# Copyright (c) 2018-2026 Alexandros Kozak # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -96,7 +96,7 @@ With no ARGUMENT, list the directory history in ascending rank. -t Match by recent access -x Remove a directory from the database (by default, the current directory) -xR Remove a directory and its subdirectories from the database (by default, the current directory)" | - fold -s -w $COLUMNS >&2 + fold -s -w $(( COLUMNS > 0 ? COLUMNS : 80 )) >&2 } # Load zsh/datetime module, if necessary @@ -251,7 +251,7 @@ zshz() { if (( ${ZSHZ_NO_RESOLVE_SYMLINKS:-${_Z_NO_RESOLVE_SYMLINKS}} )); then [[ -d ${${*:-${PWD}}:a} ]] && xdir=${${*:-${PWD}}:a} else - [[ -d ${${*:-${PWD}}:A} ]] && xdir=${${*:-${PWD}}:a} + [[ -d ${${*:-${PWD}}:A} ]] && xdir=${${*:-${PWD}}:A} fi local -a lines_to_keep @@ -294,9 +294,9 @@ zshz() { owner=${ZSHZ_OWNER:-${_Z_OWNER}} if (( ZSHZ[USE_FLOCK] )); then - # An unsual case: if inside Docker container where datafile could be bind + # An unusual case: if inside Docker container where datafile could be bind # mounted - if [[ -r '/proc/1/cgroup' && "$(< '/proc/1/cgroup')" == *docker* ]]; then + if [[ -f '/.dockerenv' || ( -r '/proc/1/cgroup' && "$(< '/proc/1/cgroup')" == *docker* ) ]]; then print "$(< "$tempfile")" > "$datafile" 2> /dev/null ${ZSHZ[RM]} -f "$tempfile" # All other cases @@ -741,6 +741,9 @@ zshz() { for opt in ${(k)opts}; do case $opt in --add) + # Don't change the database when invoked via --complete (e.g., from + # tab completion). + (( ${+opts[--complete]} )) && continue [[ ! -d $* ]] && return 1 local dir # Cygwin and MSYS2 have a hard time with relative paths expressed from / @@ -764,6 +767,7 @@ zshz() { ;; -c) [[ $* == ${PWD}/* || $PWD == '/' ]] || prefix="$PWD " ;; -h|--help) + (( ${+opts[--complete]} )) && continue _zshz_usage return ;; @@ -771,6 +775,7 @@ zshz() { -r) method='rank' ;; -t) method='time' ;; -x) + (( ${+opts[--complete]} )) && continue # Cygwin and MSYS2 have a hard time with relative paths expressed from / if [[ $OSTYPE == (cygwin|msys) && $PWD == '/' && $* != /* ]]; then set -- "/$*" @@ -844,7 +849,8 @@ zshz() { # New experimental "uncommon" behavior # - # If the best choice at this point is something like /foo/bar/foo/bar, and the # search pattern is `bar', go to /foo/bar/foo/bar; but if the search pattern + # If the best choice at this point is something like /foo/bar/foo/bar, and the + # search pattern is `bar', go to /foo/bar/foo/bar; but if the search pattern # is `foo', go to /foo/bar/foo if (( ZSHZ_UNCOMMON )) && [[ -n $cd ]]; then if [[ -n $cd ]]; then @@ -960,6 +966,75 @@ add-zsh-hook chpwd _zshz_chpwd (( ${fpath[(ie)${0:A:h}]} <= ${#fpath} )) || fpath=( "${0:A:h}" "${fpath[@]}" ) + +# Save the existing Tab binding so that the completion widget can invoke it, +# but being careful not to create a situation where the widget ends up calling +# itself and causing infinite recursion if this script is re-sourced. +if (( ! ${+widgets[_zshz_zle_completion_widget]} )); then + ZSHZ[TAB_BINDING]="${$(bindkey -M main '^I')##* }" +fi + +############################################################ +# ZLE widget to fix spaces-as-wildcards completion +# +# When completing a Zsh-z command with multiple search terms +# (e.g. `z us lo bi'), collapse the terms into a single +# wildcard-joined word (e.g. `z us*lo*bi') before triggering +# completion. This causes compadd to replace the whole query +# with the matched path rather than just the last word. +# +# Globals: +# ZSHZ_CMD +############################################################ +_zshz_zle_completion_widget() { + + setopt LOCAL_OPTIONS EXTENDED_GLOB NO_KSH_ARRAYS NO_SH_WORD_SPLIT + + local cmd=${ZSHZ_CMD:-${_Z_CMD:-z}} + + # If a trailing space was added after an already-completed absolute path + # (e.g. `z /usr/local/bin '), a second Tab would otherwise re-trigger + # completion on an empty word and insert a duplicate. Bail out early. + if [[ $LBUFFER[-1] == ' ' && ${${LBUFFER% }##* } == [/~]* ]]; then + return + fi + + # Only act when there are at least two words after the command + if [[ $LBUFFER == ${cmd}\ *\ * ]]; then + local after=${LBUFFER#${cmd} } + local -a parts option_parts search_parts + local p past_options=0 + + parts=( ${(z)after} ) + for p in $parts; do + if (( ! past_options )) && [[ $p == (--|-[cehlrRtx]##|--add|--complete|--help) ]]; then + option_parts+=( $p ) + # `--' terminates option parsing; subsequent tokens are positional, + # even if they happen to look like options. + [[ $p == -- ]] && past_options=1 + else + past_options=1 + search_parts+=( $p ) + fi + done + + if (( ${#search_parts} > 1 )); then + LBUFFER="${cmd}${option_parts:+ ${(j: :)option_parts}} ${(j:*:)search_parts}" + fi + fi + + # If Tab had a non-default binding, continue to use it; otherwise the default + # expand-or-complete gets used. + zle ${ZSHZ[TAB_BINDING]:-expand-or-complete} +} + +# Register the widget and bind to Tab, but only if this script has not already +# been sourced -- avoid infinite recursion. +if (( ! ${+widgets[_zshz_zle_completion_widget]} )); then + zle -N _zshz_zle_completion_widget + bindkey -M main '^I' _zshz_zle_completion_widget +fi + ############################################################ # zsh-z functions ############################################################ @@ -974,7 +1049,8 @@ ZSHZ[FUNCTIONS]='_zshz_usage zshz _zshz_precmd _zshz_chpwd - _zshz' + _zshz + _zshz_zle_completion_widget' ############################################################ # Enable WARN_NESTED_VAR for functions listed in @@ -1004,6 +1080,16 @@ zsh-z_plugin_unload() { add-zsh-hook -D precmd _zshz_precmd add-zsh-hook -d chpwd _zshz_chpwd + zle -D _zshz_zle_completion_widget + + # Only restore Tab binding if it is still bound to our widget; otherwise + # leave it alone. + local _zshz_current_tab + _zshz_current_tab="$(bindkey -M main '^I' 2>/dev/null || true)" + if [[ ${_zshz_current_tab##* } == _zshz_zle_completion_widget ]]; then + bindkey -M main '^I' "${ZSHZ[TAB_BINDING]:-expand-or-complete}" + fi + local x for x in ${=ZSHZ[FUNCTIONS]}; do (( ${+functions[$x]} )) && unfunction $x