Compare commits

...

9 Commits

Author SHA1 Message Date
Shohei YOSHIDA 4c84ebad53
Merge pull request #1225 from zsh-users/update
Update dget, diana, do-release-upgrade, direnv, clang-format, jest
2026-02-18 19:08:20 +09:00
Shohei YOSHIDA 39bbdda416
Merge pull request #1224 from zsh-users/remove_drush
Remove drush completion
2026-02-18 19:06:37 +09:00
Shohei YOSHIDA fbddce1074
Update jest completion and shorten too long description 2026-02-18 12:01:25 +09:00
Shohei YOSHIDA ea15ee250e
simplify array completion in clang-format 2026-02-18 09:06:11 +09:00
Shohei YOSHIDA 4375bc3e03
Remove drush completion
Because drush supports zsh completion now.
2026-02-17 14:26:18 +09:00
Shohei YOSHIDA 532813bd3b
Add export completion and disallow alias 2026-02-17 14:17:14 +09:00
Shohei YOSHIDA f6c262ad83
Remove deprecated flag completions 2026-02-17 13:56:45 +09:00
Shohei YOSHIDA 9c17cce4ef
apply formatting and simplify code 2026-02-17 13:56:39 +09:00
Shohei YOSHIDA a5f0a52034
Add missing '-k' flag completion and cleanup code 2026-02-17 13:55:42 +09:00
7 changed files with 172 additions and 368 deletions

View File

@ -49,7 +49,7 @@ _arguments \
'(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \ '(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \
'--dump-config[Dump configuration options to stdout and exit]' \ '--dump-config[Dump configuration options to stdout and exit]' \
'--fail-on-incomplete-format[If set, fail with exit code 1 on incomplete format]' \ '--fail-on-incomplete-format[If set, fail with exit code 1 on incomplete format]' \
'--fallback-style=[The name of the predefined style used as a fallback]: :'"($styles)" \ '--fallback-style=[The name of the predefined style used as a fallback]: :($styles)' \
'--ferror-limit=[Set the maximum number of clang-format errors to emit before stopping]:limit' \ '--ferror-limit=[Set the maximum number of clang-format errors to emit before stopping]:limit' \
'*--files=[Provide a list of files to run clang-format]: :_files' \ '*--files=[Provide a list of files to run clang-format]: :_files' \
'--fno-color-diagnostics[If set, not to print diagnostics in color]' \ '--fno-color-diagnostics[If set, not to print diagnostics in color]' \
@ -63,7 +63,7 @@ _arguments \
'--print-options[Print non default options after command line parsing]' \ '--print-options[Print non default options after command line parsing]' \
'--qualifier-alignment=[If set, overrides the qualifier alignment style determined by the QualifierAlignment style flag]' \ '--qualifier-alignment=[If set, overrides the qualifier alignment style determined by the QualifierAlignment style flag]' \
'--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \ '--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \
'--style=[Set coding style]: :'"($styles)" \ '--style=[Set coding style]: :($styles)' \
'--verbose[If set, show the list of processed files]' \ '--verbose[If set, show the list of processed files]' \
'(- *)--version[Display the version of this program]' \ '(- *)--version[Display the version of this program]' \
'*: :_files' '*: :_files'

View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for dget 2.22.2 # Completion script for dget 2.25.19
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -39,28 +39,21 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_dget() { _arguments -A "-*" \
local context state line expl '(- *)'{-h,--help}'[Show help message]' \
local -A opt_args '(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \
_arguments -A "-*" \ '(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \
'(- *)'{-h,--help}'[Show help message]' \ '(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \
'(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \ '(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \ '(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \
'(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \ '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
'(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \ '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
'(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \ '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
'(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \ '(--no-conf -k --insecure)'{-k,--insecure}'[Do not check SSL certificates when downloading]' \
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \ '(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
'(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \ "(--no-conf)--no-conf[Don't read devscripts config files]" \
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \ '(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
'(--no-conf --insecure)--insecure[Do not check SSL certificates when downloading]' \
'(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
"(--no-conf)--no-conf[Don't read devscripts config files]" \
'(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
}
_dget "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -79,72 +79,66 @@ _diana_command_arguments() {
(remove) (remove)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to delete' GIDs _describe -t output 'Downloads to delete' GIDs
;; ;;
(info) (info)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to get info' GIDs _describe -t output 'Downloads to get info' GIDs
;; ;;
(files) (files)
_diana_load_gids _diana_load_gids
_describe -t output 'Get files for downloads' GIDs _describe -t output 'Get files for downloads' GIDs
;; ;;
(forcerm) (forcerm)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to delete' GIDs _describe -t output 'Downloads to delete' GIDs
;; ;;
(pause) (pause)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to pause' GIDs _describe -t output 'Downloads to pause' GIDs
;; ;;
(resume) (resume)
_diana_load_paused_gids _diana_load_paused_gids
_describe -t output 'Downloads to resume' PGIDs _describe -t output 'Downloads to resume' PGIDs
;; ;;
(preview) (preview)
_diana_load_gids _diana_load_gids
_describe -t output 'Downloads to preview' GIDs _describe -t output 'Downloads to preview' GIDs
;; ;;
esac esac
} }
_diana() { _diana_subcommands() {
local -a commands local -a commands=(
"list:Output the list of active downloads."
"paused:Output the list of paused downloads."
"stopped:Output the list of stopped downloads."
"info:Output information regarding the given GIDs."
"files:Output the files owned by the downloads corresponding to the given GIDs."
"errors:Output the list of errors."
"stats:Output download bandwidth statistics."
"add:Download the given items (local or remote URLs to torrents, etc.)."
"remove:Remove the downloads corresponding to the given GIDs."
"forcerm:Forcibly remove the downloads corresponding to the given GIDs."
"pause:Pause the downloads corresponding to the given GIDs."
"resume:Resume the downloads corresponding to the given GIDs."
"preview:Preview all the files from all the downloads corresponding to the given GIDs."
"sleep:Pause all the active downloads."
"wake:Resume all the paused downloads."
"purge:Clear the list of stopped downloads and errors."
"clean:Stop seeding completed downloads."
)
commands=( _describe -t commands 'commands' commands
"list:Output the list of active downloads."
"paused:Output the list of paused downloads."
"stopped:Output the list of stopped downloads."
"info:Output information regarding the given GIDs."
"files:Output the files owned by the downloads corresponding to the given GIDs."
"errors:Output the list of errors."
"stats:Output download bandwidth statistics."
"add:Download the given items (local or remote URLs to torrents, etc.)."
"remove:Remove the downloads corresponding to the given GIDs."
"forcerm:Forcibly remove the downloads corresponding to the given GIDs."
"pause:Pause the downloads corresponding to the given GIDs."
"resume:Resume the downloads corresponding to the given GIDs."
"preview:Preview all the files from all the downloads corresponding to the given GIDs."
"sleep:Pause all the active downloads."
"wake:Resume all the paused downloads."
"purge:Clear the list of stopped downloads and errors."
"clean:Stop seeding completed downloads."
)
_arguments -C \
'1:cmd:->cmds' \
'*:: :->args' \
case "$state" in
(cmds)
_describe -t commands 'commands' commands
;;
(*)
_diana_command_arguments
;;
esac
} }
_diana _arguments \
'1:cmd:_diana_subcommands' \
'*:: :_diana_command_arguments'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

View File

@ -43,9 +43,11 @@ _direnv_commands() {
'grant:Grants direnv permission to load the given .envrc or .env file' 'grant:Grants direnv permission to load the given .envrc or .env file'
'block:Revokes the authorization of a given .envrc or .env file' 'block:Revokes the authorization of a given .envrc or .env file'
'deny:Revokes the authorization of a given .envrc or .env file' 'deny:Revokes the authorization of a given .envrc or .env file'
'disallow:Revokes the authorization of a given .envrc or .env file'
'revoke:Revokes the authorization of a given .envrc or .env file' 'revoke:Revokes the authorization of a given .envrc or .env file'
'edit:Opens PATH_TO_RC or the current .envrc or .env into an $EDITOR and allow the file to be loaded afterwards' 'edit:Opens PATH_TO_RC or the current .envrc or .env into an $EDITOR and allow the file to be loaded afterwards'
'exec:Executes a command after loading the first .envrc or .env found in DIR' 'exec:Executes a command after loading the first .envrc or .env found in DIR'
'export:Loads an .envrc or .env and prints the diff in terms of exports'
"fetchurl:Fetches a given URL into direnv's CAS" "fetchurl:Fetches a given URL into direnv's CAS"
'help:shows this help' 'help:shows this help'
'hook:Used to setup the shell hook' 'hook:Used to setup the shell hook'
@ -82,6 +84,12 @@ _direnv() {
'2:command:_command_names' \ '2:command:_command_names' \
&& ret=0 && ret=0
;; ;;
(export)
local -a supported_shells=(bash elvish gha gzenv murex tcsh vim zsh fish json pwsh systemd)
_arguments \
'1:shell:($supported_shells)' \
&& ret=0
;;
(hook) (hook)
_arguments \ _arguments \
'1:shell:(bash zsh fish tcsh elvish)' \ '1:shell:(bash zsh fish tcsh elvish)' \

View File

@ -24,7 +24,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for do-release-upgrade 23.10.10 # Completion script for do-release-upgrade 25.10.7
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -40,12 +40,10 @@ _arguments \
'(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \ '(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \
'--data-dir=[Directory that contains the data files]:dir:_files -/' \ '--data-dir=[Directory that contains the data files]:dir:_files -/' \
'(-p --proposed)'{-p,--proposed}'[Try upgrading to the latest release using the upgrade from \$distro-proposed]' \ '(-p --proposed)'{-p,--proposed}'[Try upgrading to the latest release using the upgrade from \$distro-proposed]' \
'(-m --mode)'{-m,--mode=}'[Run in a special upgrade mode]:mode:(desktop server)' \
'(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \ '(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \
'(- *)--check-dist-upgrade-only[Check only if a new distribution release is available]' \ '(- *)--check-dist-upgrade-only[Check only if a new distribution release is available]' \
'--allow-third-party[Try the upgrade with third party mirrors and repositories]' \ '--allow-third-party[Try the upgrade with third party mirrors and repositories]' \
'(-q --quiet)'{-q,--quiet}'[Quiet mode]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode]'
\*{-e,--env=}'[A comma-separated list of environment variables]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -1,191 +0,0 @@
#compdef drush
# ------------------------------------------------------------------------------
# Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for Drush (https://drushcommands.com/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Vasily Kraev (https://github.com/vasilykraev)
#
# ------------------------------------------------------------------------------
_drush() {
local curcontext='$curcontext' state line cmds ret=1
integer NORMARG
typeset -A opt_args
global_args=('--debug' '--verbose' '--yes' '--no' '--simulate' '--root=' '--uri=')
_arguments -C \
'(--*)'{--version,--version}'[Show drush version.]' \
'(- *)'{-d,--debug}'[Display even more information, including internal messages.]' \
'(- *)'{-v,--verbose}'[Display extra information about the command.]' \
'(- *)'{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
'(- *)'{-n,--no}'[Assume "no" as answer to all prompts.]' \
'(- *)'{-s,--simulate}'[Simulate all relevant actions (don'\''t actually change the system).]' \
'(- *)'{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
'(- *)'{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]' \
'1: :->cmds' \
'*::arg:->args' \
&& ret=0
case $state in
cmds)
_values 'drush command' \
'(archive-dump)'{archive-dump,ard,arb}'[Backup your code, files, and database into a single file.]' \
'(archive-restore)'{archive-restore,arr}'[Expand a site archive into a Drupal web site.]' \
'(cache-clear)'{cache-clear,cc}'[Clear a specific cache, or all drupal caches.]' \
'(core-status)'{core-status,status,st}'[Provides a birds-eye view of the current Drupal installation, if any.]' \
'(core-cron)'{core-cron,cron}'[Run all cron hooks in all active modules for specified site.]' \
'(core-execute)'{core-execute,exec}'[Execute a shell command. Usually used with a site alias.]' \
'(drupal-directory)'{drupal-directory,dd}'[Return the filesystem path for modules/themes and other key folders.]' \
'help[Print this help message.]' \
'image-flush[Flush all derived images for a given style.]' \
'(site-alias)'{site-alias,sa}'[Print an alias record.]' \
'(site-install)'{site-install,si}'[Install Drupal along with modules/themes/configuration using the specified install profile.]' \
'test-clean[Clean temporary tables and files.]' \
'test-run[Run tests. Note that you must use the --uri option.]' \
'(updatedb)'{updatedb,updb}'[Apply any database updates required (as with running update.php).]' \
'(variable-delete)'{variable-delete,vdel}'[Delete a variable.]' \
'(variable-get)'{variable-get,vget}'[Get a list of some or all site variables and values.]' \
'(variable-set)'{variable-set,vset}'[Set a variable.]' \
'(pm-list)'{pm-list,pml}'[Show a list of available extensions (modules and themes).]' \
'(pm-disable)'{pm-disable,dis}'[Disable one or more extensions (modules or themes). Disable dependent extensions as well.]' \
'(pm-download)'{pm-download,dl}'[Download projects from drupal.org or other sources.]' \
'(pm-enable)'{pm-enable,en}'[Enable one or more extensions (modules or themes). Enable dependent extensions as well.]' \
'pm-uninstall[Uninstall one or more modules.]' \
'pm-update[Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb).]' \
'(sql-cli)'{sql-cli,sqlc}'[Open a SQL command-line interface using Drupals credentials.]' \
'sql-drop[Drop all tables in a given database.]' \
'sql-dump[Exports the Drupal DB as SQL using mysqldump or equivalent.]' \
'(sql-query)'{sql-query,sqlq}'[Execute a query against the site database.]' \
'sql-sync[Copy and import source database to target database. Transfers via rsync.]' \
'(user-login)'{user-login,uli}'[Display a one time login link for the given user account (defaults to uid 1).]' \
'(user-password)'{user-password,upwd}'[(Re)Set the password for the user account with the specified name.]' \
'(devel-reinstall)'{devel-reinstall,dre}'[Disable, Uninstall, and Install a list of projects. (devel)]' \
'(devel-token)'{devel-token,token}'[List available tokens (devel)]' \
'(generate-content)'{generate-content,genc}'[Create content. (devel_generate)]' \
'(generate-menus)'{generate-menus,genm}'[Create menus and menu items. (devel_generate)]' \
'(generate-terms)'{generate-terms,gent}'[Create terms in specified vocabulary. (devel_generate)]' \
'(generate-users)'{generate-users,genu}'[Create users. (devel_generate)]' \
'(generate-vocabs)'{generate-vocabs,genv}'[Create vocabularies. (devel_generate)]' \
'(features-diff)'{features-diff,fd}'[Show the difference between the default and overridden state of a feature.]' \
'(features-export)'{features-export,fe}'[Export a feature from your site into a module.]' \
'(features-list)'{features-list,fl}'[List all the available features for your site.]' \
'(features-revert)'{features-revert,fr}'[Revert a feature module on your site.]' \
'(features-revert-all)'{features-revert-all,fra}'[Revert all enabled feature module on your site.]' \
'(features-update)'{features-update,fu}'[Update a feature module on your site.]' \
'(features-update-all)'{features-update-all,fua}'[Update all feature modules on your site.]' \
&& ret=0
;;
args)
case $line[1] in
(archive-dump|ard)
_arguments \
'(--description)--description=[Filter out extensions that are provided by drupal core.]' \
'(--destination)--destination=[The full path and filename in which the archive should be stored. If omitted, it will be saved to the drush-backups directory.]' \
'(--no-core)--no-core[Exclude Drupal core, so the backup only contains the site specific stuff.]' \
'(--pipe)--pipe[Only print the destination of the archive. Useful for scripts that don'\''t pass --destination.]' \
'(--tar-options)--tar-options=[Options passed thru to the tar command.]' \
&& ret=0
compadd -a global_args
;;
(archive-restore|arr)
_arguments \
'(--db-prefix)--db-prefix[An optional table prefix to use during restore.]' \
'(--db-su)--db-su[Account to use when creating the new database. Optional.]' \
'(--db-su-pw)--db-su-pw[Password for the "db-su" account. Optional.]' \
'(--db-url)--db-url=[A Drupal 6 style database URL indicating the target for database restore. If not provided, the archived settings.php is used. ]' \
'(--destination)--destination[Specify where the Drupal site should be expanded, including the docroot. Defaults to the current working directory.]' \
'(--overwrite)--overwrite[Allow drush to overwrite any files in the destination.]' \
&& ret=0
compadd -a global_args
;;
(user-password|upwd)
_arguments \
'--password=:Set the password for the username someuser.' \
&& ret=0
;;
(help)
_values 'commands' 'arb' 'archive-dump' 'archive-restore' 'ard' 'arr' 'cache-clear' 'cc' 'core-cron' 'core-execute' 'core-status' 'cron' 'dd' 'devel-reinstall' 'devel-token' 'dis' 'dl' 'dre' 'drupal-directory' 'en' 'exec' 'fd' 'fe' 'features-diff' 'features-export' 'features-list' 'features-revert' 'features-revert-all' 'features-update' 'features-update-all' 'fl' 'fr' 'fra' 'fu' 'fua' 'genc' 'generate-content' 'generate-menus' 'generate-terms' 'generate-users' 'generate-vocabs' 'genm' 'gent' 'genu' 'genv' 'help' 'image-flush' 'pm-disable' 'pm-download' 'pm-enable' 'pm-list' 'pm-uninstall' 'pm-update' 'pml' 'sa' 'si' 'site-alias' 'site-install' 'sql-cli' 'sql-drop' 'sql-dump' 'sql-query' 'sql-sync' 'sqlc' 'sqlq' 'st' 'status' 'test-clean' 'test-run' 'token' 'uli' 'updatedb' 'updb' 'upwd' 'user-login' 'user-password' 'variable-delete' 'variable-get' 'variable-set' 'vdel' 'vget' 'vset'
;;
(cc)
_values 'options' 'all' 'drush' 'theme-registry' 'menu' 'css-js' 'block'
;;
(pm-list|pml)
_arguments \
'(--core)--core[Filter out extensions that are not in drupal core.]' \
'(--no-core)--no-core[Filter out extensions that are provided by drupal core.]' \
'(--pipe)--pipe[Returns a whitespace delimited list of the names of the resulting extensions.]' \
'(--status)--status=-[Filter by extension status. Choices: enabled, disabled and/or "not installed".]:status:(enabled disabled)' \
'(--type)--type=-[Filter by extension type. Choices: module, theme.]:type:(module theme)' \
&& ret=0
;;
(pm-disable|dis)
_modules=( $(drush pml --status=enabled --pipe) )
if [[ $_modules != "" ]]; then
_values 'enabled modules' $_modules
fi
;;
(pm-enable|en)
_arguments -C \
'--resolve-dependencies[Attempt to download any missing dependencies. At the moment, only works when the module name is the same as the project name.]' \
'--skip[Skip automatic downloading of libraries (c.f. devel).]' && ret=0
_modules=( $(drush pml --status="disabled,not installed" --pipe) )
if [[ $_modules != "" ]]; then
_values -s 'not yet enabled modules' $_modules && ret=0
fi
;;
(*)
_values 'Global options' \
{-d,--debug}'[Display even more information, including internal messages.]' \
{-v,--verbose}'[Display extra information about the command.]' \
{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
{-n,--no}'[Assume "no" as answer to all prompts.]' \
{-s,--simulate}'[Simulate all relevant actions (don'\''t actually change the system).]' \
{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]'
;;
esac
;;
esac
}
_drush '$@'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et

210
src/_jest
View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for Jest 29.7.0 (https://jestjs.io/) # Completion script for Jest 30.1.3 (https://jestjs.io/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -41,112 +41,114 @@
local curcontext=$curcontext state line ret=1 local curcontext=$curcontext state line ret=1
declare -A opt_args declare -A opt_args
local -a notify_modes=("always" "failure" "success" "change" "success-change" "failure-change")
_arguments -C -s \ _arguments -C -s \
'(- : *)'{-h,--help}'[Show help]' \ '(- : *)'{-h,--help}'[Show help]' \
'(- : *)'--version'[Show version number]' \ '(- : *)'--version'[Show version number]' \
--all'[The opposite of `onlyChanged`.]' \ '--all[The opposite of "onlyChanged"]' \
--automock'[Automock all files by default.]' \ '--automock[Automock all files by default]' \
'(-b --bail)'{-b,--bail}'[Exit the test suite immediately after `n` number of failing tests.]' \ '(-b --bail)'{-b,--bail}'[Exit the test suite immediately after "n" number of failing tests]' \
--cache'[Whether to use the transform cache.]' \ '(--cache --no-cache)--cache[Use the transform cache]' \
--cacheDirectory'[The directory where Jest should store its cached dependency information.]:directories:_dirs' \ '(--cache --no-cache)--no-cache[Do not use the transform cache]' \
--changedFilesWithAncestor'[Runs tests related to the current changes and the changes made in the last commit.]' \ '--cacheDirectory[The directory where Jest should store its cached dependency information]:dir:_files -/' \
--changedSince'[Runs tests related to the changes since the provided branch.]:string' \ '--changedFilesWithAncestor[Run tests related to the current changes and the changes made in the last commit]' \
--ci'[Whether to run Jest in continuous integration (CI) mode.]' \ '--changedSince[Run tests related to the changes since the provided branch]:string' \
--clearCache'[Clears the configured Jest cache directory and then exits.]' \ '--ci[Run Jest in continuous integration (CI) mode]' \
--clearMocks'[Automatically clear mock calls, instances, contexts and results before every test.]' \ '--clearCache[Clear the configured Jest cache directory and then exits]' \
--collectCoverageFrom'[A glob pattern relative to <rootDir> matching the files that coverage info needs to be collected from.]:string' \ '--clearMocks[Automatically clear mock calls, instances, contexts and results before every test]' \
'(--color --colors)'{--color,--colors}'[Forces test results output color highlighting (even if stdout is not a TTY).]' \ '--collectCoverageFrom[A glob pattern for collecting coverage info]:string' \
'(-c --config)'{-c,--config}'[The path to a jest config file specifying how to find and execute tests.]:files:_files' \ '(--color --colors)'{--color,--colors}'[Force test results output color highlighting (even if stdout is not a TTY)]' \
'(--coverage --collectCoverage)'{--coverage,--collectCoverage}'[Indicates that test coverage information should be collected and reported in the output.]' \ '(-c --config)'{-c,--config}'[The path to a jest config file specifying how to find and execute tests]:files:_files' \
--coverageDirectory'[The directory where Jest should output its coverage files.]:directories:_dirs' \ '(--coverage --collectCoverage)'{--coverage,--collectCoverage}'[Indicate that test coverage information should be collected and reported in the output]' \
--coveragePathIgnorePatterns'[An array of regexp pattern strings that are matched against all file paths before executing the test.]:array:' \ '--coverageDirectory[The directory where Jest should output its coverage files]:dir:_files -/' \
--coverageProvider'[Select between Babel and V8 to collect coverage]:choices:(babel v8)' \ '--coveragePathIgnorePatterns[An array of regexp pattern strings that are matched against all file paths before executing the test]:array' \
--coverageReporters'[A list of reporter names that Jest uses when writing coverage reports.]:array' \ '--coverageProvider[Select between Babel and V8 to collect coverage]:choices:(babel v8)' \
--coverageThreshold'[A JSON string with which will be used to configure minimum threshold enforcement for coverage results]:string' \ '--coverageReporters[A list of reporter names that Jest uses when writing coverage reports]:array' \
--debug'[Print debugging info about your jest config.]' \ '--coverageThreshold[A JSON string with which will be used to configure minimum threshold enforcement for coverage results]:string' \
--detectLeaks'[**EXPERIMENTAL**: Detect memory leaks in tests.]' \ '--debug[Print debugging info about your jest config]' \
--detectOpenHandles'[Print out remaining open handles preventing Jest from exiting at the end of a test run.]' \ '--detectLeaks[**EXPERIMENTAL**: Detect memory leaks in tests]' \
'(--env --testEnvironment)'{--env,--testEnvironment}'[The test environment used for all tests.]:files:_files' \ '--detectOpenHandles[Print out remaining open handles preventing Jest from exiting at the end of a test run]' \
--errorOnDeprecated'[Make calling deprecated APIs throw helpful error messages.]' \ '(--env --testEnvironment)'{--env,--testEnvironment}'[The test environment used for all tests]:files:_files' \
'(-e --expand)'{-e,--expand}'[Use this flag to show full diffs instead of a patch.]' \ '--errorOnDeprecated[Make calling deprecated APIs throw helpful error messages]' \
--filter'[Path to a module exporting a filtering function.]:string' \ '(-e --expand)'{-e,--expand}'[Use this flag to show full diffs instead of a patch]' \
--findRelatedTests'[Find related tests for a list of source files that were passed in as arguments.]' \ '--filter[Path to a module exporting a filtering function]:string' \
--forceExit'[Force Jest to exit after all tests have completed running.]' \ '--findRelatedTests[Find related tests for a list of source files that were passed in as arguments]' \
--globalSetup'[The path to a module that runs before All Tests.]:files:_files' \ '--forceExit[Force Jest to exit after all tests have completed running]' \
--globalTeardown'[The path to a module that runs after All Tests.]:files:_files' \ '--globalSetup[The path to a module that runs before All Tests]:files:_files' \
--globals'[A JSON string with map of global variables that need to be available in all test environments.]:string' \ '--globalTeardown[The path to a module that runs after All Tests]:files:_files' \
--haste'[A JSON string with map of variables for the haste module system]:string' \ '--globals[A JSON string with map of global variables that need to be available in all test environments]:string' \
--ignoreProjects'[Ignore the tests of the specified projects.]:array' \ '--haste[A JSON string with map of variables for the haste module system]:string' \
--init'[Generate a basic configuration file]' \ '--ignoreProjects[Ignore the tests of the specified projects]:array' \
--injectGlobals'[Should Jest inject global variables or not]' \ '--injectGlobals[Should Jest inject global variables or not]' \
--json'[Prints the test results in JSON.]' \ '--json[Print the test results in JSON]' \
--lastCommit'[Run all tests affected by file changes in the last commit made.]' \ '--lastCommit[Run all tests affected by file changes in the last commit made]' \
--listTests'[Lists all tests Jest will run given the arguments and exits.]' \ '--listTests[List all tests Jest will run given the arguments and exits]' \
--logHeapUsage'[Logs the heap usage after every test.]' \ '--logHeapUsage[Log the heap usage after every test]' \
--maxConcurrency'[Specifies the maximum number of tests that are allowed to run concurrently.]:number' \ '--maxConcurrency[Specify the maximum number of tests that are allowed to run concurrently]:number' \
'(-w --maxWorkers)'{-w,--maxWorkers}'[Specifies the maximum number of workers the worker-pool will spawn for running tests.]:string' \ '(-w --maxWorkers)'{-w,--maxWorkers}'[Maximum number of workers will spawn for running tests]:string' \
--moduleDirectories'[An array of directory names to be searched recursively up from the requiring module'"'"'s location.]:directories:_dirs' \ "--moduleDirectories[Directories to be searched from the requiring module's location]:dir:_files -/" \
--moduleFileExtensions'[An array of file extensions your modules use.]:array' \ '--moduleFileExtensions[An array of file extensions your modules use]:array' \
--moduleNameMapper'[A JSON string with a map from regular expressions to module names or to arrays of module names that allow to stub out resources]:string' \ '--moduleNameMapper[A JSON string with a map from regular expressions to module names]:string' \
--modulePathIgnorePatterns'[An array of regexp pattern strings that are matched against all module paths before those paths are to be considered "visible" to the module loader.]:array' \ '--modulePathIgnorePatterns[An array of ignore module pattern]:array' \
--modulePaths'[An array of absolute paths to additional locations to search when resolving modules.]:directories:_dirs' \ '--modulePaths[An array of absolute paths to search modules]:directories:_files -/' \
--no-cache'[Do not use the transform cache.]' \ '--noStackTrace[Disable stack trace in test results output]' \
--no-watchman'[Disable watchman for file crawling.]' \ '--notify[Activate notifications for test results]' \
--noStackTrace'[Disables stack trace in test results output]' \ '--notifyMode[Specify notification mode for test results]:mode:($notify_modes)' \
--notify'[Activates notifications for test results.]' \ '(-o --onlyChanged)'{-o,--onlyChanged}'[Attempt to identify which tests to run based on which files have changed in the current repository]' \
--notifyMode'[Specifies when notifications will appear for test results.]:string' \ '(-f --onlyFailures)'{-f,--onlyFailures}'[Run tests that failed in the previous execution]' \
'(-o --onlyChanged)'{-o,--onlyChanged}'[Attempts to identify which tests to run based on which files have changed in the current repository.]' \ '--openHandlesTimeout[Timeout msecs for open handle warnings]:number' \
'(-f --onlyFailures)'{-f,--onlyFailures}'[Run tests that failed in the previous execution.]' \ '--outputFile[Output file name of test results]:files:_files' \
--openHandlesTimeout'[Print a warning about probable open handles if Jest does not exit cleanly after this number of milliseconds.]:number' \ '--passWithNoTests[Will not fail if no tests are found]' \
--outputFile'[Write test results to a file when the --json option is also specified.]:files:_files' \ "--preset[A preset that is used as a base for Jest's configuration]:string" \
--passWithNoTests'[Will not fail if no tests are found (for example while using `--testPathPattern`.)]' \ '--prettierPath[The path to the "prettier" module used for inline snapshots]:string' \
--preset'[A preset that is used as a base for Jest'"'"'s configuration.]:string' \ '--projects[Projects that use Jest to run all tests of all projects in a single instance]:array' \
--prettierPath'[The path to the "prettier" module used for inline snapshots.]:string' \ '--randomize[Shuffle the order of the tests within a file]' \
--projects'[A list of projects that use Jest to run all tests of all projects in a single instance of Jest.]:array' \ '--reporters[A list of custom reporters for the test suite]:array' \
--randomize'[Shuffle the order of the tests within a file.]' \ '--resetMocks[Automatically reset mock state before every test]' \
--reporters'[A list of custom reporters for the test suite.]:array' \ '--resetModules[The module registry for every test file will be reset before running each test]' \
--resetMocks'[Automatically reset mock state before every test.]' \ '--resolver[A JSON string which allows the use of a custom resolver]:string' \
--resetModules'[If enabled, the module registry for every test file will be reset before running each individual test.]' \ '--restoreMocks[Automatically restore mock state and implementation before every test]' \
--resolver'[A JSON string which allows the use of a custom resolver.]:string' \ '--rootDir[The root directory that Jest should scan for tests and modules]:dir:_files -/' \
--restoreMocks'[Automatically restore mock state and implementation before every test.]' \ '--roots[A list directories that Jest should use to search for files in]:array:_files -/' \
--rootDir'[The root directory that Jest should scan for tests and modules within.]:directories:_dirs' \ '(-i --runInBand)'{-i,--runInBand}'[Run all tests serially in the current process]' \
--roots'[A list of paths to directories that Jest should use to search for files in.]:array' \ '--runTestsByPath[Used when provided patterns are exact file paths]' \
'(-i --runInBand)'{-i,--runInBand}'[Run all tests serially in the current process.]' \ "--runner[Use a custom runner instead of Jest's default test runner]:string" \
--runTestsByPath'[Used when provided patterns are exact file paths.]' \ '--seed[Set a seed value that can be retrieved in a tests file via "jest.getSeed()"]:number' \
--runner'[Allows to use a custom runner instead of Jest'"'"'s default test runner.]:string' \ '--selectProjects[Run the tests of the specified projects]:array' \
--seed'[Sets a seed value that can be retrieved in a tests file via `jest.getSeed()`.]:number' \ '--setupFiles[Module paths that configure or set up the testing environment before each test]:files:_files' \
--selectProjects'[Run the tests of the specified projects.]:array' \ '--setupFilesAfterEnv[Module paths that configure or set up the testing framework before each test]:files:_files' \
--setupFiles'[A list of paths to modules that run some code to configure or set up the testing environment before each test.]:files:_files' \ '--shard[Shard tests and execute only the selected shard]:shard' \
--setupFilesAfterEnv'[A list of paths to modules that run some code to configure or set up the testing framework before each test]:files:_files' \ '--showConfig[Print your jest config and then exits]' \
--shard'[Shard tests and execute only the selected shard]:files:_files' \ '--showSeed[Print the seed value in the test report summary]' \
--showConfig'[Print your jest config and then exits.]' \ '--silent[Prevent tests from printing messages through the console]' \
--showSeed'[Prints the seed value in the test report summary.]' \ '--skipFilter[Disable the filter provided by --filter]' \
--silent'[Prevent tests from printing messages through the console.]' \ '--snapshotSerializers[Paths of snapshot serializer modules for snapshot testing]:files:_files' \
--skipFilter'[Disables the filter provided by --filter.]' \ '--testEnvironmentOptions[Options that will be passed to the "testEnvironment"]:string' \
--snapshotSerializers'[A list of paths to snapshot serializer modules Jest should use for snapshot testing.]:files:_files' \ '--testFailureExitCode[Exit code of "jest" command if the test run failed]:string' \
--testEnvironmentOptions'[A JSON string with options that will be passed to the `testEnvironment`.]:string' \ '--testLocationInResults[Add "location" information to the test results]' \
--testFailureExitCode'[Exit code of `jest` command if the test run failed]:string' \ '--testMatch[The glob patterns Jest uses to detect test files]:array' \
--testLocationInResults'[Add `location` information to the test results]' \ '(-t --testNamePattern)'{-t,--testNamePattern}'[Run only tests with a name that matches the regex pattern]:string' \
--testMatch'[The glob patterns Jest uses to detect test files.]:array' \ '--testPathIgnorePatterns[Regexp patterns for ignoring tests]:array' \
'(-t --testNamePattern)'{-t,--testNamePattern}'[Run only tests with a name that matches the regex pattern.]:string' \ '--testPathPatterns[Regexp patterns for executing tests]:array' \
--testPathIgnorePatterns'[An array of regexp pattern strings that are matched against all test paths before executing the test.]:array' \ '--testRegex[Regexp patterns that Jest uses to detect test files]:array' \
--testPathPattern'[A regexp pattern string that is matched against all tests paths before executing the test.]:array' \ '--testResultsProcessor[Specify a custom results processor]:string' \
--testRegex'[A string or array of string regexp patterns that Jest uses to detect test files.]:array' \ '--testRunner[Specify a custom test runner]:string' \
--testResultsProcessor'[Allows the use of a custom results processor.]:string' \ '--testSequencer[Specify a custom test sequencer]:string' \
--testRunner'[Allows to specify a custom test runner.]:string' \ '--testTimeout[Default timeout of test cases]:number' \
--testSequencer'[Allows to specify a custom test sequencer.]:string' \ '--transform[A JSON string which maps from regular expressions to paths to transformers]:string' \
--testTimeout'[This option sets the default timeouts of test cases.]:number' \ '--transformIgnorePatterns[Ignore regexp patterns for transformation]:array' \
--transform'[A JSON string which maps from regular expressions to paths to transformers.]:string' \ '--unmockedModulePathPatterns[Regexp patterns for unmocked modules]:array' \
--transformIgnorePatterns'[An array of regexp pattern strings that are matched against all source file paths before transformation.]:array' \ '(-u --updateSnapshot)'{-u,--updateSnapshot}'[Re-record snapshots]' \
--unmockedModulePathPatterns'[An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them.]:array' \ '--useStderr[Divert all output to stderr]' \
'(-u --updateSnapshot)'{-u,--updateSnapshot}'[Use this flag to re-record snapshots.]' \ '--verbose[Display individual test results with the test suite hierarchy]' \
--useStderr'[Divert all output to stderr.]' \ '--waitForUnhandledRejections[Give one event loop turn to handle unhandles rejections]' \
--verbose'[Display individual test results with the test suite hierarchy.]' \ '--watch[Watch files for changes and rerun tests related to changed files]' \
--watch'[Watch files for changes and rerun tests related to changed files.]' \ '--watchAll[Watch files for changes and rerun all tests]' \
--watchAll'[Watch files for changes and rerun all tests.]' \ '--watchPathIgnorePatterns[Ignore patterns of watch path]:array' \
--watchPathIgnorePatterns'[An array of regexp pattern strings that are matched against all paths before trigger test re-run in watch mode.]:array' \ '(--watchman --no-watchman)--watchman[Use watchman for file crawling]' \
--watchman'[Whether to use watchman for file crawling.]' \ '(--watchman --no-watchman)--no-watchman[Do not use watchman for file crawling]' \
--workerThreads'[Whether to use worker threads for parallelization.]' \ '--workerThreads[Use worker threads for parallelization]' \
'*: :->file' \ '*: :->file' \
&& ret=0 && ret=0