Compare commits
No commits in common. "f0b1a348a15d9ce710c9487725e103ab8239b828" and "b1ffb771c936c8aa550a2240857054a8cc4b4c7b" have entirely different histories.
f0b1a348a1
...
b1ffb771c9
156
src/_cpack
156
src/_cpack
|
|
@ -1,156 +0,0 @@
|
|||
#compdef cpack
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpack 4.3.0 (https://kitware.com/cmake)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cpack() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'-G[Override/define CPACK_GENERATOR]:generator:_cpack_generators' \
|
||||
'-C[Specify the project configurations]:configuration:(Debug Release)' \
|
||||
'*-D[Set a CPack variable]:var_val' \
|
||||
'--config[Specify the config file]:file:_files' \
|
||||
'(-V --verbose)'{-V,--verbose}'[Enable verbose output]' \
|
||||
'--trace[Put underlying cmake scripts in trace mode]' \
|
||||
'--trace-expand[Put underlying cmake scripts in expanded trace mode]' \
|
||||
'--debug[Enable debug output]' \
|
||||
'-P[Override/define CPACK_PACKAGE_NAME]:package_name' \
|
||||
'-R[Override/define CPACK_PACKAGE_VERSION]:package_version' \
|
||||
'-B[Override/define CPACK_PACKAGE_DIRECTORY]:package_directory:_files -/' \
|
||||
'--vendor[Override/define CPACK_PACKAGE_VENDOR]:vendor' \
|
||||
'--preset[Read arguments from a package preset]' \
|
||||
'--list-presets[List available package preset]' \
|
||||
'(- *)'{--version,-version}=-'[Print version number and exit]::format:(json-v1)' \
|
||||
'(- *)--help[Print usage information and exit]' \
|
||||
'(- *)--help-full[Print all help manuals and exit]' \
|
||||
'(- *)--help-manual[Print one help manual and exit]:manual:_cpack_help_manuals' \
|
||||
'(- *)--help-manual-list[List help manuals available and exit]' \
|
||||
'(- *)--help-command[Print help for one command and exit]:command:_cpack_help_commands' \
|
||||
'(- *)--help-command-list[List commands with help available and exit]' \
|
||||
'(- *)--help-commands[Print cmake-commands manual and exit]' \
|
||||
'(- *)--help-module[Print help for one module and exit]:module:_cpack_help_modules' \
|
||||
'(- *)--help-module-list[List modules with help available and exit]' \
|
||||
'(- *)--help-modules[Print cmake-modules manual and exit]' \
|
||||
'(- *)--help-policy[Print help for one policy and exit]:policy:_cpack_help_policies' \
|
||||
'(- *)--help-policy-list[List policies with help available and exit]' \
|
||||
'(- *)--help-policies[Print cmake-policies manual and exit]' \
|
||||
'(- *)--help-property[Print help for one property and exit]:property:_cpack_help_properties' \
|
||||
'(- *)--help-property-list[List properties with help available and exit]' \
|
||||
'(- *)--help-properties[Print cmake-properties manual and exit]' \
|
||||
'(- *)--help-variable[Print help for one variable and exit]:variable:_cpack_help_variables' \
|
||||
'(- *)--help-variable-list[List variables with help available and exit]' \
|
||||
'(- *)--help-variables[Print cmake-variables manual and exit]' \
|
||||
&& ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_cpack_generators() {
|
||||
local -a generators=(
|
||||
"7Z:[7-Zip file format with default compression algorithm]"
|
||||
"7Z_BZ2:[7-Zip file format with BZip2 compression]"
|
||||
"7Z_DEFLATE:[7-Zip file format with Deflate compression]"
|
||||
"7Z_LZMA:[7-Zip file format with LZMA compression]"
|
||||
"7Z_LZMA2:[7-Zip file format with LZMA2 compression]"
|
||||
"7Z_PPMD:[7-Zip file format with PPMd compression]"
|
||||
"7Z_STORE:[7-Zip file format without compression]"
|
||||
"7Z_ZSTD:[7-Zip file format with Zstandard compression]"
|
||||
"AppImage:[AppImage packages]"
|
||||
"DEB:[Debian packages]"
|
||||
"External:[CPack External packages]"
|
||||
"IFW:[Qt Installer Framework]"
|
||||
"INNOSETUP:[Inno Setup packages]"
|
||||
"NSIS:[Null Soft Installer]"
|
||||
"NSIS64:[Null Soft Installer (64-bit)]"
|
||||
"NuGet:[NuGet packages]"
|
||||
"RPM:[RPM packages]"
|
||||
"STGZ:[Self extracting Tar GZip compression]"
|
||||
"TAR:[Tar no compression]"
|
||||
"TBZ2:[Tar BZip2 compression]"
|
||||
"TGZ:[Tar GZip compression]"
|
||||
"TXZ:[Tar XZ compression]"
|
||||
"TZ:[Tar Compress compression]"
|
||||
"TZST:[Tar Zstandard compression]"
|
||||
"ZIP:[ZIP file format with default compression algorithm]"
|
||||
"ZIP_BZ2:[ZIP file format with BZip2 compression]"
|
||||
"ZIP_DEFLATE:[ZIP file format with Deflate compression]"
|
||||
"ZIP_LZMA:[ZIP file format with LZMA compression]"
|
||||
"ZIP_LZMA2:[ZIP file format with LZMA2 compression]"
|
||||
"ZIP_STORE:[ZIP file format without compression]"
|
||||
"ZIP_ZSTD:[ZIP file format with Zstandard compression]"
|
||||
)
|
||||
|
||||
_describe -t 'generators' generator generators
|
||||
}
|
||||
|
||||
_cpack_help_manuals() {
|
||||
local -a manuals=(${(f)"$(cpack --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
|
||||
_values 'manual' $manuals
|
||||
}
|
||||
|
||||
_cpack_help_commands() {
|
||||
local -a commands=(${(f)"$(cpack --help-command-list 2>/dev/null )"})
|
||||
_values 'command' $commands
|
||||
}
|
||||
|
||||
_cpack_help_modules() {
|
||||
local -a modules=(${(f)"$(cpack --help-module-list 2>/dev/null )"})
|
||||
_values 'module' $modules
|
||||
}
|
||||
|
||||
_cpack_help_policies() {
|
||||
local -a policies=(${(f)"$(cpack --help-policy-list 2>/dev/null )"})
|
||||
_values 'policy' $policies
|
||||
}
|
||||
|
||||
_cpack_help_properties() {
|
||||
local -a properties=(${(f)"$(cpack --help-property-list 2>/dev/null )"})
|
||||
_values 'property' $properties
|
||||
}
|
||||
|
||||
_cpack_help_variables() {
|
||||
local -a variables=(${(f)"$(cpack --help-variable-list 2>/dev/null )"})
|
||||
_values 'variable' $variables
|
||||
}
|
||||
|
||||
_cpack "$@"
|
||||
|
||||
# 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
|
||||
103
src/_cpanm
103
src/_cpanm
|
|
@ -1,103 +0,0 @@
|
|||
#compdef cpanm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpanm 1.7049 (https://github.com/miyagawa/cpanminus)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -n -C -s \
|
||||
'(-i --install)'{-i,--install}'[Install the modules]' \
|
||||
'--self-upgrade[Upgrades itself]' \
|
||||
'--info[Displays the distribution information in "AUTHOR/Dist-Name-ver.tar.gz" format in the stdout]' \
|
||||
"--installdeps[Installs the dependencies of the target distribution but won't build itself]" \
|
||||
'--look[Download and unpack the distribution and then open the directory with your shell]' \
|
||||
'(- *)'{-h,--help}'[Display the help message]' \
|
||||
'(- *)'{-V,--version}'[Display the version number]' \
|
||||
'(-f --force)'{-f,--force}'[Force install modules even when testing failed]' \
|
||||
'(-n --notest)'{-n,--notest}'[Skip the testing of modules]' \
|
||||
'--test-only[Run the tests only]' \
|
||||
'(-S --sudo)'{-S,--sudo}'[Switch to the root user with "sudo" when installing modules]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Makes the output verbose]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Makes the output even more quiet than the default]' \
|
||||
'(-l --local-lib)'{-l,--local-lib}'[Sets the local::lib compatible path to install modules to]' \
|
||||
'(-L --local-lib-contained)'{-L,--local-lib-contained}'[Same with "--local-lib" but with --self-contained set]' \
|
||||
'--self-contained[When examining the dependencies, assume no non-core modules are installed on the system]' \
|
||||
"--exclude-vendor[Don't include module installed under the 'vendor' paths]" \
|
||||
'--mirror=[Specifies the base URL for the CPAN mirror to use]:mirror' \
|
||||
"--mirror-only[Download the mirror's index file instead of querying the CPAN Meta DB]" \
|
||||
'(-M --from)'{-M,--from}='[Use the given mirror URL and its index as the only source to search and download modules from]' \
|
||||
'--mirror-index[Specifies the file path to "02packages.details.txt" for module search index]' \
|
||||
'--cpanmetadb[Specifies an alternate URI for CPAN MetaDB index lookups]' \
|
||||
'--metacpan[Prefers MetaCPAN API over CPAN MetaDB]' \
|
||||
'--cpanfile=[Specified an alternate path for cpanfile]: :_files' \
|
||||
"--prompt[Prompts when a test fails so that you can skip, force install, retry or look what's going wrong]" \
|
||||
'--dev[Search for a newer developer release as well]' \
|
||||
'--reinstall[Reinstall even if your locally installed version is latest]' \
|
||||
'--interactive[Makes the configuration interactive]' \
|
||||
'(--pp --pureperl)'{--pp,--pureperl}'[Prefer Pure perl build of modules]' \
|
||||
'--with-recommends[Installs dependencies declared as "recommends"]' \
|
||||
'--with-suggests[Installs dependencies declared as "suggests"]' \
|
||||
'--with-develop[Install develop phase dependencies in "cpanfile"]' \
|
||||
'--with-configure[Installs configure phase dependencies in "cpanfile"]' \
|
||||
'--with-feature=[Specifies the feature to enable]::feature' \
|
||||
'--without-feature=[Not specifies the feature to enable]::feature' \
|
||||
'--with-all-feature[Specifies the all features to enable]' \
|
||||
'--configure-timeout=[Specify the timeout length to wait for the configure]' \
|
||||
'--build-timeout=[Specify the timeout length to wait for the build]' \
|
||||
'--test-timeout=[Specify the timeout length to wait for the test]' \
|
||||
'--configure-args=[Pass arguments for configure]:args' \
|
||||
'--build-args=[Pass arguments for build]:args' \
|
||||
'--test-args=[Pass arguments for test]:args' \
|
||||
'--install-args=[Pass arguments for install]:args' \
|
||||
'--scandeps[Scans the dependencies of given modules and output the tree in a text format]' \
|
||||
'--format=[Determines what format to display the scanned dependency tree]:fmt:(tree json yaml dists)' \
|
||||
'--save-dist=[Specifies the optional directory path to copy downloaded tarballs]: :_files -/' \
|
||||
'(-U --uninstall)'{-U,--uninstall}'[Uninstalls a module from the library path]' \
|
||||
'--cascade-search[Specifies whether to cascade search when you specify multiple mirrors]' \
|
||||
'--skip-installed[Skip install if specified module is already installed]' \
|
||||
'--skip-satisfies[Skip install if specified module and version is already installed]' \
|
||||
'--verify[Verify the integrity of distribution files]' \
|
||||
'--report-perl-version[Report perl version as port of User-Agent]' \
|
||||
'--auto-cleanup[Specifies the number of days in which cpanm work directories expire]::days' \
|
||||
'--man-pages[Generate man pages for executables(man1) and libraries(man3)]' \
|
||||
'--lwp[Uses LWP module to download stuff over HTTP]' \
|
||||
'--wget[Uses GNU Wget(if available) to download stuff]' \
|
||||
'--curl[Uses cURL(if available) to download stuff]' \
|
||||
&& return 0
|
||||
|
||||
# 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
|
||||
121
src/_cpm
121
src/_cpm
|
|
@ -1,121 +0,0 @@
|
|||
#compdef cpm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpm 0.998003 (https://github.com/skaji/cpm)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cpm() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Show help message]' \
|
||||
'(- *)--version[Show version and exit]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Enable debug mode]' \
|
||||
'1: :_cpm_subcommands' \
|
||||
'*::arg:->args' && ret=0
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
case $words[1] in
|
||||
(install)
|
||||
_arguments \
|
||||
'(-w --workers)'{-w,--workers=}'[number of workers(default=5)]:num' \
|
||||
'(-L --local-lib-contained)'{-L,--local-lib-contained=}'[directory to install module into, default=local/]: :_files -/' \
|
||||
'(-g --global)'{-g,--global}'[install modules into current @INC instead of local/]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
|
||||
'(--prebuilt --no-prebuilt)--prebuilt[save builds for CPAN distributions and later install the prebuilts if available]' \
|
||||
'(--prebuilt --no-prebuilt)--no-prebuilt[no prebuilt]' \
|
||||
'--target-perl=[install modules as if version is your perl is VERSION]:version' \
|
||||
'--mirror[base URL for the CPAN mirror to use]:url' \
|
||||
'(--pp --pureperl-only)'{--pp,--pureperl-only}'[prefer pureperl only build]' \
|
||||
'(--static-install --no-static-install)--static-install[enable the static install]' \
|
||||
'(--static-install --no-static-install)--no-static-install[disable the static install]' \
|
||||
\*{-r,--resolver=}'[specify resolvers]:resolver' \
|
||||
'--no-defult-resolvers[Use default resolvers if you specify --resolver option]' \
|
||||
'--reinstall[reinstall the distribution even if you already have the latest version installed]' \
|
||||
'--dev[resolve TRIAL distributions too]' \
|
||||
'(--color --no-color)--color[turn on color output]' \
|
||||
'(--color --no-color)--no-color[turn off color output]' \
|
||||
'(--test --no-test)--test[run test cases]' \
|
||||
'(--test --no-test)--no-test[do not run test cases]' \
|
||||
'--man-pages[generate man pages]' \
|
||||
'(--retry --no-retry)--retry[retry configure/build/test/install if fails]' \
|
||||
'(--retry --no-retry)--no-retry[do not retry]' \
|
||||
'--show-build-log-on-failure[show build.log on failure]' \
|
||||
'--configure-timeout=[specify configure timeout second]:sec' \
|
||||
'--build-timeout=[specify build timeout second]:sec' \
|
||||
'--test-timeout=[specify test timeout second]:sec' \
|
||||
'(--show-progress --no-show-progress)--show-progress[show progress]' \
|
||||
'(--show-progress --no-show-progress)--no-show-progress[do not show progress]' \
|
||||
'--cpmfile=[specify cpmfile path]: :_files' \
|
||||
'--cpanfile=[specify cpanfile path]: :_files' \
|
||||
'--metafile=[specify META file path]: :_files' \
|
||||
'--snapshot=[specify cpanfile.snapshot path]: :_files' \
|
||||
'(- *)'{-V,--version}'[show version]' \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'*--feature=[specify the feature to enable in cpanfile]:feature' \
|
||||
'*:modules' \
|
||||
&& ret=0
|
||||
;;
|
||||
(*)
|
||||
ret=0
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_cpm_subcommands] )) ||
|
||||
_cpm_subcommands() {
|
||||
local -a commands=(
|
||||
"install:Install modules"
|
||||
"help:Show help"
|
||||
"version:Show version"
|
||||
)
|
||||
|
||||
_describe -t subcommands "subcommands" commands
|
||||
}
|
||||
|
||||
_cpm "$@"
|
||||
|
||||
# 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
|
||||
179
src/_ctest
179
src/_ctest
|
|
@ -1,179 +0,0 @@
|
|||
#compdef ctest
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ctest 4.3.0 (https://kitware.com/cmake)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_ctest() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'--preset=[Read arguments from a test preset]:preset' \
|
||||
'--list-presets[List available test presets]' \
|
||||
'(-C --build-config)'{-C,--build-config}'[Choose configuration to test]:config' \
|
||||
'--progress[Enable short progress output from tests]' \
|
||||
'(-V --verbose -VV --extra-verbose)'{-V,--verbose}'[Enable verbose output from tests]' \
|
||||
'(-V --verbose -VV --extra-verbose)'{-VV,--extra-verbose}'[Enable more verbose output from tests]' \
|
||||
'--debug[Displaying more verbose internals of CTest]' \
|
||||
'--output-on-failure[Output anything outputted by the test program if the test should fail]' \
|
||||
'--stop-on-failure[Stop running the tests after one has failed]' \
|
||||
'--test-output-size-passed[Limit the output for passed tests to <size> bytes]:size' \
|
||||
'--test-output-size-failed[Limit the output for failed tests to <size> bytes]:size' \
|
||||
'--test-output-truncation[Truncate mode]:mode:(tail middle head)' \
|
||||
'-F[Enable failover]' \
|
||||
'(-j --parallel)'{-j,--parallel}'[Run tests in parallel]::level' \
|
||||
'(-Q --quiet)'{-Q,--quiet}'[Make ctest quiet]' \
|
||||
'(-O --output-log)'{-O,--output-log}'[Output to log file]:file:_files' \
|
||||
'--output-junit[Output test results to JUnit XML file]:file:_files' \
|
||||
'(-N --show-only)'{-N,--show-only}'[Disable actual execution of tests]::format:(format human json-v1)' \
|
||||
\*{-L,--label-regex}'[Run tests with labels matching regular expression]:regex' \
|
||||
\*{-R,--tests-regex}'[Run tests matching regular expression]:regex' \
|
||||
\*{-E,--exclude-regex}'[Exclude tests matching regular expression]:regex' \
|
||||
\*{-LE,--label-exclude}'[Exclude tests with labels matching regular expression]:regex' \
|
||||
\*{-FA,--fixture-exclude-any}'[Do not automatically add any tests for fixtures matching regular expression]:regex' \
|
||||
\*{-FS,--fixture-exclude-setup}'[Do not automatically add setup tests for fixtures matching regular expression]:regex' \
|
||||
\*{-FC,--fixture-exclude-cleanup}'[Do not automatically add cleanup tests for fixtures matching regular expression]:regex' \
|
||||
'(--dashboard)'{-D,--dashboard}'[Execute dashboard test]:dashboard' \
|
||||
'*-D[Define a variable for script mode]:var' \
|
||||
'(-M --test-model)'{-M,--test-model}'[Set the model for a dashboard]:model' \
|
||||
'(-T --test-action)'{-T,--test-action}'[Set the dashboard action to perform]' \
|
||||
'--group[Specify what build group on the dashboard]:group' \
|
||||
\*{-S,--script,-Sp,--script-new-process}'[Execute a dashboard for a configuration]:script:_files' \
|
||||
'(-A --add-notes)'{-A,--add-notes}'[Add a notes file with submission]:file:_files' \
|
||||
'(-I --test-information)'{-I,--test-information}'[Run a specific number of tests by number]:number' \
|
||||
'(-U --union)'{-U,--union}'[Take the Union of -I and -R]' \
|
||||
'--rerun-failed[Run only the tests that failed previously]' \
|
||||
'--tests-from-file[Run the tests listed in the given file]:file:_files' \
|
||||
'--exclude-from-file[Run tests except those listed in the given file]:file:_files' \
|
||||
'--repeat-until-fail[Repeat each test to run <n> times without failing]:n' \
|
||||
'--repeat[Repeat each test to run <n> times]:condition-n:(until-fail: until-pass: after-timeout:)' \
|
||||
'--max-width[Set the max width for a test name to output]' \
|
||||
'--interactive-debug-mode[Set the interactive mode to 0 or 1]:n:(0 1)' \
|
||||
'--resource-spec-file[Set the resource spec file to use]:file:_files' \
|
||||
'--no-label-summary[Disable timing summary information for labels]' \
|
||||
'--no-subproject-summary[Disable timing summary information for subprojects]' \
|
||||
'--test-dir[Specify the directory in which to look for tests]:dir:_files -/' \
|
||||
'--build-and-test[Configure, build and run a test]' \
|
||||
'*--build-target[Specify a specific target to build]:target' \
|
||||
'--build-nocmake[Run the build without running cmake first]' \
|
||||
'--build-run-dir[Specify directory to run programs from]:dir:_files -/' \
|
||||
'--build-two-config[Run CMake twice]' \
|
||||
'--build-exe-dir[Specify the directory for the executable]:dir:_files -/' \
|
||||
'--build-generator[Specify the generator to use]:generator' \
|
||||
'--build-generator-platform[Specify the generator-specific platform]:generator_platform' \
|
||||
'--build-generator-toolset[Specify the generator-specific toolset]:build_toolset' \
|
||||
'--build-project[Specify the name of the project to build]:project' \
|
||||
'--build-makeprogram[Specify the make program to use]:make:_files' \
|
||||
'--build-noclean[Skip the make clean step]' \
|
||||
'--build-config-sample[A sample executable to use to determine the configuration]:sample' \
|
||||
'*--build-options[Add extra options to the build step]' \
|
||||
'--test-command[The test to run with the --build-and-test-option]:command' \
|
||||
'--test-timeout[The time limit in seconds]:timeout' \
|
||||
'--test-load[CPU load threshold for starting new parallel tests]:threshold' \
|
||||
'--tomorrow-tag[starts with next day tag]' \
|
||||
'--overwrite[Overwrite CTest configuration option]' \
|
||||
'--extra-submit[Submit extra files to the dashboard]:file:_files' \
|
||||
'*--http-header[Append HTTP header when submitting]:header' \
|
||||
'--schedule-random[Use a random order for scheduling tests]' \
|
||||
'--schedule-random-seed[Override seed for random order of tests]:seed' \
|
||||
'--submit-index[Submit individual dashboard tests with specific index]:index' \
|
||||
'--timeout[Set the default test timeout]:timeout' \
|
||||
'--stop-time[Set a time at which all tests should stop running]:time' \
|
||||
'--http1.0[Submit using HTTP 1.0]' \
|
||||
'--no-compress-output[Do not compress test output when submitting]' \
|
||||
'--print-labels[Print all available test labels]' \
|
||||
'--no-tests=[Regard no tests]:type:(error ignore)' \
|
||||
'(- *)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]' \
|
||||
'(- *)'{--version,-version}'[Print version number and exit]' \
|
||||
'(- *)--help-full[Print all help manuals and exit]' \
|
||||
'(- *)--help-manual[Print one help manual and exit]:manual:_ctest_help_manuals' \
|
||||
'(- *)--help-manual-list[List help manuals available and exit]' \
|
||||
'(- *)--help-command[Print help for one command and exit]:command:_ctest_help_commands' \
|
||||
'(- *)--help-command-list[List commands with help available and exit]' \
|
||||
'(- *)--help-commands[Print cmake-commands manual and exit]' \
|
||||
'(- *)--help-module[Print help for one module and exit]:module:_ctest_help_modules' \
|
||||
'(- *)--help-module-list[List modules with help available and exit]' \
|
||||
'(- *)--help-modules[Print cmake-modules manual and exit]' \
|
||||
'(- *)--help-policy[Print help for one policy and exit]:policy:_ctest_help_policies' \
|
||||
'(- *)--help-policy-list[List policies with help available and exit]' \
|
||||
'(- *)--help-policies[Print cmake-policies manual and exit]' \
|
||||
'(- *)--help-property[Print help for one property and exit]:property:_ctest_help_properties' \
|
||||
'(- *)--help-property-list[List properties with help available and exit]' \
|
||||
'(- *)--help-properties[Print cmake-properties manual and exit]' \
|
||||
'(- *)--help-variable[Print help for one variable and exit]:variable:_ctest_help_variables' \
|
||||
'(- *)--help-variable-list[List variables with help available and exit]' \
|
||||
'(- *)--help-variables[Print cmake-variables manual and exit]' \
|
||||
&& ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_ctest_help_manuals() {
|
||||
local -a manuals=(${(f)"$(ctest --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
|
||||
_values 'manual' $manuals
|
||||
}
|
||||
|
||||
_ctest_help_commands() {
|
||||
local -a commands=(${(f)"$(ctest --help-command-list 2>/dev/null )"})
|
||||
_values 'command' $commands
|
||||
}
|
||||
|
||||
_ctest_help_modules() {
|
||||
local -a modules=(${(f)"$(ctest --help-module-list 2>/dev/null )"})
|
||||
_values 'module' $modules
|
||||
}
|
||||
|
||||
_ctest_help_policies() {
|
||||
local -a policies=(${(f)"$(ctest --help-policy-list 2>/dev/null )"})
|
||||
_values 'policy' $policies
|
||||
}
|
||||
|
||||
_ctest_help_properties() {
|
||||
local -a properties=(${(f)"$(ctest --help-property-list 2>/dev/null )"})
|
||||
_values 'property' $properties
|
||||
}
|
||||
|
||||
_ctest_help_variables() {
|
||||
local -a variables=(${(f)"$(ctest --help-variable-list 2>/dev/null )"})
|
||||
_values 'variable' $variables
|
||||
}
|
||||
|
||||
_ctest "$@"
|
||||
|
||||
# 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
|
||||
95
src/_fab
95
src/_fab
|
|
@ -28,7 +28,9 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Fabric v3.2.2 (https://www.fabfile.org/)
|
||||
# Completion script for Fabric (https://www.fabfile.org/)
|
||||
#
|
||||
# Source: https://github.com/vhbit/fabric-zsh-autocomplete
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -38,42 +40,65 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_fab_tasks() {
|
||||
local -a tasks=(${(f)"$(fab --list 2>/dev/null| awk '/^ /{first=$1;$1="";print first ":" substr($0, 2) }')"})
|
||||
if (( $#tasks > 0)); then
|
||||
_describe -t 'task' tasks tasks
|
||||
fi
|
||||
|
||||
local curcontext=$curcontext state line
|
||||
declare -A opt_args
|
||||
|
||||
declare target_list
|
||||
target_list=(`fab --shortlist 2>/dev/null`)
|
||||
|
||||
_targets() {
|
||||
_describe -t commands "fabric targets" target_list
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'--complete[Print tab-completion candidates for given parse remainder]' \
|
||||
"--hide=[Set default value of run()'s 'hide' kwarg]:str" \
|
||||
'(- *)--list-agent-keys[Display ssh-agent key list, and exit]' \
|
||||
'--no-dedupe[Disable task deduplication]' \
|
||||
'--print-completion-script=[Print the tab-completion script for your preferred shell]:shell:(bash zsh fish)' \
|
||||
'--prompt-for-login-password[Request an upfront SSH-auth password prompt]' \
|
||||
'--prompt-for-passphrase[Request an upfront SSH key passphrase prompt]' \
|
||||
'--prompt-for-sudo-password[Prompt user at start of session for the sudo.password config value]' \
|
||||
'--write-pyc[Enable creation of .pyc files]' \
|
||||
'(-c --collection)'{-c,--collection=}'[Specify collection name to load]:name' \
|
||||
'(-d --debug)'{-d,--debug}'[Enable debug output]' \
|
||||
'(-D --list-depth)'{-D,--list-depth=}'[When listing tasks, only show the first INT levels]:level' \
|
||||
'(-e --echo)'{-e,--echo}'[Echo executed commands before running]' \
|
||||
'(-f --config)'{-f,--config=}'[Runtime configuration file to use]:file:_files' \
|
||||
'(-F --list-format)'{-F,--list-format=}'[Change the display format used when listing tasks]:format:(flat nested json)' \
|
||||
'(- *)'{-h,--help=-}'[Show core or per-task help and exit]::task:_fab_tasks' \
|
||||
'(-H --hosts)'{-H,--hosts=}'[Comma-separated host name(s) to execute tasks against]:host' \
|
||||
\*{-i,--identity=}'[Path to runtime SSH identity (key) file]:file:_files' \
|
||||
'(-l --list)'{-l,--list=-}'[List available tasks, optionally limited to a namespace]::namespace' \
|
||||
'(-p --pty)'{-p,--pty}'[Use a pty when executing shell commands]' \
|
||||
'(-r --search-root)'{-r,--search-root=}'[Change root directory used for finding task modules]:dir:_files -/' \
|
||||
'(-R --dry)'{-R,--dry}'[Echo commands instead of running]' \
|
||||
'(-S --ssh-config)'{-S,--ssh-config=}'[Path to runtime SSH config file]:file:_files' \
|
||||
'(-t --connect-timeout)'{-t,--connect-timeout=}'[Specifies default connection timeout, in seconds]:seconds' \
|
||||
'(-T --command-timeout)'{-T,--command-timeout=}'[Specify a global command execution timeout, in seconds]:seconds' \
|
||||
'(- *)'{-V,--version}'[Show version and exit]' \
|
||||
'(-w --warn-only)'{-w,--warn-only}'[Warn, instead of failing, when shell commands fail]' \
|
||||
'*::task:_fab_tasks'
|
||||
output_levels=(
|
||||
'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'
|
||||
'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!'
|
||||
'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'
|
||||
'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.'
|
||||
'stdout: Local, or remote, stdout, i.e. non-error output from commands.'
|
||||
'stderr: Local, or remote, stderr, i.e. error-related output from commands.'
|
||||
'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.'
|
||||
)
|
||||
|
||||
_arguments -w -S -C \
|
||||
'(-)'{-h,--help}'[show this help message and exit]: :->noargs' \
|
||||
'(-)'{-V,--version}'[show program'\''s version number and exit]: :->noargs' \
|
||||
'(-)--list[print list of possible commands and exit]: :->noargs' \
|
||||
'(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \
|
||||
'(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \
|
||||
'(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \
|
||||
"(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \
|
||||
'(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \
|
||||
'(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \
|
||||
'(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \
|
||||
'(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \
|
||||
'(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \
|
||||
'(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \
|
||||
'(-a --no-agent)'{-a,--no-agent}'[don'\''t use the running SSH agent]' \
|
||||
'(-k --no-keys)'{-k,--no-keys}'[don'\''t load private key files from ~/.ssh/]' \
|
||||
'(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \
|
||||
'-i+[path to SSH private key file. May be repeated]: :_files' \
|
||||
"(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \
|
||||
'(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \
|
||||
'(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \
|
||||
'(--ssh-config-path=)--ssh-config-path=[ssh config path]: :_files' \
|
||||
'(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \
|
||||
'(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \
|
||||
'*::: :->subcmds' && return 0
|
||||
|
||||
if [[ CURRENT -ge 1 ]]; then
|
||||
case $state in
|
||||
noargs)
|
||||
_message "nothing to complete";;
|
||||
levels)
|
||||
_describe -t commands "output levels" output_levels;;
|
||||
*)
|
||||
_targets;;
|
||||
esac
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
76
src/_golang
76
src/_golang
|
|
@ -44,7 +44,7 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
__golang_buildmodes() {
|
||||
__go_buildmodes() {
|
||||
local -a buildmodes=(
|
||||
'archive[non-main packages into .a files]'
|
||||
'c-archive[main package, plus all packages it imports, into a C archive file]'
|
||||
|
|
@ -59,7 +59,7 @@ __golang_buildmodes() {
|
|||
_values 'mode' $buildmodes
|
||||
}
|
||||
|
||||
__golang_runtimedebug() {
|
||||
__go_runtimedebug() {
|
||||
local -a vars=(
|
||||
'allocfreetrace[profile allocations]:boolean:(1 0)'
|
||||
'clobberfree[clobber memory after free]:boolean:(1 0)'
|
||||
|
|
@ -84,7 +84,7 @@ __golang_runtimedebug() {
|
|||
_values -s ',' -S '=' "runtime debug behavior" $vars[@]
|
||||
}
|
||||
|
||||
__golang_gcdebugflags() {
|
||||
__go_gcdebugflags() {
|
||||
_values -s , -S = 'debug flag' \
|
||||
'append[print information about append compilation]' \
|
||||
'checkptr[instrument unsafe pointer conversions]:pointer conversion checks:((0\:"instrumentation disabled" 1\:"conversions involving unsafe.Pointer are instrumented" 2\:"conversions to unsafe.Pointer force heap allocation"))' \
|
||||
|
|
@ -109,7 +109,7 @@ __golang_gcdebugflags() {
|
|||
'ssa/help[print help about SSA debugging]'
|
||||
}
|
||||
|
||||
__golang_gcflags() {
|
||||
__go_gcflags() {
|
||||
_arguments \
|
||||
'-%[debug non-static initializers]' \
|
||||
'-c=[concurrency during compilation]:int' \
|
||||
|
|
@ -131,7 +131,7 @@ __golang_gcflags() {
|
|||
'-buildid=[record id as the build id in the export metadata]:id' \
|
||||
'-complete[compiling complete package (no C or assembly)]' \
|
||||
'-cpuprofile=[write cpu profile to file]:file' \
|
||||
'-d=[print debug information about items in list; try -d help]:list: __golang_gcdebugflags' \
|
||||
'-d=[print debug information about items in list; try -d help]:list: __go_gcdebugflags' \
|
||||
'-dwarf[generate DWARF symbols (default true)]' \
|
||||
'-dwarfbasentries[use base address selection entries in DWARF (default true)]' \
|
||||
'-dwarflocationlists[add location lists to DWARF in optimized mode (default true)]' \
|
||||
|
|
@ -173,7 +173,7 @@ __golang_gcflags() {
|
|||
'-wb[enable write barrier (default true)]'
|
||||
}
|
||||
|
||||
__golang_pgo() {
|
||||
__go_pgo() {
|
||||
_alternative \
|
||||
"name:name:(auto off)" \
|
||||
"file:file:_files"
|
||||
|
|
@ -203,9 +203,9 @@ local -a commands=(
|
|||
'help:get more information about a command'
|
||||
)
|
||||
|
||||
__golang_envvarvals() {
|
||||
# if __golang_envvarvals is called for -value-, I use the function argument to
|
||||
# decide which variable to go to. if $1 is not set, then __golang_envvarvals is
|
||||
__go_envvarvals() {
|
||||
# if __go_envvarvals is called for -value-, I use the function argument to
|
||||
# decide which variable to go to. if $1 is not set, then __go_envvarvals is
|
||||
# called from the `go env` completion and the current word (with all after
|
||||
# the first '=' removed) is the current variable.
|
||||
local env_variable=${1-${words[$CURRENT]%%=*}}
|
||||
|
|
@ -276,7 +276,7 @@ __golang_envvarvals() {
|
|||
_dispatch $service -value-,${variable#CGO_},-default-
|
||||
;;
|
||||
(GODEBUG)
|
||||
__golang_runtimedebug
|
||||
__go_runtimedebug
|
||||
;;
|
||||
(GOFLAGS)
|
||||
# not implemented, sorry
|
||||
|
|
@ -294,7 +294,7 @@ __golang_envvarvals() {
|
|||
esac
|
||||
}
|
||||
|
||||
__golang_packages() {
|
||||
__go_packages() {
|
||||
local -a gopaths=("${(s/:/)$(go env GOPATH)}")
|
||||
gopaths+=("$(go env GOROOT)")
|
||||
for p in $gopaths; do
|
||||
|
|
@ -312,7 +312,7 @@ __golang_packages() {
|
|||
fi
|
||||
}
|
||||
|
||||
__golang_fix_analyzers() {
|
||||
__go_fix_analyzers() {
|
||||
local -a fix_analyzers=(
|
||||
"any[replace interface{} with any]"
|
||||
"buildtag[check //go:build and // +build directives]"
|
||||
|
|
@ -341,7 +341,7 @@ __golang_fix_analyzers() {
|
|||
_values 'analyzer' $fix_analyzers
|
||||
}
|
||||
|
||||
__golang_pprof_symbolize_types() {
|
||||
__go_pprof_symbolize_types() {
|
||||
local -a symbolize_types=(
|
||||
"none[Do not attempt symbolization]"
|
||||
"local[Examine only local binaries]"
|
||||
|
|
@ -360,7 +360,7 @@ if [[ "$service" = -value-* ]]; then
|
|||
if (($blacklist[(I)$env_variable])); then
|
||||
return
|
||||
fi
|
||||
__golang_envvarvals $env_variable
|
||||
__go_envvarvals $env_variable
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
@ -382,16 +382,16 @@ case $state in
|
|||
'-work[print temporary work directory and keep it]'
|
||||
'-x[print the commands]'
|
||||
'-asmflags[arguments for each go tool asm invocation]:flags'
|
||||
'-buildmode[build mode to use]:mode:__golang_buildmodes'
|
||||
'-buildmode[build mode to use]:mode:__go_buildmodes'
|
||||
'-buildvcs[stamp binaries with version control information]:mode:(internal external auto)'
|
||||
'-compiler[name of compiler to use]:name'
|
||||
'-gccgoflags[arguments for gccgo]:args'
|
||||
'*-gcflags=[arguments for each go tool compile invocation]:args:__golang_gcflags'
|
||||
'*-gcflags=[arguments for each go tool compile invocation]:args:__go_gcflags'
|
||||
'-installsuffix[suffix to add to package directory]:suffix'
|
||||
'-ldflags[arguments to pass on each go tool link invocation.]:flags'
|
||||
'-linkshared[link against shared libraries]'
|
||||
'-overlay[read a JSON config file that provides an overlay for build operations]:file:_files -g "*.json"'
|
||||
'-pgo[specify the file path of a profile for profile-guided optimization]:file_or_profile:__golang_pgo'
|
||||
'-pgo[specify the file path of a profile for profile-guided optimization]:file_or_profile:__go_pgo'
|
||||
'-pkgdir[install and load all packages from dir]:dir'
|
||||
'-tags[list of build tags to consider satisfied]:tags'
|
||||
'-trimpath[remove all file system paths from the resulting executable]'
|
||||
|
|
@ -425,7 +425,7 @@ case $state in
|
|||
'help:get more information about a command'
|
||||
)
|
||||
local -a fix_flags=(
|
||||
'-fixtool=[specify fix analyzer]:analyzer:__golang_fix_analyzers'
|
||||
'-fixtool=[specify fix analyzer]:analyzer:__go_fix_analyzers'
|
||||
'-diff[display diffs instead of rewriting files]'
|
||||
'-fixtool=[select analysis tool]:analyzer:'
|
||||
'(- *)-V[print version and exit]'
|
||||
|
|
@ -464,7 +464,7 @@ case $state in
|
|||
'-json[emit build output in JSON suitable for automated processing]' \
|
||||
${build_flags[@]} \
|
||||
${mod_flags[@]} \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(clean)
|
||||
|
|
@ -477,7 +477,7 @@ case $state in
|
|||
'-fuzzcache[remove files stored in the Go build cache for fuzz testing]' \
|
||||
${build_flags[@]} \
|
||||
${mod_flags[@]} \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(doc)
|
||||
|
|
@ -489,7 +489,7 @@ case $state in
|
|||
'-short[one-line representation for each symbol]' \
|
||||
'-src[show the full source code for the symbol]' \
|
||||
'-u[show docs for unexported and exported symbols and methods]' \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(env)
|
||||
|
|
@ -569,12 +569,12 @@ case $state in
|
|||
)
|
||||
local -a exclude_from_w=(GOENV)
|
||||
|
||||
__golang_list_env_vars() {
|
||||
__go_list_env_vars() {
|
||||
# the parameter expansion strops off everything after the first [
|
||||
_values -s ' ' -w 'environment variable' ${goenvvars[@]%%\[*}
|
||||
}
|
||||
|
||||
# the ^ parameter expansion appends ": __golang_envvarvals" to every element of goenvvars
|
||||
# the ^ parameter expansion appends ": __go_envvarvals" to every element of goenvvars
|
||||
# the :# parameter expansion removes all elements matching GOENV*
|
||||
[[ $words[2] != '-w' ]] && _arguments \
|
||||
'-C[change to directory before running the command]: :_files -/' \
|
||||
|
|
@ -582,15 +582,15 @@ case $state in
|
|||
'-changed[prints only those settings whose effective value differs from the default value]' \
|
||||
'-u[unset environment variables]' \
|
||||
'-w[change the default setting of environment variables]' \
|
||||
'*:[show environment variable]: __golang_list_env_vars' || _values \
|
||||
-s ' ' -S "=" -w 'environment variable' ${^goenvvars:#GOENV*}": __golang_envvarvals"
|
||||
'*:[show environment variable]: __go_list_env_vars' || _values \
|
||||
-s ' ' -S "=" -w 'environment variable' ${^goenvvars:#GOENV*}": __go_envvarvals"
|
||||
;;
|
||||
|
||||
(fix)
|
||||
_arguments \
|
||||
'-C[change to directory before running the command]: :_files -/' \
|
||||
$fix_flags[@] \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(fmt)
|
||||
|
|
@ -599,7 +599,7 @@ case $state in
|
|||
'-n[print commands that would be executed]' \
|
||||
'-x[print commands as they are executed]' \
|
||||
'-mod=[set which download mode to use]:mode:(readonly vendor)' \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(generate)
|
||||
|
|
@ -610,7 +610,7 @@ case $state in
|
|||
'-n[print the commands but do not run them]' \
|
||||
'-v[print the names of packages as they are compiled]' \
|
||||
${build_flags[@]} \
|
||||
"*:args:{ _alternative ':importpaths:__golang_packages' _files }"
|
||||
"*:args:{ _alternative ':importpaths:__go_packages' _files }"
|
||||
;;
|
||||
|
||||
(get)
|
||||
|
|
@ -620,13 +620,13 @@ case $state in
|
|||
'-u[use the network to update the named packages]' \
|
||||
'-tool[instructs go to add a matching tool line to go.mod for each listed package]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(install)
|
||||
_arguments \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(list)
|
||||
|
|
@ -642,7 +642,7 @@ case $state in
|
|||
'-m[list modules instead of packages]'
|
||||
${build_flags[@]}
|
||||
${mod_flags[@]}
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
)
|
||||
# -u and -versions are only available if -m is present on the commandline
|
||||
if (($words[(I)-m])); then
|
||||
|
|
@ -684,7 +684,7 @@ case $state in
|
|||
(init)
|
||||
# Use go packages as module name suggestion
|
||||
_arguments \
|
||||
'*:module:__golang_packages'
|
||||
'*:module:__go_packages'
|
||||
;;
|
||||
(tidy)
|
||||
_arguments \
|
||||
|
|
@ -705,7 +705,7 @@ case $state in
|
|||
_arguments \
|
||||
'-m[treats the arguments as a list of modules]' \
|
||||
'-vendor[exclude tests of dependencies]' \
|
||||
'*:module:__golang_packages'
|
||||
'*:module:__go_packages'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
@ -716,7 +716,7 @@ case $state in
|
|||
_arguments \
|
||||
${build_flags[@]} \
|
||||
'-exec[invoke the binary using xprog]:xporg' \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(telemetry)
|
||||
|
|
@ -803,7 +803,7 @@ case $state in
|
|||
${build_flags[@]} \
|
||||
'-exec[run test binary using xprog]:xprog' \
|
||||
'-o[compile test binary to named file]:file:_files' \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
@ -963,7 +963,7 @@ case $state in
|
|||
|
||||
(fix)
|
||||
if [[ $words[2] == "help" ]]; then
|
||||
__golang_fix_analyzers
|
||||
__go_fix_analyzers
|
||||
else
|
||||
_arguments \
|
||||
"*:args:{ _alternative ':subcommand:(help)' _files }"
|
||||
|
|
@ -1119,7 +1119,7 @@ case $state in
|
|||
'-add_comment=[free-form annotation to add to the profile]:comment' \
|
||||
'-diff_base=[source of base profile for comparison]:source:_files' \
|
||||
'-base[show delta from this profile]:profile' \
|
||||
'-symbolize=[controls source of symbol information]:source:__golang_pprof_symbolize_types' \
|
||||
'-symbolize=[controls source of symbol information]:source:__go_pprof_symbolize_types' \
|
||||
'-tls_cert=[TLS client certificate file for fetchign profile and symbols]:file:_files' \
|
||||
'-tls_key=[TLS private key file for fetching profile and symbols]:file:_files' \
|
||||
'-tls_ca=[TLS CA certs file for fetching profile and symbols]:file:_files' \
|
||||
|
|
@ -1215,7 +1215,7 @@ case $state in
|
|||
'-x[prints commands as they are executed]' \
|
||||
'-vettool[set a different analysis tool with alternative or additional checks]:prog:_files' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__golang_packages'
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
(work)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ _inxi() {
|
|||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
local -a colors=({0..42})
|
||||
local colors=($(seq 0 42))
|
||||
|
||||
_arguments -C -s \
|
||||
'(-A --audio)'{-A,--audio}"[Show Audio/sound card(s) information]" \
|
||||
|
|
|
|||
79
src/_mvn
79
src/_mvn
|
|
@ -266,19 +266,14 @@ _mvn_groupIds() {
|
|||
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_groupIds_caching_policy
|
||||
|
||||
if [[ -d $repository_location ]]; then
|
||||
local -a groupIds
|
||||
local cache_key="mvn/repositories/${repository_location}/groupIds"
|
||||
if ( _cache_invalid $cache_key ) && ! _retrieve_cache $cache_key; then
|
||||
groupIds=($repository_location/**/)
|
||||
groupIds=(${${${(u)_groupIds:h:h}#"$repository_location/"}//\//.})
|
||||
if (( $#groupIds > 0 )); then
|
||||
_store_cache $cache_key groupIds
|
||||
fi
|
||||
unset _groupIds
|
||||
if ( [[ ${+_groupIds} -eq 0 ]] || _cache_invalid "mvn/repositories/${repository_location}/groupIds" ) && ! _retrieve_cache "mvn/repositories/${repository_location}/groupIds"; then
|
||||
_groupIds=($repository_location/**/)
|
||||
_groupIds=(${${${(u)_groupIds:h:h}#"$repository_location/"}//\//.})
|
||||
[[ $#_groupIds -gt 0 ]] && _store_cache "mvn/repositories/${repository_location}/groupIds" _groupIds
|
||||
fi
|
||||
|
||||
if (( $#groupIds > 0 )); then
|
||||
_multi_parts $@ . groupIds && ret=0
|
||||
fi
|
||||
[[ $#_groupIds -gt 0 ]] && _multi_parts $@ . _groupIds && ret=0
|
||||
fi
|
||||
|
||||
return ret
|
||||
|
|
@ -315,19 +310,14 @@ _mvn_plugin_goals() {
|
|||
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
|
||||
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_goals_caching_policy
|
||||
|
||||
local -a goals
|
||||
local cache_key="mvn/plugins/${plugin}"
|
||||
if _cache_invalid $cache_key && ! _retrieve_cache $cache_key; then
|
||||
unset _goals
|
||||
if ( [[ ${+_goals} -eq 0 ]] || _cache_invalid "mvn/plugins/${plugin}" ) && ! _retrieve_cache "mvn/plugins/${plugin}"; then
|
||||
setopt localoptions extendedglob
|
||||
_goals=(${(s:,,,:)${${${(f)${${${(f)${${${${(F)${(S)${(f)"$(_call_program goals $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=$plugin)"}//#$(__mvn_get_plugin_prefix $plugin):/,,,}}:#*BUILD FAILURE*}#*This plugin has*goals#:}%For more information, run \'mvn help:describe*}}//:/\\:}}}// ##/ }// Description\\: /:}})
|
||||
if (( $#goals > 0 )); then
|
||||
_store_cache "mvn/plugins/${plugin}" goals
|
||||
fi
|
||||
[[ $#_goals -gt 0 ]] && _store_cache "mvn/plugins/${plugin}" _goals
|
||||
fi
|
||||
|
||||
if (( $#goals > 0 )); then
|
||||
_describe -t "goals" "${plugin} goal" goals $@[0,-2] && ret=0
|
||||
fi
|
||||
[[ $#_goals -gt 0 ]] && _describe -t "goals" "${plugin} goal" _goals $@[0,-2] && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
|
@ -348,52 +338,44 @@ _mvn_profiles() {
|
|||
|
||||
# Resolve profiles from settings.xml
|
||||
if [[ -f $settings_file ]]; then
|
||||
local -a profiles
|
||||
unset _profiles
|
||||
cache_name="mvn/profiles${settings_file:A}" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10
|
||||
if _cache_invalid "$cache_name" && ! _retrieve_cache "$cache_name"; then
|
||||
profiles=()
|
||||
if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid "$cache_name" ) && ! _retrieve_cache "$cache_name"; then
|
||||
_profiles=()
|
||||
profiles_section="${(M)${(f)$(<$settings_file)}:#*<profiles>*}"
|
||||
if [[ -n "$profiles_section" ]]; then
|
||||
for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\/repositories>}//<pluginRepositories>*<\/pluginRepositories>}//<build>*<\/build>}//<\/id>*<id>/,,,}##*<id>}%%</id>*}}; do
|
||||
[[ -z ${(M)profiles:#"$profile"*} ]] && profiles+=("$profile"'['"in settings file"']')
|
||||
[[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in settings file"']')
|
||||
done
|
||||
fi
|
||||
|
||||
if (( $#profiles > 0 )); then
|
||||
_store_cache "$cache_name" profiles
|
||||
fi
|
||||
[[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles
|
||||
fi
|
||||
profs+=($profiles)
|
||||
profs+=($_profiles)
|
||||
fi
|
||||
|
||||
# Resolve project profiles
|
||||
if [[ -f $parent_pom_file ]]; then
|
||||
local -a profiles
|
||||
unset _profiles
|
||||
cache_name="mvn/profiles${parent_pom_file:A}" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10
|
||||
if _cache_invalid "$cache_name" && ! _retrieve_cache "$cache_name"; then
|
||||
profiles=()
|
||||
if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid "$cache_name" ) && ! _retrieve_cache "$cache_name"; then
|
||||
_profiles=()
|
||||
setopt localoptions extendedglob
|
||||
for file in ${parent_pom_file:h}/**/pom.xml~*target\/*; do # FIXME project.build.directory is not always target/
|
||||
profiles_section="${(M)${(f)$(<$file)}:#*<profiles>*}"
|
||||
if [[ -n "$profiles_section" ]]; then
|
||||
for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\/repositories>}//<pluginRepositories>*<\/pluginRepositories>}//<build>*<\/build>}//<\/id>*<id>/,,,}##*<id>}%%</id>*}}; do
|
||||
[[ -z ${(M)profiles:#"$profile"*} ]] && profiles+=("$profile"'['"in ${file#${parent_pom_file:h}\/}"']')
|
||||
[[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in ${file#${parent_pom_file:h}\/}"']')
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
if (( $#profiles > 0)); then
|
||||
_store_cache "$cache_name" profiles
|
||||
fi
|
||||
[[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles
|
||||
fi
|
||||
profs+=($profiles)
|
||||
profs+=($_profiles)
|
||||
fi
|
||||
|
||||
compset -P '-'; compset -P '+'; compset -P '!' # FIXME Only works for the first profile
|
||||
|
||||
if (( $profs > 0 )); then
|
||||
_values $@ 'profile' "${profs[@]}" && ret=0
|
||||
fi
|
||||
[[ $#profs -gt 0 ]] && _values $@ 'profile' "${profs[@]}" && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
|
@ -455,21 +437,16 @@ _mvn_plugin_goal_property_names() {
|
|||
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
|
||||
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_properties_caching_policy
|
||||
|
||||
local -a properties
|
||||
local cache_key="mvn/plugins/${plugin_colon_goal}"
|
||||
if _cache_invalid $cache_key && ! _retrieve_cache $cache_key; then
|
||||
unset _properties
|
||||
if ( [[ ${+_properties} -eq 0 ]] || _cache_invalid "mvn/plugins/${plugin_colon_goal}" ) && ! _retrieve_cache "mvn/plugins/${plugin_colon_goal}"; then
|
||||
# FIXME Does not work for:
|
||||
# android:apk (new line before expression)
|
||||
# ear:ear (unknown cause)
|
||||
properties=(${(M)${(ps:,,,:)${${${${(pj: :)${${${(f)${"$(_call_program properties $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=${plugin_colon_goal%:*} -Dgoal=${plugin_colon_goal##*:} -Ddetail)"#*Available parameters:}%%\[INFO\]*}//# [a-z]*/,,,}##*Expression: \$\{}}//\}[[:space:]]##/:}//[[:space:]]##/ }//[[:space:]]#,,,[[:space:]]#/,,,}}:#[a-zA-Z]##:*})
|
||||
if (( $#properties > 0 )); then
|
||||
_store_cache $cache_key properties
|
||||
fi
|
||||
_properties=(${(M)${(ps:,,,:)${${${${(pj: :)${${${(f)${"$(_call_program properties $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=${plugin_colon_goal%:*} -Dgoal=${plugin_colon_goal##*:} -Ddetail)"#*Available parameters:}%%\[INFO\]*}//# [a-z]*/,,,}##*Expression: \$\{}}//\}[[:space:]]##/:}//[[:space:]]##/ }//[[:space:]]#,,,[[:space:]]#/,,,}}:#[a-zA-Z]##:*})
|
||||
[[ $#_properties -gt 0 ]] && _store_cache "mvn/plugins/${plugin_colon_goal}" _properties
|
||||
fi
|
||||
|
||||
if (( $#properties > 0 )); then
|
||||
_describe -t "${plugin_colon_goal//:/-}-property-names" "${plugin_colon_goal} property name" properties $@[0,-2] && ret=0
|
||||
fi
|
||||
[[ $#_properties -gt 0 ]] && _describe -t "${plugin_colon_goal//:/-}-property-names" "${plugin_colon_goal} property name" _properties $@[0,-2] && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue