Compare commits
8 Commits
7dd5752396
...
d59350592b
| Author | SHA1 | Date |
|---|---|---|
|
|
d59350592b | |
|
|
96cdf49da3 | |
|
|
737bce8e4b | |
|
|
c939857cbe | |
|
|
cb55f8a4d3 | |
|
|
51e5c047c2 | |
|
|
b45ffc1c8a | |
|
|
c32a6d756b |
91
src/_l3build
91
src/_l3build
|
|
@ -3,7 +3,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for l3build (https://github.com/latex3/l3build/).
|
||||
# Completion script for l3build 2025-09-03 (https://github.com/latex3/l3build/).
|
||||
# Modified from rejected https://github.com/latex3/l3build/pull/267
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
@ -14,49 +14,60 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
__l3build() {
|
||||
_l3build_targets() {
|
||||
local targets=(
|
||||
'check:Run\ all\ automated\ tests'
|
||||
'clean:Clean\ out\ directory\ tree'
|
||||
'ctan:Create\ CTAN-ready\ archive'
|
||||
'doc:Typesets\ all\ documentation\ files'
|
||||
'install:Installs\ files\ into\ the\ local\ texmf\ tree'
|
||||
'manifest:Creates\ a\ manifest\ file'
|
||||
'save:Saves\ test\ validation\ log'
|
||||
'tag:Updates\ release\ tags\ in\ files'
|
||||
'uninstall:Uninstalls\ files\ from\ the\ local\ texmf\ tree'
|
||||
'unpack:Unpacks\ the\ source\ files\ into\ the\ build\ tree'
|
||||
'upload:Send\ archive\ to\ CTAN\ for\ public\ release'
|
||||
'check:Run all automated tests'
|
||||
'clean:Clean out directory tree'
|
||||
'ctan:Create CTAN-ready archive'
|
||||
'doc:Typesets all documentation files'
|
||||
'install:Installs files into the local texmf tree'
|
||||
'manifest:Creates a manifest file'
|
||||
'save:Saves test validation log'
|
||||
'tag:Updates release tags in files'
|
||||
'uninstall:Uninstalls files from the local texmf tree'
|
||||
'unpack:Unpacks the source files into the build tree'
|
||||
'upload:Send archive to CTAN for public release'
|
||||
)
|
||||
local options=(
|
||||
{--config,-c}'[Sets the config(s) used for running tests]':lua_file:'_files -g "*.lua"'
|
||||
--date'[Sets the date to insert into sources]':
|
||||
--debug'[Runs target in debug mode]'
|
||||
--dirty'[Skip cleaning up the test area]'
|
||||
--dry-run'[Dry run for install or upload]'
|
||||
--email'[Email address of CTAN uploader]':
|
||||
{--engine,-e}'[Sets the engine(s) to use for running test]':engine:'(pdftex xetex luatex ptex uptex)'
|
||||
--epoch'[Sets the epoch for tests and typesetting]':
|
||||
{--file,-F}'[Take the upload announcement from the given file]':file:_files
|
||||
--first'[Name of first test to run]':
|
||||
{--force,-f}'[Force tests to run if engine is not set up]'
|
||||
--full'[Install all files]'
|
||||
{--halt-on-error,-H}'[Stops running tests after the first failure]'
|
||||
'(- : *)'{--help,-h}'[Print this message and exit]'
|
||||
--last'[Name of last test to run]':
|
||||
{--message,-m}'[Text for upload announcement message]':
|
||||
{--quiet,-q}'[Suppresses TeX output when unpacking]'
|
||||
--rerun'[Skip setup\: simply rerun tests]'
|
||||
--show-log-on-error'[Show the full log of the failure with '\''halt-on-error'\'']'
|
||||
{--show-saves,-S}'[Show the invocation to update failing .tlg files]'
|
||||
--shuffle'[Shuffle order of tests]'
|
||||
--texmfhome'[Location of user texmf tree]':
|
||||
'(- : *)'--version'[Print version information and exit]'
|
||||
)
|
||||
_arguments -s -S $options "1:target:(($targets))"
|
||||
|
||||
_describe -t targets 'target' targets "$@"
|
||||
}
|
||||
|
||||
__l3build
|
||||
_l3build() {
|
||||
local ret=1
|
||||
local -a engines=(pdftex xetex luatex ptex uptex)
|
||||
|
||||
_arguments -s -S \
|
||||
'(-c --config)'\*{-c,--config}'[Set the config(s) used for running tests]:lua_file:_files -g "*.(lua|tlg)"' \
|
||||
'(-d --date)'{-d,--date}'[Set the date to insert into sources]:date' \
|
||||
'--debug[Run target in debug mode]' \
|
||||
'--dev[Use the development LaTex format]' \
|
||||
'--dirty[Skip cleaning up the test area]' \
|
||||
'--dry-run[Dry run for install or upload]' \
|
||||
'--email[Email address of CTAN uploader]:email' \
|
||||
'(-e --engine)'{--engine,-e}'[Set the engine(s) to use for running test]:engine:(($engines))' \
|
||||
'--epoch[Sets the epoch for tests and typesetting]:epoch' \
|
||||
'(-F --file)'{--file,-F}'[Take the upload announcement from the given file]:file:_files' \
|
||||
'--first[Name of first test to run]:name' \
|
||||
'--full[Install all files]' \
|
||||
'(-H --halt-on-error)'{-H,--halt-on-error}'[Stops running tests after the first failure]' \
|
||||
'(- : *)'{-h,--help}'[Print this message and exit]' \
|
||||
'--last[Name of last test to run]:name' \
|
||||
'(-m --message)'{-m,--message}'[Text for upload announcement message]:message' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Suppresses TeX output when unpacking]' \
|
||||
'--rerun[Skip setup\: simply rerun tests]' \
|
||||
'--show-log-on-error[Show the full log of the failure with "halt-on-error"]' \
|
||||
'(-S --show-saves)'{-S,--show-saves}'[Show the invocation to update failing .tlg files]' \
|
||||
'--shuffle[Shuffle order of tests]' \
|
||||
'(-s --stdengine)'{-s,--stdengine}'[Run tests only with the standard engine]' \
|
||||
'--texmfhome[Location of user texmf tree]:location:_files' \
|
||||
'(- : *)--version[Print version information and exit]' \
|
||||
"1:target:_l3build_targets" \
|
||||
&& ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_l3build "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
10
src/_node
10
src/_node
|
|
@ -69,6 +69,9 @@ _node_scripts() {
|
|||
_describe 'scripts' scripts
|
||||
}
|
||||
|
||||
_node() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'-[script read from stdin (default; interactive mode if a tty)]' \
|
||||
'--[indicate the end of node options]' \
|
||||
|
|
@ -244,7 +247,12 @@ _arguments \
|
|||
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
|
||||
'(- 1 *)'{-h,--help}'[print node command line options]' \
|
||||
'(- 1 *)'{-v,--version}'[print Node.js version]' \
|
||||
'*: :_node_args'
|
||||
'*: :_node_args' && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_node "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
43
src/_phing
43
src/_phing
|
|
@ -23,7 +23,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Phing (https://www.phing.info/).
|
||||
# Completion script for Phing 3.1.0 (https://www.phing.info/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -39,36 +39,53 @@ _phing() {
|
|||
typeset -A opt_args
|
||||
|
||||
# Follow https://www.phing.info/guide/chunkhtml/sec.commandlineargs.html for more information
|
||||
_arguments \
|
||||
_arguments -C \
|
||||
'(-h -help)'{-h,-help}'[display the help screen]' \
|
||||
'(-v -version)'{-v,-version}'[print version information and exit]' \
|
||||
'(-l -list)'{-l,-list}'[list all available targets in buildfile (excluding targets that have their hidden attribute set to true)]' \
|
||||
'(-l -list)'{-l,-list}'[list all available targets in buildfile]' \
|
||||
'(-i -init)'{-i,-init}'[generates an initial buildfile]:file:_files' \
|
||||
'(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \
|
||||
'(-S -silent)'{-S,-silent}'[print nothing but task outputs and build failures]' \
|
||||
'-verbose[verbose, give some more output]' \
|
||||
'-debug[output debug information]' \
|
||||
'(-e -emacs)'{-e,-emacs}'[produce logging information without adornments]' \
|
||||
'-diagnostics[print diagnostics information]' \
|
||||
'(-strict -no-strict)-strict[run build in strict mode]' \
|
||||
'(-strict -no-strict)-no-strict[run build normally]' \
|
||||
'-longtargets[show target descriptions during build]' \
|
||||
'-logfile[use given file for log]:file:_files' \
|
||||
'-D[set the property to the specified value to be used in the buildfile]' \
|
||||
'-find []:file:_files' \
|
||||
'-buildfile [specify an alternate buildfile name. Default is build.xml]:file:_files' \
|
||||
'-logger [specify an alternate logger. Default is phing.listener.DefaultLogger. Other options include phing.listener.NoBannerLogger, phing.listener.AnsiColorLogger, phing.listener.XmlLogger, phing.listener.TargetLogger and phing.listener.HtmlColorLogger]' \
|
||||
'-propertyfile [load properties from the specified file]:file:_files' \
|
||||
'(-v --version)'{-v,--version}'[show version]' \
|
||||
'-logger[the class which is to perform logging]:class' \
|
||||
'*-listener[add an instance of class as a project listener]:class' \
|
||||
'(-f -buildfile)'{-f,-buildfile}'[build file]:file:_files' \
|
||||
'*-D[set the property to the specified value to be used in the buildfile]' \
|
||||
'(-k -keep-going)'{-k,-keep-going}'[execute all targets that do not depend on failed target(s)]' \
|
||||
'-propertyfile[load all properties from the specified file]:file:_files' \
|
||||
'-propertyfileoverride[values in property file override existing values]' \
|
||||
'-find[search for buildfile towards the root of the filesystem and use it]:file:_files' \
|
||||
'-inputhandler[the class to use to handle user input]:class' \
|
||||
'(- *)'{-v,-version}'[show version]' \
|
||||
'1: :->targets' \
|
||||
'*:: :->args' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
targets)
|
||||
local buildfile; buildfile=build.xml
|
||||
(targets)
|
||||
local buildfile=build.xml
|
||||
if (( $+opt_args[-buildfile] )); then
|
||||
buildfile=${opt_args[-buildfile]}
|
||||
elif (($+opt_args[-f] )); then
|
||||
buildfile=${opt_args[-f]}
|
||||
fi
|
||||
|
||||
if [[ ! -f $buildfile ]]
|
||||
then
|
||||
ret=0
|
||||
else
|
||||
local targets; targets=($(sed -nE "/<target /s/.*name=[\"'](\w+)[\"'].*/\1/p" $buildfile))
|
||||
local -a targets=($(sed -nE "/<target /s/.*name=[\"'](\w+)[\"'].*/\1/p" $buildfile))
|
||||
_describe -t 'targets' 'target' targets && ret=0
|
||||
fi
|
||||
;;
|
||||
args)
|
||||
(args)
|
||||
if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]
|
||||
then
|
||||
# If the current argument is the first non-option argument
|
||||
|
|
|
|||
134
src/_stack
134
src/_stack
|
|
@ -1,134 +0,0 @@
|
|||
#compdef stack
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2015 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 stack (https://github.com/commercialhaskell/stack).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# * Toshiki Teramura <toshiki.teramura@gmail.com>
|
||||
# * Nikita Ursol <nikita20001116@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_stack () {
|
||||
_arguments \
|
||||
--help'[show usage information]' \
|
||||
--version'[show version]' \
|
||||
--numeric-version'[show only version number]' \
|
||||
--hpack-numeric-version"[show only hpack's version number]" \
|
||||
'--docker[enable using a Docker container, run "stack --docker-help" for details]' \
|
||||
'--no-docker[disable using a Docker container, run "stack --docker-help" for details]' \
|
||||
'--nix[enable use of a Nix-shell, run "stack --nix-help" for details]' \
|
||||
'--no-nix[disable use of a Nix-shell, run "stack --nix-help" for details]' \
|
||||
--verbosity'[verbosity: silent, error, warn, info, debug]' \
|
||||
{-v,--verbose}'[enable verbose mode: verbosity level "debug"]' \
|
||||
--silent'[enable silent mode: verbosity level "silent"]' \
|
||||
--time-in-log'[enable inclusion of timings in logs, to use diff with logs]' \
|
||||
--no-time-in-log'[disable inclusion of timings in logs, to use diff with logs]' \
|
||||
--stack-root'[absolute path to the global stack root directory]' \
|
||||
--work-dir'[relative path of work directory]' \
|
||||
--system-ghc'[enable using the system installed GHC if available and a matching version]' \
|
||||
--no-system-ghc'[disable using the system installed GHC if available and a matching version]' \
|
||||
--install-ghc'[enable downloading and installing GHC if necessary]' \
|
||||
--no-install-ghc'[disable downloading and installing GHC if necessary]' \
|
||||
--arch'[system architecture, e.g. i386, x86_64]' \
|
||||
--ghc-variant'[specialized GHC variant, e.g. integersimple (incompatible with --system-ghc)]' \
|
||||
--ghc-build'[specialized GHC build, e.g. "gmp4" or "standard" (usually auto-detected)]' \
|
||||
{-j,--jobs}'[number of concurrent jobs to run]' \
|
||||
--extra-include-dirs'[extra directories to check for C header files]' \
|
||||
--extra-lib-dirs'[extra directories to check for libraries]' \
|
||||
--with-gcc'[use custom path to gcc executable]' \
|
||||
--with-hpack'[use custom path to hpack executable]' \
|
||||
--skip-ghc-check'[enable skipping the GHC version and architecture check]' \
|
||||
--no-skip-ghc-check'[disable skipping the GHC version and architecture check]' \
|
||||
--skip-msys'[enable skipping the local MSYS installation (Windows only)]' \
|
||||
--no-skip-msys'[disable skipping the local MSYS installation (Windows only)]' \
|
||||
--local-bin-path'[install binaries to specified location]' \
|
||||
--setup-info-yaml'[alternate URL or relative / absolute path for stack dependencies]' \
|
||||
--modify-code-page'[enable setting the codepage to support UTF-8 (Windows only)]' \
|
||||
--no-modify-code-page'[disable setting the codepage to support UTF-8 (Windows only)]' \
|
||||
--allow-different-user'[enable permission for non-owners to use a stack installation (POSIX only)]' \
|
||||
--no-allow-different-user'[disable permission for non-owners to use a stack installation (POSIX only)]' \
|
||||
--dump-logs'[enable dump the build output logs for local packages to the console]' \
|
||||
--no-dump-logs'[disable dump the build output logs for local packages to the console]' \
|
||||
{--color,--colour}'[specify when to use color in output; accepts "always", "never", "auto"]' \
|
||||
--resolver'[override resolver in project file]' \
|
||||
--terminal'[enable overriding terminal detection in the case of running in a false terminal]' \
|
||||
--no-terminal'[disable overriding terminal detection in the case of running in a false terminal]' \
|
||||
{--stack-colors,--stack-colours}"[specify stack's output styles]" \
|
||||
--terminal-width'[specify the width of the terminal, used for pretty-print messages]' \
|
||||
--stack-yaml'[override project stack.yaml file]' \
|
||||
--lock-file'[specify how to interact with lock files.]' \
|
||||
'*: :__stack_modes'
|
||||
}
|
||||
|
||||
__stack_modes () {
|
||||
_values \
|
||||
'subcommand' \
|
||||
'build[build the project(s) in this directory/configuration]' \
|
||||
'install[build executables and install to a user path]' \
|
||||
'test[build and test the project(s) in this directory/configuration]' \
|
||||
'bench[build and benchmark the project(s) in this directory/configuration]' \
|
||||
'haddock[generate haddocks for the project(s) in this directory/configuration]' \
|
||||
'new[create a brand new project]' \
|
||||
'templates[show how to find templates available for "stack new".]' \
|
||||
'init[create stack project config from cabal or hpack package specifications]' \
|
||||
'setup[get the appropriate ghc for your project]' \
|
||||
'path[print out handy path information]' \
|
||||
"ls[list command. (supports snapshots, dependencies and stack's styles)]" \
|
||||
'unpack[unpack one or more packages locally]' \
|
||||
'update[update the package index]' \
|
||||
'upgrade[upgrade to the latest stack]' \
|
||||
'upload[upload a package to Hackage]' \
|
||||
'sdist[create source distribution tarballs]' \
|
||||
'dot[visualize your projects dependency graph using Graphviz dot]' \
|
||||
'ghc[run ghc]' \
|
||||
'hoogle[run hoogle, the Haskell API search engine.]' \
|
||||
'exec[execute a command]' \
|
||||
'run[build and run an executable.]' \
|
||||
'ghci[run ghci in the context of package(s) (experimental)]' \
|
||||
"repl[run ghci in the context of package(s) (experimental) (alias for 'ghci')]" \
|
||||
'runghc[run runghc]' \
|
||||
"runhaskell[run runghc (alias for 'runghc')]" \
|
||||
'script[run a Stack Script]' \
|
||||
'eval[evaluate some haskell code inline.]' \
|
||||
'clean[delete build artefacts for the project packages.]' \
|
||||
'purge[delete the project stack working directories.]' \
|
||||
'query[query general build information (experimental)]' \
|
||||
'ide[ide-specific commands]' \
|
||||
'docker[subcommands specific to Docker use]' \
|
||||
'config[subcommands for accessing and modifying configuration values]' \
|
||||
'hpc[subcommands specific to Haskell Program Coverage]'
|
||||
|
||||
}
|
||||
|
||||
_stack "$@"
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#compdef tsx
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 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 tsx v4.21.0. (https://github.com/privatenumber/tsx)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_tsx_completion() {
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help]' \
|
||||
'(- *)'{-v,--version}'[show version]' \
|
||||
'--no-cache[disable caching]' \
|
||||
'--tsconfig[custom tsconfig.json path]:path:_files -g "*.json"' \
|
||||
'1: :(watch)'
|
||||
}
|
||||
|
||||
_tsx() {
|
||||
_alternative 'tsx: :_tsx_completion' 'node: :_node'
|
||||
}
|
||||
|
||||
_tsx "$@"
|
||||
|
||||
# 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
|
||||
Loading…
Reference in New Issue