Repository: zsh-users/zsh-completions Branch: master Commit: e461417f4e20 Files: 188 Total size: 1.6 MB Directory structure: gitextract_jrerujxc/ ├── .editorconfig ├── .github/ │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── src/ │ ├── _afew │ ├── _age │ ├── _archlinux-java │ ├── _atach │ ├── _augmatch │ ├── _augparse │ ├── _augprint │ ├── _avdmanager │ ├── _bento4 │ ├── _bitcoin-cli │ ├── _blkid │ ├── _bower │ ├── _bundle │ ├── _cap │ ├── _cask │ ├── _ccache │ ├── _certbot │ ├── _cf │ ├── _chatblade │ ├── _chcpu │ ├── _chmem │ ├── _choc │ ├── _chpasswd │ ├── _chromium │ ├── _clang-check │ ├── _clang-format │ ├── _clang-tidy │ ├── _cmake │ ├── _coffee │ ├── _conan │ ├── _concourse │ ├── _cppcheck │ ├── _dad │ ├── _dart │ ├── _dget │ ├── _dhcpcd │ ├── _diana │ ├── _direnv │ ├── _diskutil │ ├── _distro_info │ ├── _do-release-upgrade │ ├── _docpad │ ├── _ecdsautil │ ├── _emacs │ ├── _emulator │ ├── _envdir │ ├── _exportfs │ ├── _fab │ ├── _fail2ban-client │ ├── _fail2ban-regex │ ├── _fallocate │ ├── _ffind │ ├── _flutter │ ├── _fwupdmgr │ ├── _gas │ ├── _ghc │ ├── _gio │ ├── _gist │ ├── _git-flow │ ├── _git-pulls │ ├── _git-revise │ ├── _git-wtf │ ├── _glances │ ├── _golang │ ├── _gpgconf │ ├── _grpcurl │ ├── _gtk-launch │ ├── _hello │ ├── _hledger │ ├── _httpie │ ├── _ibus │ ├── _include-what-you-use │ ├── _inxi │ ├── _ipcmk │ ├── _ipcrm │ ├── _ipcs │ ├── _jest │ ├── _jmeter │ ├── _jmeter-plugins │ ├── _jonas │ ├── _jrnl │ ├── _kak │ ├── _kitchen │ ├── _l3build │ ├── _language_codes │ ├── _ldattach │ ├── _lilypond │ ├── _lscpu │ ├── _lsipc │ ├── _lslocks │ ├── _lslogins │ ├── _lsmem │ ├── _lunchy │ ├── _mc │ ├── _mcookie │ ├── _middleman │ ├── _mina │ ├── _mix │ ├── _mkcert │ ├── _mssh │ ├── _mussh │ ├── _mvn │ ├── _nano │ ├── _nanoc │ ├── _neo │ ├── _neofetch │ ├── _networkQuality │ ├── _nftables │ ├── _node │ ├── _nvm │ ├── _openssl │ ├── _openvpn3 │ ├── _optirun │ ├── _patool │ ├── _periscope │ ├── _phing │ ├── _pixz │ ├── _pkcon │ ├── _pm2 │ ├── _port │ ├── _pre-commit │ ├── _protoc │ ├── _pygmentize │ ├── _qmk │ ├── _rails │ ├── _ralio │ ├── _rdfind │ ├── _redis-cli │ ├── _rev │ ├── _rfkill │ ├── _rmlint │ ├── _rslsync │ ├── _rspec │ ├── _rubocop │ ├── _sbt │ ├── _scala │ ├── _screencapture │ ├── _scrub │ ├── _sdd │ ├── _sdkmanager │ ├── _setcap │ ├── _setup.py │ ├── _shallow-backup │ ├── _shellcheck │ ├── _showoff │ ├── _sox_ng │ ├── _srm │ ├── _sslscan │ ├── _subliminal │ ├── _supervisord │ ├── _svm │ ├── _swaplabel │ ├── _swapoff │ ├── _swapon │ ├── _teamocil │ ├── _textutil │ ├── _thor │ ├── _tmuxinator │ ├── _tmuxp │ ├── _tox │ ├── _ts-node │ ├── _tsc │ ├── _tsx │ ├── _udisksctl │ ├── _ufw │ ├── _uuidd │ ├── _uuidgen │ ├── _uuidparse │ ├── _vipw │ ├── _virtualbox │ ├── _vnstat │ ├── _wdctl │ ├── _wemux │ ├── _wg-quick │ ├── _xdg-mime │ ├── _xsel │ ├── _yamllint │ ├── _yarn │ ├── _zcash-cli │ └── _zramctl ├── zsh-completions-howto.org └── zsh-completions.plugin.zsh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ ; This file is for unifying the coding style for different editors and IDEs. ; More information at https://editorconfig.org/ root = true [_*] indent_style = space indent_size = 2 tab_width = 2 end_of_line = LF ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ - [ ] This compdef is not already available in zsh. - [ ] This compdef is not already available in their original project. - [ ] I am the original author, or I have authorization to submit this work. - [ ] This is a finished work. - [ ] It has a header containing authors, status and origin of the script. - [ ] It has a license header or I accept that it will be licensed under the terms of the Zsh license. ================================================ FILE: .gitignore ================================================ # zsh word code files *.zwc # IDE files .vscode/ .idea/ ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing ## How to Contribute to zsh-completions Contributions are welcome, just make sure you follow the guidelines: * Completions are not accepted when already available in zsh. * Completions are not accepted when already available in their original project. * Please do not just copy/paste someone else's completion, ask before. * Partially implemented completions are not accepted. * Please add a header containing authors, status and origin of the script and license header if you do not wish to use the Zsh license (example [here](src/_tox)). * Any reasonable open source license is acceptable but note that we recommend the use of the Zsh license and that you should use it if you hope for the function to migrate to zsh itself. * Please try to follow the [Zsh completion style guide](https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide). * Please send one separate pull request per file. * Send a pull request or ask for committer access. ## Contributing Completion Functions to Zsh The zsh project itself welcomes completion function contributions via [github pull requests](https://github.com/zsh-users/zsh/), [gitlab merge requests](https://gitlab.com/zsh-org/zsh/) or via patch files sent to its mailing list, `zsh-workers@zsh.org`. Contributing to zsh has the advantage of reaching the most users. ## Including Completion Functions in Upstream Projects Many upstream projects include zsh completions. If well maintained, this has the advantage that users get a completion function that matches the installed version of their software. If you are the upstream maintainer this is a good choice. If the project already includes completions for bash, fish, tcsh, etc then they are likely open to including zsh's too. It can also be a good option for completions handling commands that are system or distribution specific. Ideally, arrange for the project's build system to install the completion function in `$prefix/share/zsh/site-functions`. ================================================ FILE: LICENSE ================================================ The Z Shell is copyright (c) 1992-2017 Paul Falstad, Richard Coleman, Zoltán Hidvégi, Andrew Main, Peter Stephenson, Sven Wischnowsky, and others. All rights reserved. Individual authors, whether or not specifically named, retain copyright in all changes; in what follows, they are referred to as `the Zsh Development Group'. This is for convenience only and this body has no legal status. The Z shell is distributed under the following licence; any provisions made in individual files take precedence. Permission is hereby granted, without written agreement and without licence or royalty fees, to use, copy, modify, and distribute this software and to distribute modified versions of this software for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. In no event shall the Zsh Development Group be liable to any party for direct, indirect, special, incidental, or consequential damages arising out of the use of this software and its documentation, even if the Zsh Development Group have been advised of the possibility of such damage. The Zsh Development Group specifically disclaim any warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an "as is" basis, and the Zsh Development Group have no obligation to provide maintenance, support, updates, enhancements, or modifications. ================================================ FILE: README.md ================================================ zsh-completions ![GitHub release](https://img.shields.io/github/release/zsh-users/zsh-completions.svg) ![GitHub contributors](https://img.shields.io/github/contributors/zsh-users/zsh-completions.svg) [![IRC](https://img.shields.io/badge/IRC-%23zsh--completions-yellow.svg)](irc://irc.freenode.net/#zsh-completions) [![Gitter](https://badges.gitter.im/zsh-users/zsh-completions.svg)](https://gitter.im/zsh-users/zsh-completions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ============= **Additional completion definitions for [Zsh](https://www.zsh.org/).** *This project aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.* --- ## Usage ### Using packages | System | Package | | ------------- | ------------- | | Debian / Ubuntu | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) | | Fedora / CentOS / RHEL / Scientific Linux | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) | | OpenSUSE / SLE | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) | | Arch Linux / Manjaro / Antergos / Hyperbola | [zsh-completions](https://www.archlinux.org/packages/zsh-completions), [zsh-completions-git](https://aur.archlinux.org/packages/zsh-completions-git) | | Gentoo / Funtoo | [app-shells/zsh-completions](https://packages.gentoo.org/packages/app-shells/zsh-completions) | | NixOS | [zsh-completions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/shells/zsh/zsh-completions/default.nix) | | Void Linux | [zsh-completions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-completions/template) | | Slackware | [Slackbuilds](https://slackbuilds.org/repository/14.2/system/zsh-completions/) | | macOS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-completions.rb), [MacPorts](https://github.com/macports/macports-ports/blob/master/sysutils/zsh-completions/Portfile) | | NetBSD | [pkgsrc](https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-completions/README.html) | | FreeBSD | [shells/zsh-completions](https://www.freshports.org/shells/zsh-completions) | --- ### Using zsh frameworks #### [antigen](https://github.com/zsh-users/antigen) Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`. #### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh) To avoid issues with redundant `.zcompdump` cache generation (see [#603](https://github.com/zsh-users/zsh-completions/issues/603)), do **not** load `zsh-completions` as a standard plugin. Instead, follow this optimized approach: 1. Clone the repository into your custom plugins directory: ```bash git clone https://github.com/zsh-users/zsh-completions.git \ ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions ``` 2. Update your `~/.zshrc` configuration **before** sourcing oh-my-zsh: ```bash fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src autoload -U compinit && compinit source "$ZSH/oh-my-zsh.sh" ``` This prevents `compinit` from being called twice and significantly improves shell startup time. #### [zinit](https://github.com/zdharma-continuum/zinit) Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`. --- ### Manual installation * Clone the repository: ```bash git clone https://github.com/zsh-users/zsh-completions.git ``` * Include the directory in your `$fpath`, for example by adding in `~/.zshrc`: ```bash fpath=(path/to/zsh-completions/src $fpath) ``` * You may have to force rebuild `zcompdump`: ```bash rm -f ~/.zcompdump; compinit ``` --- ### Contributing Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md). --- ## License Completions use the Zsh license, unless explicitly mentioned in the file header. See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information. ================================================ FILE: src/_afew ================================================ #compdef afew # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 afew(version 3.0.1) an initial tagging script for notmuch mail. # (https://github.com/teythoon/afew) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ _arguments \ '(- 1 *)'{-h,--help}'[display usage information]' \ '(- 1 *)'{-V,--version}"[show program's version number and exit]" \ "(-t --tag -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \ "(-m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \ "(-w --watch -m --move-mails)"{-m,--move-mails}"[move mail files between maildir folders]" \ "(-a --all)"{-a,--all}"[operate on all email]" \ "(-n --new)"{-n,--new}"[operate on all new email]" \ {-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \ {-e,--enable-filters=}"[specify filter classes to use]:filter" \ {-d,--dry-run}"[don't change the DB]" \ {-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \ {-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \ {-N,--notmuch-args=}"[arguments for notmuch new(in move mode)]:notmuch arg" \ {-v,--verbose}"[be more verbose]" \ '*: :_guard "^-*" query' # 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 ================================================ FILE: src/_age ================================================ #compdef age age-keygen # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for age 1.2.1 (https://github.com/FiloSottile/age). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hydrargyrum (https://github.com/hydrargyrum) # # ------------------------------------------------------------------------------ case $service in (age) _arguments \ -A '-*' \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt the input to the output. Default if omitted]' \ '(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt the input to the output]' \ '(-o --output)'{-o,--output=}'[Write the result to the given file]:OUTPUT:_files' \ '(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to a PEM encoded format]' \ '(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \ '(-d --decrypt)'\*{-r,--recipient=}'[Encrypt to the explicitly specified RECIPIENT]:RECIPIENT:' \ '(-d --decrypt)'\*{-R,--recipients-file=}'[Encrypt to the RECIPIENTS listed in the file at PATH]:RECIPIENTS_FILE:_files' \ \*{-i,--identity=}'[Use the given identify file]:IDENTITY:_files' \ :INPUT:_files ;; (age-keygen) _arguments \ '(-o --output)'{-o,--output}'[write the result to the given file]:file:_files' \ '-y[convert an identity file to a recipients file]' \ '*:input' ;; esac # 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 ================================================ FILE: src/_archlinux-java ================================================ #compdef archlinux-java # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 archlinux-java a tool for selecting default Java runtime (https://wiki.archlinux.org/index.php/java). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ _archlinux-java_command_arguments() { case $words[1] in (set) local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}") _describe -t output 'Java environments' java_versions ;; esac } _archlinux-java() { local -a commands commands=( "status:List installed Java environments and enabled one" "get:Return the short name of the Java environment set as default" "set:Force as default" "unset:Unset current default Java environment" "fix:Fix an invalid/broken default Java environment configuration" "help:Show help" ) _arguments -C \ '1:cmd:->cmds' \ '*:: :->args' \ case "$state" in (cmds) _describe -t commands 'commands' commands ;; (*) _archlinux-java_command_arguments ;; esac } _archlinux-java # 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 ================================================ FILE: src/_atach ================================================ #compdef atach # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 atach (https://github.com/sorin-ionescu/atach). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Sorin Ionescu # # ------------------------------------------------------------------------------ local state mode_values existing_sessions ret=1 mode_values=( "none:disable redrawing" "ctrl_l:use ctrl + l to redraw" "winch:use sigwinch to redraw" ) existing_sessions=($(_call_program session atach)) _arguments -C -s -S \ '(--list -l)'{--list,-l}'[list sessions]' \ '(--sockets -L)'{--sockets,-L}'[list sockets]' \ '(--session -s)'{--session=,-s+}'[set the session name]:session' \ '(--char -c)'{--char=,-c+}'[set the detach character (default: ^\\)]:char' \ '(--redraw -r)'{--redraw=,-r+}'[set the redraw method (none, ctrl_l, or winch)]:mode:->mode' \ '(--detached -d)'{--detached,-d}'[start the session detached]' \ '(--no-detach -D)'{--no-detach,-D}'[disable detaching]' \ '(--no-suspend -Z)'{--no-suspend,-Z}'[disable suspending]' \ '(--version -v)'{--version,-v}'[display version and copyright]' \ '(--help -h)'{--help,-h}'[display help]' \ '(-)::args:->session-or-command' && ret=0 case "$state" in (mode) _describe -t mode 'redraw mode' mode_values && ret=0 ;; (session-or-command) _describe -t 'session' 'sessions' existing_sessions && ret=0 _path_commands && ret=0 ;; esac return $ret # 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 ================================================ FILE: src/_augmatch ================================================ #compdef augmatch # ------------------------------------------------------------------------------ # Copyright (c) 2025 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 augmatch 1.14.1 (https://augeas.net/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _augmatch_lens() { local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//')) _values lenses $lenses } _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(-a --all)'{-a,--all}'[print all tree nodes, even ones without an associated value]' \ '(-e --extract)'{-e,--extract}'[only print the parts of the tree that are matched with --match]' \ \*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \ '(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augmatch_lens' \ '(-L --print-lens)'{-L,--print-lens}'[print the name of lens]' \ '(-m --match)'{-m,--match=}'[only print the parts of the tree that match]:expr' \ '(-r --root)'{-r,--root=}'[use directory as the root of the filesystem]:dir:_files -/' \ '(-S --nostdinc)'{-S,--nostdinc}'[do not search any of the default directories for lenses]' \ '(-o --only-value)'{-o,--only-value}'[print only the value and not label or the path of nodes]' \ '(-q --quiet)'{-q,--quiet}'[do not print anything]' \ '*:: :_files' # 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 ================================================ FILE: src/_augparse ================================================ #compdef augparse # ------------------------------------------------------------------------------ # Copyright (c) 2025 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 augparse 1.14.1 (https://augeas.net/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(- *)--version[print version information and exit]' \ \*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \ '(-t --trace)'{-t,--trace}'[print a trace of modules that are being loaded]' \ '--nostdinc[do not search any of the default directories for modules]' \ '--notypecheck[do not perform lens type checks]' \ '*:: :_files' # 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 ================================================ FILE: src/_augprint ================================================ #compdef augprint # ------------------------------------------------------------------------------ # Copyright (c) 2025 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 augprint 1.14.1 (https://augeas.net/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _augprint_lens() { local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//')) _values lenses $lenses } _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(-v --verbose)'{-v,--verbose}'[include the original numbered paths as comments in the output]' \ '(-r --regexp)'{-r-,--regexp=-}'[generate regular expressions to match values]:num' \ '(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augprint_lens' \ '(-t --target)'{-t,--target=}'[generate the script as if its path was really targetfile]:file:_files' \ '(-s --noseq)'{-s,--noseq}'[do not use "seq::*" in the output]' \ '*:: :_files' # 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 ================================================ FILE: src/_avdmanager ================================================ #compdef avdmanager # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 avdmanager(https://developer.android.com/studio/command-line/avdmanager) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _avdmanager() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C -A "-*" \ '(- *)'{-h,--help}'[Print help message]' \ '(-s --silent)'{-s,--silent}'[Silent mode, shows error only]' \ '(-v --verbose)'{-v,--verbose}'[Verbose mode, shows errors, warnings and all messages]' \ '--clear-cache[Clear the SDK Manager repository manifest cache]' \ '1: :_avdmanager_subcommands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) if (( $+functions[_avdmanager_${words[1]}] )); then _avdmanager_${words[1]} && ret=0 else ret=0 fi ;; esac return ret } (( $+functions[_avdmanager_list] )) || _avdmanager_list() { local ret=1 _arguments -C \ '1: :(avd target device)' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (avd|target|device) _arguments \ '(-0 --null)'{-0,--null}'[Terminate lines with \0 instead of \n]' \ '(-c --compact)'{-c,--compact}'[Compact output]' \ && ret=0 ;; esac ;; esac return $ret } (( $+functions[_avdmanager_create] )) || _avdmanager_create() { local ret=1 _arguments -C \ '1: :(avd)' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (avd) _arguments \ '(-c --sdcard)'{-c,--sdcard}'[Path to a shared SD card image]: :_files' \ '(-g --tag)'{-g,--tag}'[The sys-img tag to use for the AVD]:tag' \ '(-p --path)'{-p,--path}'[Directory where the new AVD will be created]' \ '(-k --package)'{-k,--package}'[Package path of the system image for this AVD]:package' \ '(-n --name)'{-n,--name}'[Name of the new AVD]:name' \ '--skin[The optional name of a skin to use with this device]' \ '(-f --force)'{-f,--force}'[Forces creation]' \ '(-b --abi)'{-b,--abi}'[The ABI to use for the AVD]:abi' \ '(-d --device)'{-d,--device}'[The optional device definition to use]' \ && ret=0 ;; esac ;; esac return $ret } (( $+functions[_avdmanager_move] )) || _avdmanager_move() { local ret=1 _arguments -C \ '1: :(avd)' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (avd) _arguments \ '(-p --path)'{-p,--path}"[Path to the AVD's new directory]: :_files -/" \ '(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \ '(-r --rename)'{-r,--rename}'[New name of the AVD]' \ && ret=0 ;; esac ;; esac return $ret } (( $+functions[_avdmanager_delete] )) || _avdmanager_delete() { local ret=1 _arguments -C \ '1: :(avd)' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (avd) _arguments \ '(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \ && ret=0 ;; esac ;; esac return $ret } (( $+functions[_avdmanager_subcommands] )) || _avdmanager_subcommands() { local -a commands=( "list:Lists existing targets or virtual devices" "create:Creates a new Android Virtual Device" "move:Moves or renames an Android Virtual Device" "delete:Deletes an Android Virtual Device" ) _describe -t commands 'subcommand' commands } (( $+functions[_avdmanager_avds] )) || _avdmanager_avds() { local -a avds=(${(@f)"$(avdmanager list avd -c)"}) _values 'android virtual devices' $avds } _avdmanager "$@" # 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 ================================================ FILE: src/_bento4 ================================================ #compdef aac2mp4 mp42aac mp42avc mp42hevc mp42hls mp42ts mp4compact mp4dash mp4dashclone mp4dcfpackager mp4decrypt mp4dump mp4edit mp4encrypt mp4extract mp4fragment mp4hls mp4iframeindex mp4info mp4mux mp4rtphintinfo mp4split mp4tag # ------------------------------------------------------------------------------ # 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 bento4 tools 1.6.0-641 (https://github.com/axiomatic-systems/Bento4) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ local -a encrypt_methods=( OMA-PDCF-CBC OMA-PDCF-CTR MARLIN-IPMP-ACBC MARLIN-IPMP-ACGK ISMA-IAEC PIFF-CBC PIFF-CTR MPEG-CENC MPEG-CBC1 MPEG-CENS MPEG-CBCS ) local -a options=() case $service in (mp42aac|mp42avc|mp42hevc) options+=('--key[128-bit decryption key (in hex: 32 chars)]:key') ;; (mp42hls) options+=( '--verbose[enable verbose mode]' '--show-info[show information]' '--hls-version[HLS version(default: 3)]:version' '--pmt-pid[PID to use for the PMT(default: 0x100)]:pid' '--audio-pid[PID to use for audio packets(default: 0x101)]:pid' '--video-pid[PID to use for video packets(default: 0x102)]:pid' '--audio-track-id[Read audio from the given track ID(0 means no audio)]:track_id' '--video-track-id[Read video from the given track ID(0 means no video)]:track_id' '--audio-format[Format to use for audio-only segments(default: ts)]:format:(ts packed)' '--segment-duration[Target segment duration in seconds(default: 6)]:seconds' '--segment-duration-threshold[Segment duration threshold in milliseconds(default: 15)]:seconds' '--pcr-offset[offset in units of 90kHz(default: 1000)]:offset' '--index-filename[File name to use for the playlist/index(default: stream.m3u8)]:name:_files' '--allow-cache[set #EXT-X-ALLOW_CACHE to YES or NO]: :(YES NO)' '--segment-filename-template[File name pattern to use for the segment(default: segment-%d. or stream.)]:pattern' '--segment-url-template[URL pattern to use for segments(default: segment-%d. or stream.)]:pattern' '--iframe-index-filename[File name to use for the I-Frame playlist(default: iframes.m3u8)]:file:_files' '--output-single-file[Output all the media in a single file instead of separate segment files]' '--encryption-mode[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)' '--encryption-key[Encryption key in hexadecimal(default: no encryption)]:key' '--encryption-iv-mode[Encryption IV mode(default: separate)]:mode:(sequence random fps)' '--encryption-key-uri[Encryption key URI, relative or absolute URI(default: key.bin)]:uri' '--encryption-key-format[Encryption key format(default: identity)]:format' '--encryption-key-format-versions[Encryption key format versions]:versions' '--encryption-key-line[Preformatted encryption key line]:ext_x_key_line' ) ;; (mp42ts) options+=( '--pmt-pid[PID to use for the PMT(default: 0x100)]:pid' '--audio-pid[PID to use for audio packets(default: 0x101)]:pid' '--video-pid[PID to use for video packets(default: 0x102)]:pid' '--segment[Segment duration in seconds]:seconds' '--segment-duration-threshold[Segment duration threshold in milliseconds(default: 50)]:seconds' '--pcr-offset[offset in units of 90kHz(default: 1000)]:offset' '--verbose[enable verbose mode]' '--playlist[Playlist file name]:file:_files' '--playlist-hls-version[HLS version(default: 3)]:version' ) ;; (mp4compact) options+=('--verbose[Enable verbose mode]') ;; (mp4dash) options+=( '(- *)'{-h,--help}'[Show this help message and exit]' '(-v --verbose)'{-v,--verbose}'[Be verbose]' '(-d --debug)'{-d,--debug}'[Print out debugging information]' '(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/' '(-f --force)'{-f,--force}'[Allow output to an existing directory]' '--mpd-name=[MPD file name]:file:_files' '--profiles=[Comma-separated list of one or more profile(s)]:profiles' '--no-media[Do not output media files (MPD/Manifests only)]' '--rename-media[Use a file name pattern instead of the base name of input files]' '--media-prefix=[Use this prefix for prefixed media file names(default: media)]:prefix' '--init-segment=[Initialization segment name]:file:_files' '--no-split[Do not split the file into individual segment files]' '--use-segment-list[Use segment lists instead of segment templates]' '--use-segment-template-number-padding[Use padded numbers in segment URL/filename templates]' '--use-segment-timeline[Use segment timelines]' '--min-buffer-time=[Minimum buffer time in seconds]:seconds' '--max-playout-rate=[Max Playout Rate setting strategy for trick-play support]:strategy:(lowest:X)' '--language-map=[Remap language code to ]:from_to_list' '--always-output-lang[Always output an @lang attribute for audio tracks]' '--subtitles[Enable Subtitles]' *'--attributes=[Specify the attributes of a set of tracks]:attribute' '--smooth[Produce an output compatible with Smooth Streaming]' '--smooth-client-manifest-name=[Smooth Streaming Client Manifest file name]:file:_files' '--smooth-server-manifest-name=[Smooth Streaming Server Manifest file name]:file:_files' '--smooth-h264-fourcc=[Smooth Streaming FourCC value for H.264 video(default H264)]:fourcc' '--hls[Output HLS playlists in addition to MPEG DASH]' '--hls-key-url=[HLS key URL (default: key.bin)]:url' '--hls-master-playlist-name=[HLS master playlist name (default: master.m3u8)]:file:_files' '--hls-media-playlist-name=[HLS media playlist name (default: media.m3u8)]:file:_files' '--hls-iframes-playlist-name=[HLS I-Frames playlist name (default: iframes.m3u8)]' '--hippo[Produce an output compatible with the Hippo Media Server]' '--hippo-server-manifest-name=[Hippo Media Server Manifest file name]:file:_files' '--use-compat-namespace[Use the original DASH MPD namespace]' '--use-legacy-audio-channel-config-uri[Use the legacy DASH namespace URI]' '--encryption-key=[Encryption key specifications]:key_spec' '--encryption-cenc-scheme=[MPEG Common Encryption scheme(default: cenc)]:scheme:(cenc cbc1 cens cbcs)' '--encryption-args=[Pass additional command line arguments to mp4encrypt]:args' '--eme-signaling=[Add EME-compliant signaling in the MPD and PSSH boxes]:type:(pssh-v0 pssh-v1)' '--merge-keys[Merge all keys in a single set used for all ContentProtection elements]' '--marlin[Add Marlin signaling to the MPD]' '--marlin-add-pssh[Add an (optional) Marlin "pssh" box in the init segment(s)]' '--playready[Add PlayReady signaling to the MPD]' '--playready-version=[PlayReady version to use]:version:(4.0 4.1 4.2 4.3)' '--playready-header=[Add a PlayReady PRO element in the MPD and a PlayReady PSSH box in the init segments]:header' '--playready-no-pssh[Do not store the PlayReady header in a "pssh" box in the init segment(s)]' '--widevine[Add Widevine signaling to the MPD]' '--widevine-header=[Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments]:header' '--primetime[Add Primetime signaling to the MPD]' '--primetime-metadata=[Add Primetime metadata in a PSSH box in the init segments]:metadata' '--fairplay-key-uri=[Specify the key URI to use for FairPlay Streaming key delivery]:uri' '--clearkey[Add Clear Key signaling to the MPD]' '--clearkey-license-uri=[Specify the license/key URI to use for Clear Key]' '--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/' ) ;; (mp4dashclone) options+=( '(- *)'{-h,--help}'[Show this help message and exit]' '--quiet[Be quiet]' '--encrypt=[Encrypt the media with KID and KEY specified in HEX(32 characters each)]:key' '--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/' ) ;; (mp4dcfpackager) options+=( '--method[method name]:method:(NULL CBC CTR)' '--content-type[Content MIME type]:mime_type' '--content-id[Content ID]:id' '--rights-issuer[rights issuer URL]:url' '--key[Specify the key to use for encryption]:key' *'--textual-header[Specify a textual header]:header' ) ;; (mp4decrypt) options+=( '--show-progress[Show progress details]' '--key[Specify the key to use for decryption]:key' '--fragments-info[File to decrypt the fragments read from]:file:_files' ) ;; (mp4dump) options+=( '--verbosity[Set the verbosity level]:level:(0 1 2 3)' '--track[Write the track data into a file]:file:_files' '--format[Format to use for the output(default: text)]:format:(text json)' ) ;; (mp4edit) options+=( '--insert[insert atom data]:atom_path_and_source_and_position' '--remove[remove atom data]:atom_path' '--replace[replace atom data]:atom_path_and_source' ) ;; (mp4encrypt) options+=( '--method=[Encryption method]:method:($encrypt_methods)' '--show-progress[Show progress details]' '--fragments-info[Encrypt the fragments read from with track info read from the given file]:file:_files' '--multi[Encrypt multiple individual fragment files]' '--key[Specify the key to use for a track (or group key)]:key_spec' '--strict[Fail if there is a warning]' *'--property[Specify a named string property for a track]:property' '--global-option[Set the global option]:option' '--pssh[Add a "pssh" atom for this system ID with the payload]:pssh' '--pssh-v1[Same as --pssh but generates a version=1 "pssh" atom]:pssh' '--kms-uri[Specify the KMS URI for the ISMA-IAEC method]:uri' ) ;; (mp4extract) options+=( '--payload-only[Omit the atom header]' ) ;; (mp4fragment) options+=( '--verbosity[Set the verbosity level]:level:(0 1 2 3)' '--debug[Enable debugging information output]' '--quiet[Do not print out notice messages]' '--fragment-duration[Fragment duration in milliseconds(default: automatic)]:msecs' '--timescale[Time scale]:time_scale' '--track[Specify track ID or type only include media from one track]:id_or_type:(audio video subtitles)' '--index[(Re)create the segment index]' '--trim[Trim excess media in longer tracks]' '--no-tfdt[Do not add "tfdt boxes in the fragments"]' '--tfdt-start[Set start value of the first tfdt timestamp]:start' '--sequence-number-start[Set start value of the first segment sequence number(default: 1)]:number' '--force-i-frame-sync[Treat all I-frames as sync samples]:type:(auto all)' '--copy-udta[Copy the moov/udta atom from input to output]' '--no-zero-elst[Do not set the last edit list entry to 0 duration]' '--trun-version-zero[Set the "trun" box version to zero(default version: 1)]' ) ;; (mp4hls) options+=( '(- *)'{-h,--help}'[Show this help message and exit]' '(-v --verbose)'{-v,--verbose}'[Be verbose]' '(-d --debug)'{-d,--debug}'[Print out debugging information]' '(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/' '(-f --force)'{-f,--force}'[Allow output to an existing directory]' '--hls-version=[HLS version]:version' '--master-playlist-name=[Master Playlist name]:file:_files' '--media-playlist-name=[Media Playlist name]:file:_files' '--iframe-playlist-name=[I-frame Playlist name]:name' '--output-single-file[Store segment data in a single output file per input file]' '--audio-format=[Format for audio segments]:format:(packed ts)' '--segment-duration=[Segment duration(default: 6)]:duration' '--encryption-mode=[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)' '--encryption-key=[Encryption key in hexadecimal]:key' '--encryption-iv-mode=[Encryption IV mode]:mode:(sequence random fps)' '--encryption-key-uri=[Encryption key URI(default: key.bin)]:uri' '--encryption-key-format=[Encryption key format (default: identity)]:mode:(identity)' '--encryption-key-format-versions=[Encryption key format versions]:versions' '--signal-session-key[Signal an #EXT-X-SESSION-KEY tag in the master playlist]' '--fairplay=[Enable FairPlay Key Delivery and set parameters]:parameters' '--widevine=[Enable Widevine Key Delivery and set parameters]:parameters' '--output-encryption-key[Output the encryption key to a file]' '--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/' '--base-url=[The base URL for the Media Playlists and TS files listed in the playlists]:uri' ) ;; (mp4iframeindex) options+=( '--track[ID of the video track]:id' ) ;; (mp4info) options+=( '--verbose[Show extended information when available]' '--format[Display the information in this format(default: text)]:format:(text json)' '--show-layout[Show sample layout]' '--show-samples[Show sample details]' '--show-sample-data[Show sample data]' '--fast[Skip some details that are slow to compute]' ) ;; (mp4mux) options+=( *'--track=[Track type, input, parameters]:track' '--verbose[Show more details]' ) ;; (mp4rtphintinfo) options+=( '--trackid[Hint track ID]:id' ) ;; (mp4split) options+=( '--verbose[Print verbose information when running]' '--init-segment[Name of init segment(default: init.mp4)]:file:_files' '--init-only[Only output the init segment(no media segments)]' '--media-segment[Segment file name pattern(default: segment-%llu.%04llu.m4s)]:pattern' '--start-number[Start numbering segments at n(default=1)]:number' '--pattern-parameters[One or more selector letter(default: IN)]:params' '--track-id[Only output segments with this track ID]:id' '--audio[Only output audio segments]' '--video[Only output video segments]' ) ;; (mp4tag) options+=( '--help[Print this usage information]' '--show-tags[Show tags found in the input file]' '--list-symbols[List all the builtin symbols]' '--list-keys[List all the builtin symbolic key names]' '--set[Set a tag]:tag' '--add[Set/Add a tag]:tag' '--remove[Remove a tag]:key' '--extract[extract the value of a tag and save it to a file]:key_file' ) ;; esac _arguments \ "${options[@]}" \ "*::file:_files" # 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 ================================================ FILE: src/_bitcoin-cli ================================================ #compdef bitcoin-cli # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 bitcoin-cli v29.0.0 (https://bitcoin.org). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Ian Ker-Seymer (https://github.com/ianks) # * notmike (https://github.com/notmike-5) # ------------------------------------------------------------------------------ _bitcoin-cli() { local context state line curcontext="$curcontext" local ret=1 _arguments -C \ -?'[This help message]' \ -addrinfo'[Get the number of addresses known to the node, per network and total]' \ -chain='[Use the chain (default: main). Allowed values: main, test, signet, regtest]:chain:(main test signet regtest)' \ -color='[Color setting for CLI output (default: auto)]:when:(always auto never)' \ -conf='[Specify configuration file. Relative paths will be prefixed by datadir location. (default: bitcoin.conf)]:PATH:_files' \ -datadir='[Specify data directory]:PATH:_directories' \ -getinfo'[Get general information from the remote server]' \ -testnet'[Use the test chain]' \ -regtest'[Enter regression test mode]' \ -named'[Pass named instead of positional arguments (default: false)]' \ -netinfo=-'[Get network peer connection information from the remote server.]::level_or_help:(0 1 2 3 4 help)' \ -stdin'[Read extra arguments from standard input, one per line until EOF/Ctrl-D]' \ -rpcport='[Connect to JSON-RPC on (default: 8332, testnet: 18332, regtest: 18443)]: :_guard "[[\:digit\:]]#" "PORT"' \ -rpcwait'[Wait for RPC server to start]' \ -rpcwaittimeout='[Timeout in seconds to wait for the RPC server to start, or 0 for no timeout. (default: 0)]:timeout' \ -rpcuser='[Username for JSON-RPC connections]:RPCUSER:()' \ -rpcpassword='[Password for JSON-RPC connections]:RPCPASSWORD:()' \ -rpccookiefile='[Location of the auth cookie(default: data dir)]:dir:_files' \ -rpcwallet='[Send RPC for non-default wallet on RPC server]:server' \ -rpcconnect='[Send commands to node running on (default: 127.0.0.1)]:RPCCONNECT:_hosts' \ -rpcclienttimeout='[Timeout during HTTP requests, or 0 for no timeout. (default: 900)]: :_guard "[[\:digit\:]]#" "RPCCLIENTTIMEOUT"' \ -version'[Print version and exit]' \ ':subcommand:->subcommand' && ret=0 case $state in subcommand) subcommands=( 'dumptxoutset' 'getbestblockhash' 'getblock' 'getblockchaininfo' 'getblockcount' 'getblockfilter' 'getblockfrompeer' 'getblockhash' 'getblockheader' 'getblockstats' 'getchainstates' 'getchaintips' 'getchaintxstats' 'getdeploymentinfo' 'getdifficulty' 'getmempoolancestors' 'getmempooldescendants' 'getmempoolentry' 'getmempoolinfo' 'getrawmempool' 'gettxout' 'gettxoutproof' 'gettxoutsetinfo' 'gettxspendingprevout' 'importmempool' 'loadtxoutset' 'preciousblock' 'pruneblockchain' 'savemempool' 'scanblocks' 'scantxoutset' 'verifychain' 'verifytxoutproof' 'getmemoryinfo' 'getrpcinfo' 'help' 'logging' 'stop' 'uptime' 'getblocktemplate' 'getmininginfo' 'getnetworkhashps' 'getprioritisedtransactions' 'prioritisetransaction' 'submitblock' 'submitheader' 'addnode' 'clearbanned' 'disconnectnode' 'getaddednodeinfo' 'getaddrmaninfo' 'getconnectioncount' 'getnettotals' 'getnetworkinfo' 'getnodeaddresses' 'getpeerinfo' 'listbanned' 'ping' 'setban' 'setnetworkactive' 'analyzepsbt' 'combinepsbt' 'combinerawtransaction' 'converttopsbt' 'createpsbt' 'createrawtransaction' 'decodepsbt' 'decoderawtransaction' 'decodescript' 'descriptorprocesspsbt' 'finalizepsbt' 'fundrawtransaction' 'getrawtransaction' 'joinpsbts' 'sendrawtransaction' 'signrawtransactionwithkey' 'submitpackage' 'testmempoolaccept' 'utxoupdatepsbt' 'enumeratesigners' 'createmultisig' 'deriveaddresses' 'estimatesmartfee' 'getdescriptorinfo' 'getindexinfo' 'signmessagewithprivkey' 'validateaddress' 'verifymessage' 'abandontransaction' 'abortrescan' 'backupwallet' 'bumpfee' 'createwallet' 'createwalletdescriptor' 'encryptwallet' 'getaddressesbylabel' 'getaddressinfo' 'getbalance' 'getbalances' 'gethdkeys' 'getnewaddress' 'getrawchangeaddress' 'getreceivedbyaddress' 'getreceivedbylabel' 'gettransaction' 'getunconfirmedbalance' 'getwalletinfo' 'importdescriptors' 'importprunedfunds' 'keypoolrefill' 'listaddressgroupings' 'listdescriptors' 'listlabels' 'listlockunspent' 'listreceivedbyaddress' 'listreceivedbylabel' 'listsinceblock' 'listtransactions' 'listunspent' 'listwalletdir' 'listwallets' 'loadwallet' 'lockunspent' 'migratewallet' 'psbtbumpfee' 'removeprunedfunds' 'rescanblockchain' 'restorewallet' 'send' 'sendall' 'sendmany' 'sendtoaddress' 'setlabel' 'settxfee' 'setwalletflag' 'signmessage' 'signrawtransactionwithwallet' 'simulaterawtransaction' 'unloadwallet' 'upgradewallet' 'walletcreatefundedpsbt' 'walletdisplayaddress' 'walletlock' 'walletpassphrase' 'walletpassphrasechange' 'walletprocesspsbt' 'getzmqnotifications' ) _describe -t subcommands 'bitcoin-cli subcommands' subcommands && ret=0 esac return ret } _bitcoin-cli "$@" # 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 ================================================ FILE: src/_blkid ================================================ #compdef blkid # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 for blkid, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - locate/print block device attributes # https://man7.org/linux/man-pages/man8/blkid.8.html # ------------------------------------------------------------------------------ # Authors # ------- # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments \ '(-c --cache-file)'{-c+,--cache-file}'[Read from cachefile instead of reading from the default cache file]:cache file:_files' \ '(-d --no-encoding)'{-d,--no-encoding}"[Don't encode non-printing characters]" \ '(-D --no-part-details)'{-D,--no-part-details}"[Don't print information from partition table in low-level probing mode]" \ '(-g --garbage-collect)'{-g,--garbage-collect}'[Perform a garbage collection on the blkid cache]' \ '(-H --hint)'{-H,--hint}'[Set probing hint]:setting' \ '(-i --info)'{-i,--info}'[Display information about I/O limits]' \ '(-k --list-filesystems)'{-k,--list-filesystems}'[List all known filesystems and RAIDS and exits]' \ '(-l --list-one)'{-l,--list-one}'[Look up only one device that matches with the --match-token option]' \ '(-L --label)'{-L+,--label}'[Look up the device that uses this filesystem label]:label' \ '(-n --match-types)'{-n+,--match-types}'[Restrict the probing functions to the specified comma-separated list of superblock types]:list' \ '(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \ '(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \ '(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \ '(-s --match-tag)'{-s+,--match-tag}'[Show only the tags that match tag]:tag' \ '(-S --size)'{-S,--size}'[Override the size of device/file]' \ '(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \ '(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \ '(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \ '*:device:_files -W /dev' # 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 ================================================ FILE: src/_bower ================================================ #compdef bower # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Bower (https://bower.io). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Joe Lencioni (https://github.com/lencioni) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line _opts ret=1 _arguments -C \ '(- 1 *)'{-v,--version}'[display version information]' \ '1: :->cmds' \ '*:: :->args' && ret=0 case $state in cmds) _values "bower command" \ "cache[manage bower cache]" \ "help[display help information about Bower]" \ "home[opens a package homepage into your favorite browser]" \ "info[info of a particular package]" \ "init[interactively create a bower.json file]" \ "install[install a package locally]" \ "link[symlink a package folder]" \ "list[list local packages - and possible updates]" \ "login[authenticate with GitHub and store credentials]" \ "lookup[look up a package URL by name]" \ "prune[removes local extraneous packages]" \ "register[register a package]" \ "search[search for a package by name]" \ "update[update a local package]" \ "uninstall[remove a local package]" \ "unregister[remove a package from the registry]" \ "version[bump a package version]" && ret=0 _arguments \ '(--force)--force[make various commands more forceful]' \ '(--json)--json[output consumable JSON]' \ '(--log-level)--log-level[what level of logs to report]' \ "(--offline)--offline[don't hit the network]" \ '(--quiet)--quiet[only output important information]' \ "(--silent)--silent[don't output anything, besides errors]" \ '(--verbose)--verbose[make output more verbose]' \ '(--allow-root)--allow-root[allow running commands as root]' \ '(--version)--version[output Bower version]' \ '(--no-color)--no-color[disable colors]' && ret=0 ;; args) case $line[1] in help) _values 'commands' \ 'cache' \ 'home' \ 'info' \ 'init' \ 'install' \ 'link' \ 'list' \ 'login' \ 'lookup' \ 'prune' \ 'register' \ 'search' \ 'update' \ 'uninstall' \ 'unregister' \ 'version' && ret=0 ;; (home|info|init|link|lookup|prune|register|search|unregister) _arguments \ '(--help)--help[show help message]' && ret=0 ;; install) _arguments \ '(--force-latest)--force-latest[force latest version on conflict]' \ '(--help)--help[show help message]' \ "(--production)--production[don't install project devDependencies]" \ "(--save)--save[save installed packages into the project's bower.json dependencies]" \ "(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0 ;; list) _arguments \ '(--help)--help[show help message]' \ '(--paths)--paths[generate a simple JSON source mapping]' \ '(--relative)--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0 ;; login) _arguments \ '(--help)--help[show help message]' \ '(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0 ;; uninstall) _arguments \ '(--help)--help[show help message]' \ "(--save)--save[save installed packages into the project's bower.json dependencies]" \ "(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0 ;; update) _arguments \ '(--force-latest)--force-latest[force latest version on conflict]' \ '(--help)--help[show help message]' \ "(--production)--production[don't install project devDependencies]" && ret=0 ;; version) _arguments \ '(--message)--message[custom git commit and tag message]' && ret=0 ;; exec) _normal && ret=0 ;; *) _opts=( $(bower help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') ) _opts+=( $(bower help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') ) if [[ $_opts != "" ]]; then _values 'option' $_opts && ret=0 fi ;; esac ;; esac return ret # 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 ================================================ FILE: src/_bundle ================================================ #compdef bundle # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Bundler 4.0.0 (https://bundler.io/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Bruno Michel (https://github.com/nono) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _bundle() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C -A "-v" -A "--version" \ '(- 1 *)'{-v,--version}'[display version information]' \ '(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \ '(-V --verbose)'{-V,--verbose}'[print out additional logging information]' \ '--no-color[print all output without color]' \ '1: :_bundle_commands' \ '*:: :->args' && ret=0 case $state in (args) case $words[1] in (help) _arguments \ '1: :_bundle_commands' \ && ret=0 ;; (install) local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity') _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \ '--full-index[download and cache the index file of all gems]' \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \ '(-j --jobs)'{-j,--jobs}'[the maximum number of parallel download and install jobs]:number' \ '--local[do not attempt to connect to rubygems.org]' \ '--lockfile=[location of the lockfile which Bundler should use]:path:_files' \ '--prefer-local[force using locally installed gems]' \ '--no-cache[do not update the cache in vendor/cache with newly installed gems]' \ '--no-lock[do not create a lockfile]' \ '--quiet[only output warnings and errors]' \ '--retry=[retry number when network or git requests failed]:number' \ '--standalone=-[create standalone bundles]:groups:_bundle_groups' \ "--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \ && ret=0 ;; (update) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--all[update all gems specified in Gemfile]' \ \*{--group,-g}=-'[only update the gems in the specified group]' \ '--source=-[the name of a source used in the Gemfile]:url' \ '--local[do not attempt to fetch gems remotely and use the gem cached instead]' \ '--ruby[update the locked version of Ruby to the current version of Ruby]' \ '--bundler[update the locked version of bundler to invoked bundler version]' \ '(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \ '--full-index[fall back to using the single-file index of all gems]' \ '(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \ '--retry=-[retry failed network or git requests for number times]:number' \ '--quiet[only output warnings and errors]' \ '--patch[prefer updating only to next patch version]' \ '--minor[prefer updating only to next minor version]' \ '--major[prefer updating only to next major version (default)]' \ '--pre[always choose the highest allowed version]' \ '--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \ '--conservative[use bundle install conservative update behavior]' \ '*:: :_bundle_gems' \ && ret=0 ;; (cache) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--all-platforms[include gems for all platforms present in the lockfile, not only the current one]' \ '--cache-path=-[specify a different cache path than the default(vendor/cache)]: :_files -/' \ '--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \ "--no-install[don't install the gems, only update the cache]" \ '--quiet[only output warnings and errors]' \ && ret=0 ;; (exec) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--gemfile=[use the specified gemfile instead of Gemfile]' \ '*:: :_normal' \ && ret=0 ;; (config) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '1: :_bundle_config_subcommands' \ '--local[use local configuration]' \ '--global[use global configuration]' \ && ret=0 ;; (add) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(-v --version)'{-v,--version}=-'[specify version requirements for the added gem]:version' \ '(-g --group)'{-g,--group}=-'[specify the group for the added gem]:group:_bundle_groups' \ '(-s --source)'{-s,--source}=-'[specify the source for the added gem]: :_files' \ '(-r --require)'{-r,--require}=-'[adds require path to gem]: :_files' \ '--path=[specify the file path for the added gem]: :_files -/' \ '--git=[specify the git source for the added gem]:git' \ '--github=[specify the github source for the added gem]:github' \ '--branch=[specify the git branch for the added gem]:branch' \ '--ref=[specify the git ref for the added gem]' \ "--glob=[specify the location of a dependency's .gemspec, expanded within Ruby]:glob" \ '--quiet[do not print progress information to the standard output]' \ '--skip-install[adds the gem to the Gemfile but does not install it]' \ '--optimistic[adds optimistic declaration of version]' \ '--strict[adds strict declaration of version]' \ '1::gem' \ && ret=0 ;; (binstubs) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--force[overwrite existing binstubs if they exist]' \ '--standalone[makes binstubs that can work without depending on Rubygems or Bundler at runtime]' \ '--shebang=-[specify a different shebang executable name than the default(default: ruby)]: :_files' \ '--all[create binstubs for all gems in the bundle]' \ '--all-platforms[install binstubs for all platforms]' \ '1::gem:' \ && ret=0 ;; (check) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--dry-run[locks the Gemfile before running the command]' \ '--gemfile=-[use the specified gemfile instead of the Gemfile]: :_files' \ && ret=0 ;; (show) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--paths[list the paths of all gems that are required by your Gemfile]' \ '1:: :_bundle_gems' \ && ret=0 ;; (outdated) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--local[do not attempt to fetch gems remotely and use the gem cache instead]' \ '--pre[check for newer pre-release gems]' \ '--source=[check against a specific source]:source:_files' \ '(--filter-strict --strict)'{--filter-strict,--strict}'[only list newer versions allowed by your Gemfile requirements]' \ '(--parseable --porcelain)'{--parseable,--porcelain}'[use minimal formatting for more parsable output]' \ '--group=[list gems from a specific group]:group:_bundle_groups' \ '--groups[list gems organized by groups]' \ '--major[prefer updating to next major version(default)]' \ '--minor[prefer updating only to next minor version]' \ '--patch[prefer updating only to next patch version]' \ '--filter-major[only list major new versions]' \ '--filter-minor[only list minor new versions]' \ '--filter-patch[only list patch new versions]' \ '--only-explicit[only list gems specified in your Gemfile, not their dependencies]' \ '*:: :_bundle_gems' \ && ret=0 ;; (console) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--no-color[disable colorization in output]' \ '(-r --retry)'{-r,--retry}='[specify the number of times you with to attempt network commands]:num' \ '1:: :_bundle_groups' \ && ret=0 ;; (open) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--path=[specify GEM source relative path to open]:path:_files' \ '1:: :_bundle_gems' \ && ret=0 ;; (list) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--name-only[print only the name of each gem]' \ '--paths[print the path to each gem in the bundle]' \ '--without-group=-[a space-separated list of groups of gems to skip during printing]: :_bundle_groups' \ '--only-group=-[a space-separated list of groups of gems to print]: :_bundle_groups' \ '--format[output format]:format:(json)' \ && ret=0 ;; (lock) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--update=-[ignores the existing lockfile]' \ '--bundler=-[update the locked version of bundler to the given version or the latest version]:version' \ '--local[do not attempt to connect to rubygems.org]' \ '--print[prints the lockfile to STDOUT instead of writing to the file system]' \ '--lockfile=[the path where the lick file should be written to]: :_files' \ '--full-index[fall back to using the single file index of all gems]' \ '--gemfile=[use the specified gemfile instead of Gemfile]:file:_files' \ '--add-checksums[add checksums to the lockfile]' \ '--add-platform=[add a new platform to the lockfile]:platforms' \ '--remove-platform=[remove a platform from the lockfile]:platforms' \ '--normalize-platforms[normalize lockfile platforms]' \ '--patch[if updating, prefer updating only to next patch version]' \ '--minor[if updating, prefer updating only to next minor version]' \ '--major[if updating, prefer updating to next major version(default)]' \ '--pre[if updating, always choose the highest allowed version]' \ '--strict[if updating, do not allow any gem to be updated past latest --patch | --minor | --major]' \ '--conservative[if updating, use bundle install conservative update behavior]' \ && ret=0 ;; (init) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--gemspec=-[use the specified .gemspec to create the Gemfile]: :_files' \ '--gemfile=[use the specified name for the gemfile instead of Gemfile]:name' \ && ret=0 ;; (gem) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '(--exe -b --bin --no-exe)'{--exe,-b,--bin}'[specify that bundler should create a binary executable in the generated rubygem project]' \ '(--exe -b --bin --no-exe)--no-exe[do not create a binary]' \ '(--no-coc)--coc[add a CODE_OF_CONDUCT.md to the root of the generated project]' \ '(--coc)--no-coc[do not create a CODE_OF_CONDUCT.md]' \ '(--changelog --no-changelog)--changelog[add a CHANGELOG.md file to the root of the project]' \ '(--changelog --no-changelog)--no-changelog[do not add a CHANGELOG.md file to the root of the project]' \ '(--no-ext --ext)--ext=[add boilerplate for C, GO or Rust extension code to the generated project]: :(c go rust )' \ '(--ext --no-ext)--no-ext[do not add extension code]' \ '--git[initialize a git repo inside your library]' \ '--github-username=[Github username on README]:username' \ '(--no-mit --mit)--mit[add an MIT license to a LICENSE.txt file in the root of the generated project]' \ '(--mit --no-mit)--no-mit[do not create a LICENSE.txt]' \ '(-t --test --no-test)'{-t,--test}='[specify the test framework]: :(minitest rspec test-unit)' \ '(-t --test --no-test)--no-test[do not use a test framework]' \ '(--ci --no-ci)--ci=-[specify the continuous integration service]: :(circle github gitlab)' \ '(--ci --no-ci)--no-ci[do not use a continuous integration service]' \ '(--linter --no-linter)--linter=-[specify the linter and code formatter]: :(rubocop standard)' \ '(--linter --no-linter)--no-linter[do not add a linter]' \ '(-e --edit)'{-e,--edit}='[open the resulting GEM_NAME.gemspec in EDITOR]:editor' \ '(--bundle --no-bundle)--bundle[run bundle install after creating the gem]' \ '(--bundle --no-bundle)--no-bundle[do not run bundle install after creating the gem]' \ '1::gem_name:' \ && ret=0 ;; (platform) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--ruby[it will display the ruby directive information]' \ && ret=0 ;; (clean) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--dry-run[print the changes, but do not clean the unused gems]' \ '--force[forces cleaning up unused gems even if Bundler is configured to use globally installed gems]' \ && ret=0 ;; (doctor) _bundle_doctor && ret=0 ;; (remove) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '*:: :_bundle_gems' \ && ret=0 ;; (plugin) _bundle_plugin && ret=0 ;; esac ;; esac return ret } _bundle_commands() { local -a commands=( "install:Install the gems specified by the Gemfile or Gemfile.lock" "update:Update dependencies to their latest versions" "cache:Package the .gem files required by your application" "exec:Execute a script in the context of the current bundle" "config:Specify and read configuration options for bundler" "help:Describe available tasks or one specific task" "add:Add the named gem to the Gemfile and run bundle install" "binstubs:Generate binstubs for executables in a gem" "check:Determine whether the requirements for your application are installed" "show:Show the source location of a particular gem in the bundle" "outdated:Show all of the outdated gems in the current bundle" "console:Start an IRB session in the context of the current bundle" "open:Open an installed gem in the editor" "list:Show all of the gems in the current bundle" "lock:Generate a lockfile for your dependencies" "init:Generate a simple Gemfile, placed in the current directory" "gem:Create a simple gem, suitable for development with bundler" "platform:Displays platform compatibility information" "clean:Clean up unused gems in your Bundler directory" "doctor:Display warnings about common problems" "remove:Removes gems from the Gemfile" "plugin:Manage Bundler plugins" "version:Prints Bundler version information" ) _describe -t commands 'command' commands "$@" } _bundle_gems() { local -a gems=($(bundle show | awk '/^ / { print $2 }')) if [[ $? == 0 ]]; then _values 'gems' $gems fi } _bundle_groups() { if [[ -e Gemfile ]]; then local -a groups=(${(@f)"$(awk '/^ *group *:/{sub(/^ *group *:/, ""); print $1}' Gemfile)"}) _values 'groups' $groups fi } _bundle_config_subcommands() { local -a subcommands=( "list:print a list of all bundler configuration" "get:print the value of that configuration setting" "set:set defaults to setting configuration" "unset:delete the configuration" ) _describe -t subcommands 'subcommand' subcommands "$@" } _bundle_plugin() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[show help message]' \ '1:subcommand:_bundle_plugin_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (install) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--source=[install the plugin gem from a specific source]:url:_urls' \ '--version=[specify a version of the plugin gem]:version' \ '--git=[install the plugin gem from a Git repository]:url:_urls' \ '--branch=[branch name when using --git]:branch' \ '--ref=[tag or commit hash when using --git]:ref' \ '--path=[local file path to install the plugin gem]:path:_files -/' \ '*::plugins' \ && ret=0 ;; (uninstall) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '--all[uninstall all the installed plugins]' \ '*::plugins' \ && ret=0 ;; (list) _arguments \ '(- *)'{-h,--help}'[show help message]' \ && ret=0 ;; (help) _arguments \ '(- *)'{-h,--help}'[show help message]' \ '1:subcommand:(install uninstall list help)' \ && ret=0 ;; esac ;; esac return ret } _bundle_plugin_subcommands() { local -a subcommands=( 'install:install the given plugins' 'uninstall:uninstall the plugins' 'list:list the installed plugins and available commands' 'help:describe subcommands or one specific subcommand' ) _describe -t subcommands 'subcommand' subcommands "$@" } _bundle_doctor() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[show help message]' \ '--quiet[only output warnings and errors]' \ '--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \ '--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \ '1:subcommand:_bundle_doctor_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (diagnose) _arguments \ '--quiet[only output warnings and errors]' \ '--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \ '--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \ && ret=0 ;; (ssl) _arguments \ '--host=[perform the diagnostic on HOST(default: rubygems.org)]:host' \ '--tls-version=[TLS version to connect to HOST]:version:(1.1 1.2)' \ '--verify-mode=[specify the TLS verify mode]:mode:(CLIENT_ONCE FAIL_IF_NO_PEER_CERT NONE PEER)' \ && ret=0 ;; (help) _arguments \ '1:subcommand:_bundle_doctor_subcommands' \ && ret=0 ;; esac ;; esac return ret } _bundle_doctor_subcommands() { local -a subcommands=( 'diagnose:check your Gemfile and gem environment for common problems' 'ssl:check issues related to SSL certificates or/and TLS versions' 'help:describe subcommands or one specific subcommand' ) _describe -t subcommands 'subcommand' subcommands "$@" } _bundle "$@" # 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 ================================================ FILE: src/_cap ================================================ #compdef cap # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Capistrano 3.19.2 (https://capistranorb.com/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Bruno Michel (https://github.com/nono) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line cmds ret=1 _arguments -C \ '--backtrace=[Enable full backtrace]: :(stderr stdout)' \ '--comments[Show commented tasks only]' \ '--job-stats[Display job statistics]:level' \ '--rules[Trace the rules resolution]' \ '--suppress-backtrace[Suppress backtrace lines matching regexp PATTERN]:pattern' \ '(-A --all)'{-A,--all}'[Show all tasks, even uncommented ones]' \ '(-B --build-all)'{-B,--build-all}'[Build all prerequisites, including those which are up-to-date]' \ '(-C --directory)'{-C,--directory}'[Change to DIRECTORY before doing anything]: :_files -/' \ '(-D --describe)'{-D,--describe}'[Describe the tasks, then exit]:pattern' \ '(-e --execute)'{-e,--execute}'[Execute some Ruby code and exit]:code' \ '(-E --execute-continue)'{-E,--execute-continue}'[Execute Ruby code and continue with task processing]:code' \ '(-f --rakefile)'{-f,--rakefile}'[Use FILENAME as the rakefile to search for]: :_files' \ '(-G --no-system --nosystem)'{-G,--no-system,--nosystem}'[Use standard project Rakefile search paths, ignore system wide rakefiles]' \ '(-g --system)'{-g,--system}'[Using system wide rakefiles]' \ '(-I --libdir)'\*{-I,--libdir}'[Include LIBDIR in the search path for required modules]: :_files -/' \ '(-j --jobs)'{-j-,--jobs-}'[Specifies the maximum number of tasks to execute in parallel]:num' \ '(-m --multitask)'{-m,--multitask}'[Treat all tasks as multitasks]' \ '(-N --no-search --nosearch)'{-N,--no-search,--nosearch}'[Do not search parent directories for the Rakefile]' \ '(-P --prereqs)'{-P,--prereqs}'[Display the tasks and dependencies, then exit]' \ '--execute-print[Execute some Ruby code, print the result, then exit]:code' \ '*--require[Require MODULE before executing rakefile]:module' \ '(-R --rakelibdir --rakelib)'{-R,--rakelibdir,--rakelib}'[Auto-import any .rake files in RAKELIBDIR]: :_files -/' \ '(-t --trace)'{-t,--trace}'[Turn on invoke/execute tracing, enable full backtrace]: :(stderr stdout)' \ '(-T --tasks)'{-T,--tasks}'[Display the tasks with descriptions]::pattern' \ '(-W --where)'{-W,--where}'[Describe the tasks then exit]::pattern' \ '(-X --no-deprecation-warnings)'{-X,--no-deprecation-warnings}'[Disable the deprecation warnings]' \ '(- *)'{-V,--version}'[Display the program version]' \ '(-n --dry-run)'{-n,--dry-run}'[Do a dry run without executing actions]' \ '(-r --roles)'{-r,--roles}'[Run SSH commands only on hosts matching these roles]:roles' \ '(-z --hosts)'{-z,--hosts}'[Run SSH commands only on matching hosts]:hosts' \ '(-p --print-config-variables)'{-p,--print-config-variables}'[Display the defined config variables before starting the deployment tasks]' \ '(- *)'{-h,-H,--help}'[Display help message]' \ '*: :->cmds' && ret=0 case $state in cmds) cmds=( ${(f)"$(_call_program commands cap -T 2>/dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} ) _describe -t commands 'cap command' cmds && ret=0 ;; esac return ret # 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 ================================================ FILE: src/_cask ================================================ #compdef cask # ------------------------------------------------------------------------------ # 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 cask (https://cask.readthedocs.io) # # ------------------------------------------------------------------------------ # Authors # ------- # # * ptrv # * Johan Andersson # * Sebastien Duthil # # ------------------------------------------------------------------------------ function _cask() { typeset -A opt_args local context state line ret=1 local curcontext="$curcontext" _arguments -C \ '(--proxy --http-proxy --https-proxy)--proxy[Set emacs proxy for HTTPS and HTTPS]:host:_hosts' \ '(--proxy --http-proxy)--http-proxy[Set emacs proxy for HTTP]:host:_hosts' \ '(--proxy --https-proxy)--https-proxy[Set emacs proxy for HTTPS]:host:_hosts' \ '(--proxy --http-proxy --https-proxy)--proxy[Set emacs proxy for HTTPS and HTTPS]:host:_hosts' \ '--no-proxy[Set Emacs no-proxy to HOST]:host:_hosts' \ '(- *)--version[Print Cask version and exit]' \ '(- *)'{-h,--help}'[Display usage or information for command]::command:->subcommand' \ '--debug[Turn on debug output]' \ '--path[Run command in this PATH instead of default-directory]:dir:_files -/' \ '(--verbose --silent)--verbose[Be verbose and show debug output]' \ '(--verbose --silent)--verbose[Be slient and do not show anything]' \ ':subcommand:->subcommand' \ '*:: :->subcmds' \ && ret=0 case $state in (subcommand) local -a subcommands=( "build:build all Elisp files in the files directive" "clean-elc:remove all byte compiled Elisp files in the files directive" "exec:execute command with correct 'exec-path' and 'load-path'" "exec-path:print 'exec-path' for all packages and dependencies" "files:print list of files specified in the files directive" "help:display usage information or documentation for specified command" "info:show info about the current package" "init:initialize the current directory with a Cask-file" "install:install all packages specified in the Cask-file" "link:manage links" "list:list dependencies" "load-path:print 'load-path' for all packages and dependencies" "outdated:print list of outdated packages" "package:build package and put in specified directory (default: dist)" "package-directory:print current package installation directory" "path:print 'exec-path' for all packages and dependencies" "pkg-file:write a 'define-package' file" "update:update package version" "upgrade-cask:upgrade Cask itself and its dependencies" "upgrade:upgrade Cask itself and its dependencies" "version:print program version" ) _describe -t subcommands 'cask subcommands' subcommands && ret=0 ;; (subcmds) case "$words[1]" in (init) _arguments \ '(--dev)--dev[Run in dev mode]' \ && ret=0 ;; (exec) _generic ;; esac ;; esac return ret } _cask "$@" # 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 ================================================ FILE: src/_ccache ================================================ #compdef ccache -P -value-,CCACHE_*,-default- # zsh completion script for ccache 4.10.2 # Copyright 2018 CERN for the benefit of the LHCb Collaboration. # 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 copyright holder 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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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. # # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. # allow users to define their better compilers # inspired by _cmake_compilers # users could override with # # _ccache_compilers() { # local -a _ccache_compilers # _ccache_compilers=(gcc g++ clang clang++) # _wanted compilers expl "compiler" compadd -- $_ccache_compilers # } (( $+functions[_ccache_compilers] )) || _ccache_compilers() { _command_names -e } _ccache_booleans() { _message 'There are no "false" values, unset variable to disable' local description=${1:-boolean} local -a booleans=('true' 'yes') _describe -t booeans "$description" booleans } (( $+functions[_ccache_sloppiness] )) || _ccache_sloppiness() { _values -s ',' \ 'clang_index_store[ignore the clang compiler option -index-store-path and its argument]' \ 'file_stat_matches[rely on mtimes and ctimes]' \ 'file_stat_matches_ctime[ignore ctime when file_stat_matches is enabled]' \ 'gcno_cwd[not hash the current working directory]' \ 'incbin[pretend the .incbin directive]' \ 'include_file_ctime[ignore headers ctime too new]' \ 'include_file_mtime[ignore headers mtime too new]' \ 'ivfsoverlay[ignore the clang option -ivfsoverlay and its argument]' \ 'locale[include locale environment variables in the hash]' \ 'module[enable cache even if -fmodules is used]' \ 'pch_defines[be sloppy about #defines in pch]' \ 'random_seed[ignore the -frandom-seed option and its argument]' \ 'system_headers[only check non-system headers in direct mode]' \ 'time_macros[ignore __DATE__ and __TIME__]' } (( $+functions[_ccache_compilerchecks] )) || _ccache_compilerchecks() { local -a compiler_check_values=( 'content:the actual compiler binary' 'mtime:mtime and size of the compiler' 'none:ignore compiler for hashing' 'string\::any hard coded string (pre-computed version)' '%compiler%\ -v:any compiler invocation output' ) _describe -t compilerchecks "compiler information included in the hash" compiler_check_values } (( $+functions[_ccache_compiler_type] )) || _ccache_compiler_type() { local -a compiler_types=( 'auto:guess compiler name' 'clang:clang-based compiler' 'clang-cl:clang-cl' 'gcc:gcc-based compiler' 'icl:Intel compiler on Windows' 'msvc:Microsoft Visual C++' 'nvcc:NVCC CUDA compiler' 'other:any compiler other than the known types' ) _describe -t compiler_types "compiler types" compiler_types } if [[ "$service" = -value-* ]]; then case $service in *CCACHE_*DIR*) # CCACHE_BASEDIR: relative to which top level paths are hashed # CCACHE_DIR: where the cache and config are kept # CCACHE_TEMPDIR: where temporary files are kept # all: a single path _path_files -/ ;; *CCACHE_CC*) _ccache_compilers ;; *CCACHE_COMPILERCHECK*) _ccache_compilerchecks ;; *CCACHE_*COMPRESS*) _ccache_booleans "write compressed cache" ;; *CCACHE_EXTENSION*) _alternative ':set extension for intermediate files: ' ;; *CCACHE_*DIRECT*) _ccache_booleans "use direct mode" ;; *CCACHE_*DISABLE*) _ccache_booleans "disable cache usage" ;; *CCACHE_EXTRAFILES*) local sep=: compset -P "*${sep}" compset -S "${sep}*" || suf="$sep" _files "" -r "${sep}"' /\t\t\-' "$@" ;; *CCACHE_*HARDLINK*) _ccache_booleans "create hard links rather than copies" ;; *CCACHE_*HASHDIR*) _ccache_booleans "include the cwd in the hash" ;; *CCACHE_IGNOREHEADERS*) _dir_list ;; *CCACHE_*COMMENTS*) _ccache_booleans "consider comments in hashing" ;; *CCACHE_LIMIT_MULTIPLE*) _alternative ":clean up down to level (e.g. 0.8): " ;; *CCACHE_LOGFILE*) _path_files -g "*(/) *.log" ;; *CCACHE_MAXFILES*) _alternative ":maximum number of files in the cache (0= no limit): " ;; *CCACHE_MAXSIZE*) _alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: ' ;; *CCACHE_PATH*) _alternative ':PATH for compiler lookup (instead of $PATH):_dir_list' ;; *CCACHE_PREFIX*) _alternative ':prefixes for compiler invocation: ' ;; *CCACHE_PREFIX_CPP*) _alternative ':prefixes for preprocessor invocation: ' ;; *CCACHE_*READONLY*) _ccache_booleans "treat cache as read-only" ;; *CCACHE_*READONLY_DIRECT*) _ccache_booleans "retrieve from read-only cache in direct mode" ;; *CCACHE_*RECACHE*) _ccache_booleans "use cache in write-only mode" ;; *CCACHE_*CPP2*) _ccache_booleans "pass original rather than preprocessed source code to compiler" ;; *CCACHE_SLOPPINESS*) _ccache_sloppiness ;; *CCACHE_*STATS*) _ccache_booleans "update statistics counters" ;; *CCACHE_UMASK*) _alternative ":umask value (octal): " ;; *CCACHE_*UNIFY*) _ccache_booleans "normalize sources prior to processing" ;; esac return fi __ccache_config_keys() { local -a keys=( 'absolute_paths_in_stderr:rewrite relative paths in error output to absolute paths' 'base_dir:specify relative to which top level paths are hashed' 'cache_dir:specify where the cache is kept' 'compiler:specify compiler' 'compiler_check:compiler information included in the hash' 'compiler_type:force a compiler type' 'compression:write compressed cache' 'compression_level:cache compression level' 'cpp_extension:set extensions for intermediate files' 'debug:enable debug mode' 'debug_dir:specify directory to write debug files' 'debug_level:specify the amount of debug information' 'depend_mode:enable depend mode' 'direct_mode:use direct mode' 'disable:disable cache usage' 'extra_files_to_hash:additional files to consider in hashing' 'file_clone:use file cloning to store and fetch cached compiler results' 'hard_link:create hard links rather than copies' 'hash_dir:include the cwd in the hash' 'ignore_headers_in_manifest:set paths to headers to ignore in hashing' 'ignore_options:list of options that ccache will ignore' 'inode_cache:cache source file hashes based on device, inode and timestamps' 'keep_comments_cpp:consider comments in hashing' 'log_file:specify a log file' 'max_files:maximum number of files in the cache' 'max_size:maximum size of the cache' 'msvc_dep_prefix:specify the prefix of included files output for MSVC compiler' 'namespace:namespace will be added to the hashed data for each compilation' 'path:PATH for compiler lookup (instead of $PATH)' 'pch_external_checksum:use .sum file for hash' 'prefix_command:prefixes for compiler invocation' 'prefix_command_cpp:prefixes for preprocessor invocation' 'read_only:treat cache as read-only' 'read_only_direct:retrieve from read-only cache in direct mode' 'recache:use cache in write-only mode' 'remote_only:use remote storage' 'remote_storage:specify one or several storage backends' 'reshare:write results to remote storage even for local storage cache hits' 'run_second_cpp:pass original rather than preprocessed source code to compiler' 'sloppiness:hash files sloppy' 'stats:update statistics counters' 'stats_log:write statistics counter updates to the specified file' 'temporary_dir:specify where temporary files are kept' 'umask:set umask for ccache and child processes (e.g. for sharing cache)' ) _describe -t configkeys "configuration keys" keys -S '=' } if compset -P '--set-config=*='; then case $IPREFIX in ( *=absolute_paths_in_stderr= | *=compression= | *=debug= | *=depend_mode= | *=direct_mode= | *=disable= | *=file_clone= | *=hard_link= | *=hash_dir= | *=inode_cache= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= ) local -a booleans=('true' 'false') _describe -t booleans 'boolean' booleans ;; (*=base_dir= | *=cache_dir= | *=debug_dir= | *=temporary_dir=) _path_files -/ ;; (*=compiler=) _ccache_compilers ;; (*=compiler_check=) _ccache_compilerchecks ;; (*=compiler_type=) _ccache_compiler_type ;; (*=extra_files_to_hash=) local sep=: compset -P "*${sep}" compset -S "${sep}*" || suf="$sep" _files "" -r "${sep}"' /\t\t\-' "$@" ;; ( *=ignore_headers_in_manifest= | *=path= ) _dir_list ;; (*=log_file= | *=stats_log= ) _path_files -g "*(/) *.log" ;; (*=sloppiness=) _ccache_sloppiness ;; *=umask=) _alternative ":umask value (octal): " ;; esac elif [[ $words[2] == -* ]]; then # if the first argument starts with -, we are in configure-ccache mode _arguments \ '*'{-o,--set-config=}"[set configuration key]:keys:__ccache_config_keys" \ '(: -)'{-h,--help}'[show help message]' \ '(: -)'{-V,--version}'[print version and copyright information]' \ '(-c --cleanup)'{-c,--cleanup}'[delete old files and recalculate size counters]' \ '(-C --clear)'{-C,--clear}'[clear the cache completely (except configuration)]' \ '--config-path[operate on configuration file PATH instead of the default]: :_files' \ '(-d --dir)'{-d,--dir}'[operate on cache directory PATH instead of the default]: :_files -/' \ '--evict-namespace[remove file created in namespace NAMESPACE]:namespace' \ '--evict-older-than[remove files older than AGE]:age' \ '(-F --max-files=)'{-F,--max-files=}'[set maximum number of files in cache]:number of files in cache: ' \ '(-M --max-size=)'{-M,--max-size=}'[set maximum size of cache]:cache size: ' \ '(-X --recompress)'{-X,--recompress}'[recompress the cache to level LEVEL]:level' \ '--recompress-threads[use up to THREADS threads when recompressing the cache]:threads' \ '(-x --show-compression)'{-x,--show-compression}'[show compression statistics]' \ '(-p --show-config)'{-p,--show-config}'[show current configuration options]' \ '--show-log-stats[print statistics counters from the stats log in human-readable format]' \ '(-s --show-stats)'{-s,--show-stats}'[show statistics summary]' \ '(-v --verbose)'{-v,--verbose}'[increase verbosity]' \ '(-z --zero-stats)'{-z,--zero-stats}'[zero statistics counters]' \ '--trim-dir[remove old files from directory _PATH_]: :_files -/' \ '--trim-max-size[specify the maximum size for --trim-dir]:size' \ '--trim-method[specify the method for --trim-dir]: :(atime mtime)' \ '--trim-recompress[recompress to level LEVEL]:level' \ '--trim-recompress-threads[use up to THREADS threads when recompressing]:threads' \ '--checksum-file[print the checksum of the file at PATH]: :_files' \ '--extract-result[extract file data stored in result file at PATH to the current working directory]' \ '--format[specify format for --print-log-stats and --print-stats]:format:(tab json)' \ '(-k --get-config)'{-k,--get-config}'[print the value of configuration key]:key' \ '--hash-file[print the hash of the file at PATH]: :_files' \ '--inspect[print result/manifest file at PATH in human-readable format]' \ '--print-log-stats[print statistics counter IDs and corresponding values from the stats log]' \ '--print-stats[print statistics counter IDs and corresponding values in machine-parsable format]' \ '--print-version[print version only]' elif [[ $CURRENT -eq 2 ]]; then _ccache_compilers else # the command line already looks like 'ccache ...' # forward to the completion function of the compiler (( CURRENT-- )) shift words _normal fi # 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 ================================================ FILE: src/_certbot ================================================ #compdef certbot # ------------------------------------------------------------------------------ # 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 certbot 5.1.0 (https://github.com/certbot/certbot) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _certbot() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C -A "-*" \ '(- *)'{-h,--help}'[Print help message]:topic:_certbot_help_topics' \ '(- *)--version[Print version and exit]' \ '1: :_certbot_subcommands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) local -a opts=( '(- *)'{-h,--help}'[Show help message and exit]' '(-c --config)'{-c,--config}'[Path to config file]:config_file:_files' ) case $words[1] in (run|certonly|renew|enhance|certificates|delete|reconfigure) opts+=( '--cert-name[Certificate name to apply]:name' ) ;| (run|certonly|renew|reconfigure) opts+=( '--deploy-hook[Command to be run once for each successfully issued certificate]:hook' ) ;| (run|certonly|renew) opts+=( '(-q --quiet)'{-q,--quiet}'[Silence all output except errors]' '--required-profile[Request the given profile name from the ACME server]:profile' '--preferred-profile[Request the given profile name from the ACME server]:profile' '--preferred-chain[Set the preferred certificate chain]:chain' ) ;| (run|certonly|enhance|certificates) opts+=( '(-d --domains --domain)'{-d,--domains,--domain}'[Domain names to include]' ) ;| (run|certonly|enhance|register) opts+=( '--force-interactive[Force Certbot to be interactive even not in a terminal]' ) ;| (run|certonly|enhance) opts+=( '(-n --non-interactive --noninteractive)'{-n,--non-interactive,--noninteractive}'[Run without ever asking for user input]' ) ;| (run|certonly|register) opts+=( '--eab-kid[Key identifier for External Account Binding]:eab_kid' '--eab-hmac-key[HMAC key for External Account Binding]:eab_hmac_key' '--eab-hmac-alg[HMAC algorithm for External Account Binding(default: HS256)]:algorithm:(HS256 HS384 HS512)' ) ;| (run|certonly) opts+=( '(--keep-until-expiring --keep --reinstall)'{--keep-until-expiring,--keep,--reinstall}'[Always keep the existing one until it is due for renewal]' '--debug-challenges[After setting up challenges, wait for user input before submitting to CA]' '--issuance-timeout[How many seconds Certbot will wait for the server to issue a certificate]:seconds' '--apache[Obtain and install certificates using Apache]' '--nginx[Obtain and install certificates using Nginx]' ) ;| (certonly|renew|reconfigure) opts+=( '--run-deploy-hooks[run any applicable deploy hooks]' ) ;| (certonly|renew) opts+=( "--dry-run[Perform a test run against the Let's Encrypt staging server]" '--allow-subset-of-names[When performing domain validation, do not consider it a failure]' '--preferred-challenges[A sorted, comma delimited list of the preferred challenge]:challenges' ) ;| (run|revoke) opts+=( '(--test-cert --staging)'{--test-cert,--staging}"[Use the Let's Encrypt staging server to obtain or revoke test]" ) ;| (certonly|revoke) opts+=( '--cert-path[Path to where certificate is saved]:cert:_files' ) ;| (certonly|reconfigure) opts+=( '--webroot[Obtain certificates by placing files in a webroot directory]' ) ;| (certonly) opts+=( '--csr[Path to a Certificate Signing Request (CSR) in DER or PEM format]:csr:_files' '--standalone[Obtain certificates using a "standalone" webserver]' '--manual[Provide laborious manual instructions for obtaining a certificate]' '--dns-cloudflare[Obtain certificates using a Cloudflare DNS TXT record]' '--dns-digitalocean[Obtain certificates using a DigitalOcean DNS TXT record]' '--dns-dnsimple[Obtain certificates using a DNSimple DNS TXT record]' '--dns-dnsmadeeasy[Obtain certificates using a DNS Made Easy DNS TXT record]' '--dns-gehirn[Obtain certificates using a Gehirn DNS TXT record]' '--dns-google[Obtain certificates using a Google Cloud DNS TXT record]' '--dns-linode[Obtain certificates using a Linode DNS TXT record]' '--dns-luadns[Obtain certificates using a LuaDNS DNS TXT record]' '--dns-nsone[Obtain certificates using a NS1 DNS TXT record]' '--dns-ovh[Obtain certificates using a OVH DNS TXT record]' '--dns-rfc2136[Obtain certificates using a BIND DNS TXT record]' '--dns-route53[Obtain certificates using a Route53 DNS TXT record]' '--dns-sakuracloud[Obtain certificates using a Sakura Cloud DNS TXT record]' ) ;| (renew|reconfigure) opts+=( '--pre-hook[Command to be run before obtaining any certificates]:pre_hook' '--post-hook[Command to be run after attempting to obtain/renew certificates]:post_hook' ) ;| (renew) opts+=( '(--force-renewal --renew-by-default)'{--force-renewal,--renew-by-default}'[renew now regardless of whether it is near expiry]' '--disable-hook-validation[Disable command validation for hook commands]' "--no-directory-hooks[Disable running executables found in Certbot's hook directories]" '--disable-renew-updates[Disable automatic updates to your server configuration]' '--no-autorenew[Disable auto renewal of certificates]' ) ;| (enhance) opts+=( '--redirect[Automatically redirect all HTTP traffic to HTTPS]' '--hsts[Add Strict-Transport-Security header to every HTTP response]' '--uir[Add "Content-Security-Policy: upgrade-insecure-requests" header to every HTTP response]' '--auto-hsts[Gradually increasing max-age value for HTTP Strict Transport Security security header]' ) ;| (revoke) opts+=( '--reason[Specify reason for revoking certificates]:reason:(unspecified keycompromise affiliationchanged superseded cessationofoperation)' '(--delete-after-revoke --no-delete-after-revoke)--delete-after-revoke[Delete certificates after revoking them]' '(--delete-after-revoke --no-delete-after-revoke)--no-delete-after-revoke[Do not delete certificates after revoking them]' '--key-path[Path to private key for certificates instructions or revocation]:key_path:_files' ) ;| (reconfigure) opts+=( '(-a --authenticator)'{-a,--authenticator}'[Authenticator plugin name]:plugin' '(-i --installer)'{-i,--installer}'[Installer plugin name]:plugin' ) ;| (register|unregister|update_account) opts+=( '(-m --email)'{-m,--email}'[Email used for registration and recovery contact]:email') ;| (register|update_account) opts+=( '(--eff-email --no-eff-email)--eff-email[Share your e-mail address with EFF]' '(--eff-email --no-eff-email)--no-eff-email[Do not share your email address with EFF]' ) ;| (unregister) opts+=( '--account[Account ID to use]:account_id' ) ;| (show_account) opts+=( '--server[ACME Directory Resource URI]:server' ) ;| esac _arguments "$opts[@]" && ret=0 ;; esac return ret } (( $+functions[_certbot_subcommands] )) || _certbot_subcommands() { local -a commands=( "run:Obtain & install a certificate in your current webserver" "certonly:Obtain or renew a certificate, but do not install it" "renew:Renew all previously obtained certificates that are near" "enhance:Add security enhancements to your existing configuration" "certificates:Display information about certificates you have from Certbot" "revoke:Revoke a certificate (supply --cert-name or --cert-path)" "delete:Delete a certificate (supply --cert-name)" "reconfigure:Update a certificate's configuration (supply --cert-name)" "register:Create an ACME account" "unregister:Deactivate an ACME account" "update_account:Update an ACME account" "show_account:Display account details" ) _describe -t commands 'command' commands "$@" } (( $+functions[_certbot_help_topics] )) || _certbot_help_topics() { local -a topics=( # topics all automation commands paths security testing # subcommands run certonly renew enhance certificates revoke delete reconfigure register unregister update_account show_account # plugins nginx apache standalone webroot ) _values topics $topics } _certbot "$@" # 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 ================================================ FILE: src/_cf ================================================ #compdef cf # ------------------------------------------------------------------------------ # # Copyright 2015 Ferran Rodenas & Danny Rosen # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ------------------------------------------------------------------------------ # # Description # ----------- # # Completion script for Cloud Foundry CLI (https://github.com/cloudfoundry/cli#downloads) # # ------------------------------------------------------------------------------ # # Authors # ------- # # * Ferran Rodenas (https://github.com/frodenas) # * Danny Rosen (https://github.com/dannyzen) # # ------------------------------------------------------------------------------ _cf() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '1: :__cf_subcommands' \ '*:: :->command' \ && ret=0 case "$state" in (command) local cmd="$words[1]" if (( $+functions[__cf_${cmd}] )); then __cf_$cmd fi ;; esac return ret } __cf_subcommands() { local -a commands=( "login:Log user in" "logout:Log user out" "passwd:Change user password" "target:Set or view the targeted org or space" "api:Set or view target api url" "auth:Authenticate user non-interactively" "apps:List all apps in the target space" "app:Display health and status for app" "push:Push a new app or sync changes to an existing app" "scale:Change or view the instance count, disk space limit, and memory limit for an app" "delete:Delete an app" "rename:Rename an app" "start:Start an app" "stop:Stop an app" "restart:Restart an app" "restage:Restage an app" "restart-app-instance:Terminate the running application Instance at the given index and instantiate a new instance of the application with the same index" "events:Show recent app events" "files:Print out a list of files in a directory or the contents of a specific file" "logs:Tail or show recent logs for an app" "env:Show all env variables for an app" "set-env:Set an env variable for an app" "unset-env:Remove an env variable" "stacks:List all stacks" "stack:Show information for a stack" "copy-source:Make a copy of app source code from one application to another. Unless overridden, the copy-source command will restart the application" "create-app-manifest:Create an app manifest for an app that has been pushed successfully" "marketplace:List available offerings in the marketplace" "services:List all service instances in the target space" "service:Show service instance info" "create-service:Create a service instance" "update-service:Update a service instance" "delete-service:Delete a service instance" "rename-service:Rename a service instance" "create-service-key:Create key for a service instance" "service-keys:List keys for a service instance" "service-key:Show service key info" "delete-service-key:Delete a service key" "bind-service:Bind a service instance to an app" "unbind-service:Unbind a service instance from an app" "create-user-provided-service:Make a user-provided service instance available to cf apps" "update-user-provided-service:Update user-provided service instance name value pairs" "orgs:List all orgs" "org:Show org info" "create-org:Create an org" "delete-org:Delete an org" "rename-org:Rename an org" "spaces:List all spaces in an org" "space:Show space info" "create-space:Create a space" "delete-space:Delete a space" "rename-space:Rename a space" "domains:List domains in the target org" "create-domain:Create a domain in an org for later use" "delete-domain:Delete a domain" "create-shared-domain:Create a domain that can be used by all orgs (admin-only)" "delete-shared-domain:Delete a shared domain" "routes:List all routes in the current space or the current organization" "create-route:Create a url route in a space for later use" "check-route:Perform a simple check to determine whether a route currently exists or not" "map-route:Add a url route to an app" "unmap-route:Remove a url route from an app" "delete-route:Delete a route" "delete-orphaned-routes:Delete all orphaned routes (e.g.: those that are not mapped to an app)" "buildpacks:List all buildpacks" "create-buildpack:Create a buildpack" "update-buildpack:Update a buildpack" "rename-buildpack:Rename a buildpack" "delete-buildpack:Delete a buildpack" "running-environment-variable-group:Retrieve the contents of the running environment variable group" "staging-environment-variable-group:Retrieve the contents of the staging environment variable group" "set-staging-environment-variable-group:Pass parameters as JSON to create a staging environment variable group" "set-running-environment-variable-group:Pass parameters as JSON to create a running environment variable group" "feature-flags:Retrieve list of feature flags with status of each flag-able feature" "feature-flag:Retrieve an individual feature flag with status" "enable-feature-flag:Enable the use of a feature so that users have access to and can use the feature" "disable-feature-flag:Disable the use of a feature so that users have access to and can use the feature" "curl:Executes a raw request, content-type set to application/json by default" "config:write default values to the config" "oauth-token:Retrieve and display the OAuth token for the current session" "add-plugin-repo:Add a new plugin repository" "remove-plugin-repo:Remove a plugin repository" "list-plugin-repos:list all the added plugin repository" "repo-plugins:List all available plugins in all added repositories" "plugins:list all available plugin commands" "install-plugin:Install the plugin defined in command argument" "uninstall-plugin:Uninstall the plugin defined in command argument" "targets:List all saved targets (requires cf-targets plugin)" "save-target:Save the current target under a given name (requires cf-targets plugin)" "set-target:Restore a previously saved target (requires cf-targets plugin)" "delete-target:Delete a saved target (requires cf-targets plugin)" ) _describe -t commands "cf command" commands } # ---------------------- # ----- Helper functions # ---------------------- # Output a selectable list of organizations __cf_orgs() { local -a orgs=($(CF_COLOR=false CF_TRACE=false cf orgs | awk 'NR>3{print $1}')) if (( $#orgs )); then _describe "org" orgs fi } # Output a selectable list of spaces __cf_spaces() { local -a spaces=($(CF_COLOR=false CF_TRACE=false cf spaces | awk 'NR>3{print $1}')) if (( $#spaces )); then _describe 'SPACE' spaces fi } # Output a selectable list of applications __cf_apps() { local -a apps=($(CF_COLOR=false CF_TRACE=false cf apps | awk 'NR>4{print $1}')) if (( $#apps )); then _describe 'APP' apps fi } # Output a selectable list of stacks __cf_stacks() { local -a stacks=($(CF_COLOR=false CF_TRACE=false cf stacks | awk 'NR>4{print $1}')) if (( $#stacks )); then _describe 'STACK' stacks fi } # Output a selectable list of services __cf_marketplace_services() { local -a market_places=($(CF_COLOR=false CF_TRACE=false cf marketplace | awk 'NR>4{print $1}')) if (( $#market_places )); then _describe 'SERVICE' market_places fi } # Output a selectable list of services __cf_services() { local -a services=($(CF_COLOR=false CF_TRACE=false cf services | awk 'NR>4{print $1}')) if (( $#services )); then _describe 'SERVICE' services fi } # Output a selectable list of domains __cf_domains() { local -a domains=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v shared | awk 'NR>2{print $1}')) if (( $#domains )); then _describe 'DOMAIN' domains fi } # Output a selectable list of shared domains __cf_shared_domains() { local shared_domains=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v owned | awk 'NR>2{print $1}')) if (( $#shared_domains )); then _describe 'SHARED-DOMAIN' shared_domains fi } # Output a selectable list of hostnames __cf_hostnames() { local -a hostnames=($(CF_COLOR=false CF_TRACE=false cf routes | awk 'NR>3{print $2}')) if (( $#hostnames )); then _describe 'ROUTE' hostnames fi } # Output a selectable list of buildpacks __cf_buildpacks() { local -a build_packs=($(CF_COLOR=false CF_TRACE=false cf buildpacks | awk 'NR>3{print $1}')) if (( $#build_packs )); then _describe 'BUILDPACK' build_packs fi } # Output a selectable list of feature flags __cf_feature_flags() { local -a flags=($(CF_COLOR=false CF_TRACE=false cf feature-flags | awk 'NR>4{print $1}')) if (( $#flags )); then _describe 'FEATURE-FLAG' flags fi } # Output a selectable list of plugin repos __cf_repo_plugins() { local -a repo_plugins=($(CF_COLOR=false CF_TRACE=false cf list-plugin-repos | awk 'NR>3{print $1}')) if (( $#repo_plugins )); then _describe 'REPO-PLUGIN' repo_plugins fi } # Output a selectable list of plugins __cf_plugins() { local -a plugins=($(cf plugins | awk 'NR>4{print $1}')) if (( $#plugins )); then _describe 'PLUGIN' plugins fi } # Output a selectable list of targets (requires cf-targets plugin) __cf_targets() { local -a targets=($(cf targets | awk '{print $1}')) if (( $#targets )); then _describe 'TARGET' targets fi } # -------------------------- # ----- end Helper functions # -------------------------- # -------------- # ----- Commands # -------------- __cf_login() { _arguments \ '-a=[API endpoint (e.g. https://api.example.com)]:api endpoint:' \ '-u=[Username]:username:' \ '-p=[Password]:password:' \ '-o=[Organization]:organization name:__cf_orgs' \ '-s=[Space]:space name:__cf_spaces' \ '--sso[Use a one-time password to login]' \ '--skip-ssl-validation[Skip SSL validation]' } __cf_logout() { # no arguments } __cf_passwd() { _arguments \ '1:password:' } __cf_target() { _arguments \ '-o=[Organization]:organization name:__cf_orgs' \ '-s=[Space]:space name:__cf_spaces' } __cf_api() { _arguments \ '1:API url:' \ '--unset[Remove all api endpoint targeting]' \ '--skip-ssl-validation[Skip SSL validation]' } __cf_app() { _arguments \ '1:application name:__cf_apps' \ '--guid[Retrieve and display the given app guid. All other health and status output for the app is suppressed]' } __cf_push() { _arguments \ '1:application name:__cf_apps' \ '-b=[Custom buildpack by name (e.g. my-buildpack) or GIT URL or GIT BRANCH URL]:buildpack name:__cf_buildpacks' \ '-c=[Startup command, set to null to reset to default start command]:startup command:' \ '-d=[Domain (e.g. example.com)]:domain (e.g. example.com):__cf_domains' \ '-f=[Path to manifest]:file:_files:' \ '-i=[Number of instances]:number of instances:' \ '-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \ '-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \ '-n=[Hostname (e.g. my-subdomain)]:hostname (e.g. my-subdomain):' \ '-p=[Path to app directory or to a zip file of the contents of the app directory]:file:_files' \ '-s=[Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)]:stack name:__cf_stacks:' \ '-t=[Maximum time (in seconds) for CLI to wait for application start, other server side timeouts may apply]:maximum time (in seconds):' \ '--no-hostname[Map the root domain to this app]' \ '--no-manifest[Ignore manifest file]' \ '--no-route[Do not map a route to this app and remove routes from previous pushes of this app]' \ '--no-start[Do not start an app after pushing]' \ '--random-route[Create a random route for this app]' } __cf_scale() { _arguments \ '1:application name:__cf_apps' \ '-i=[Number of instances]:number of instances:' \ '-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \ '-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \ '-f[Force restart of app without prompt]' } __cf_delete() { _arguments \ '1:application name:__cf_apps' \ '--f[Force deletion without confirmation]' \ '--r[Also delete any mapped routes]' } __cf_rename() { _arguments \ '1:application name:__cf_apps' \ '2:application name:' } __cf_start() { _arguments \ '1:application name:__cf_apps' } __cf_stop() { _arguments \ '1:application name:__cf_apps' } __cf_restart() { _arguments \ '1:application name:__cf_apps' } __cf_restage() { _arguments \ '1:application name:__cf_apps' } __cf_restart-app-instance() { _arguments \ '1:application name:__cf_apps' \ '2:application index:' } __cf_events() { _arguments \ '1:application name:__cf_apps' } __cf_files() { _arguments \ '1:application name:__cf_apps' \ '2::path:' \ '-i=[instance]' } __cf_logs() { _arguments \ '1:application name:__cf_apps' \ '--recent[Dump recent logs instead of tailing]' } __cf_env() { _arguments \ '1:application name:__cf_apps' } __cf_set-env() { _arguments \ '1:application name:__cf_apps' \ '2:env var name:' \ '3:env var value:' } __cf_unset-env() { _arguments \ '1:application name:__cf_apps' \ '2:env var name:' } __cf_stack() { _arguments \ '1:stack name:__cf_stacks' \ '--guid[Retrieve and display the given stack guid. All other output for the stack is suppressed]' } __cf_copy-source() { _arguments \ '1:source application name:__cf_apps' \ '2:target application name:' \ '-o=[Org that contains the target application]:organization name:__cf_orgs' \ '-s=[Space that contains the target application]:space name:__cf_spaces' \ '--no-restart[Override restart of the application in target environment after copy-source completes]' } __cf_create-app-manifest() { _arguments \ '1:application name:__cf_apps' \ '-p=[Specify a path for file creation. If path not specified, manifest file is created in current working directory]:path:_files' } __cf_marketplace() { _arguments \ '-s=[Show plan details for a particular service offering]' } __cf_service() { _arguments \ '1:service name:__cf_services' \ '--guid[Retrieve and display the given service guid. All other output for the service is suppressed]' } __cf_create-service() { _arguments \ '1:service:__cf_marketplace_services' \ '2:plan:' \ '3:service name:' \ '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \ '-t=[User provided tags]' } __cf_update-service() { _arguments \ '1:service name:__cf_services' \ '-p=[Change service plan for a service instance]' \ '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \ '-t=[User provided tags]' } __cf_rename-service() { _arguments \ '1:service name:__cf_services' \ '2:service name:' } __cf_delete-service() { _arguments \ '1:service name:__cf_services' \ '-f[Force deletion without confirmation]' } __cf_create-service-key() { _arguments \ '1:service name:__cf_services' \ '2:service key:' \ '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' } __cf_service-keys() { _arguments \ '1:service name:__cf_services' } __cf_service-key() { _arguments \ '1:service name:__cf_services' \ '2:service key:' } __cf_delete-service-key() { _arguments \ '1:service name:__cf_services' \ '2:service key:' \ '-f[Force deletion without confirmation]' } __cf_bind-service() { _arguments \ '1:application name:__cf_apps' \ '2:service name:__cf_services' \ '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' } __cf_unbind-service() { _arguments \ '1:application name:__cf_apps' \ '2:service name:__cf_services' } __cf_create-user-provided-service() { _arguments \ '1:service name:' \ '-p=[Credentials]' \ '-l=[Syslog Drain Url]' } __cf_update-user-provided-service() { _arguments \ '1:service name:__cf_services' \ '-p=[Credentials]' \ '-l=[Syslog Drain Url]' } __cf_org() { _arguments \ '1:organization name:__cf_orgs' \ '--guid[Retrieve and display the given org guid. All other output for the org is suppressed]' } __cf_create-org() { _arguments \ '1:organization name:' \ '-q=[Quota to assign to the newly created org (excluding this option results in assignment of default quota)]' } __cf_delete-org() { _arguments \ '1:organization name:__cf_orgs' \ '-f[Force deletion without confirmation]' } __cf_space() { _arguments \ '1:space name:__cf_spaces' \ '--guid[Retrieve and display the given space guid. All other output for the space is suppressed]' \ '--security-group-rules[Retrieve the rules for all the security groups associated with the space]' } __cf_create-space() { _arguments \ '1:space name:' \ '-o=[Org that contains the target application]:organization name:__cf_orgs' \ '-q=[Quota to assign to the newly created space (excluding this option results in assignment of default quota)]' } __cf_delete-space() { _arguments \ '1:space name:__cf_spaces' \ '-f[Force deletion without confirmation]' } __cf_create-domain() { _arguments \ '1:organization name:__cf_orgs' \ '2:domain:' } __cf_delete-domain() { _arguments \ '1:domain:__cf_domains' \ '-f[Force deletion without confirmation]' } __cf_create-shared-domain() { _arguments \ '1:domain:' } __cf_delete-shared-domain() { _arguments \ '1:domain:__cf_shared_domains' \ '-f[Force deletion without confirmation]' } __cf_routes() { _arguments \ '--orglevel[List all the routes for all spaces of current organization]' } __cf_create-route() { _arguments \ '1:space name:__cf_spaces' \ '2:domain:__cf_domains' \ '-n=[Hostname]' } __cf_check-route() { _arguments \ '1:hostname:__cf_hostnames' \ '2:domain:__cf_domains' } __cf_map-route() { _arguments \ '1:application name:__cf_apps' \ '2:domain:__cf_domains' \ '-n=[Hostname]:hostname:__cf_hostnames:' } __cf_unmap-route() { _arguments \ '1:application name:__cf_apps' \ '2:domain:__cf_domains' \ '-n=[Hostname]:hostname:__cf_hostnames:' } __cf_delete-route() { _arguments \ '1:domain:__cf_domains' \ '-n=[Hostname]:hostname:__cf_hostnames:' \ '-f[Force deletion without confirmation]' } __cf_delete-orphaned-routes() { _arguments \ '-f[Force deletion without confirmation]' } __cf_create-buildpack() { _arguments \ '1:buildpack name:' \ '2:path:_files' \ '3:position:' \ '--enable[Enable the buildpack to be used for staging]' \ '--disable[Disable the buildpack from being used for staging]' } __cf_update-buildpack() { _arguments \ '1:buildpack name:__cf_buildpacks' \ '-p=[Path to directory or zip file]:file:_files' \ '-i=[The order in which the buildpacks are checked during buildpack auto-detection]' \ '--enable[Enable the buildpack to be used for staging]' \ '--disable[Disable the buildpack from being used for staging]' \ '--lock[Lock the buildpack to prevent updates]' \ '--unlock[Unlock the buildpack to enable updates]' } __cf_rename-buildpack() { _arguments \ '1:buildpack name:__cf_buildpacks' \ '2:new buildpack name:' } __cf_delete-buildpack() { _arguments \ '1:buildpack name:__cf_buildpacks' \ '-f[Force deletion without confirmation]' } __cf_feature-flag() { _arguments \ '1:feature name:__cf_feature_flags' } __cf_enable-feature-flag() { _arguments \ '1:feature name:__cf_feature_flags' } __cf_disable-feature-flag() { _arguments \ '1:feature name:__cf_feature_flags' } __cf_curl() { _arguments \ '1:path:' \ '-i[Include response headers in the output]' \ '-v[Enable CF_TRACE output for all requests and responses]' \ '-X=[HTTP method]:http method:(GET POST PUT DELETE)' \ '-h=[Custom headers to include in the request, flag can be specified multiple times]' \ '-d=[HTTP data to include in the request body]' \ '--output[Write curl body to FILE instead of stdout]' } __cf_config() { _arguments \ '--async-timeout=[Timeout for async HTTP requests]' \ '--trace=[Trace HTTP requests]:trace:(true false)' \ '--color=[Enable or disable color]:color:(true false)' \ '--locale=[Set default locale. If LOCALE is CLEAR, previous locale is deleted]' } __cf_add-plugin-repo() { _arguments \ '1:repo name:' \ '2:url:' } __cf_remove-plugin-repo() { _arguments \ '1:repo name:__cf_repo_plugins' \ '2:url:' } __cf_repo-plugins() { _arguments \ '-r=[Repo Name]:repo name:__cf_repo_plugins' } __cf_plugins() { _arguments \ '-checksum[Compute and show the sha1 value of the plugin binary file]' } __cf_install-plugin() { _arguments \ '1:plugin URL or path:_files' \ '-r=[repo name where the plugin binary is located]:repo name:__cf_repo_plugins' } __cf_uninstall-plugin() { _arguments \ '1:plugin name:__cf_plugins' } __cf_save-target() { _arguments \ '1:target-name:' \ '-f[Force save even if current target is already saved under another name]' } __cf_set-target() { _arguments \ '1:target-name:__cf_targets' \ '-f[Force target change even if current target is unsaved]' } __cf_delete-target() { _arguments \ '1:target-name:__cf_targets' } # ------------------ # ----- end Commands # ------------------ _cf "$@" # 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 ================================================ FILE: src/_chatblade ================================================ #compdef chatblade # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for chatblade 0.7.0 (https://github.com/npiv/chatblade) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Johannes Bittner (https://github.com/johannes87) # # ------------------------------------------------------------------------------ _chatblade() { local -a args local context state state_descr line typeset -A opt_args args+=( '(- *)'{-h,--help}'[show this help message and exit]' '(- *)--version[display the chatblade version]' '--openai-api-key[the OpenAI API key can also be set as env variable OPENAI_API_KEY]:key' '--openai-base-url[a custom URL to use the openAI against a local or custom model]:key' '--temperature[temperature (openai setting)]:temperature' '(-c --chat-gpt)'{-c,--chat-gpt}'[chat GPT model 3.5/4 shorthand or full qualified model name, can also be set via env variable OPENAI_API_MODEL]:chat GPT model:(3.5 4 4o mini o1 o1mini)' '(-i --interactive)'{-i,--interactive}'[start an interactive chat session. This will implicitly continue the conversation]' '(-s --stream)'{-s,--stream}'[Stream the incoming text to the terminal]' '(-t --tokens)'{-t,--tokens}'[display what *would* be sent, how many tokens, and estimated costs]' '(-p --prompt-file)'{-p,--prompt-file}'[prompt name - will load the prompt with that name at ~/.config/chatblade/name or a path to a file]:prompt file:_files' '(-e --extract)'{-e,--extract}'[extract content from response if possible (either json or code block)]' '(-r --raw)'{-r,--raw}'[print session as pure text, dont pretty print or format]' '(-n --no-format)'{-n,--no-format}'[do not add pretty print formatting to output]' '(-o --only)'{-o,--only}'[Only display the response, omit query]' '--theme[Set the theme for syntax highlighting see https://pygments.org/styles/, can also be set with CHATBLADE_THEME]:theme:_values "theme" default emacs friendly manni monokai' '(-l --last)'{-l,--last}'[alias for -S last, the default session if none is specified]' '(-S --session)'{-S,--session}'[initiate or continue named session]:session:->sessions' '--session-list[list sessions]' '--session-path[show path to session file]' '--session-dump[dump session to stdout]' '--session-delete[delete session]' '--session-rename[rename session]:new session:->sessions' ) _arguments -s $args case $state in (sessions) local -a sessions sessions=("${(@f)$(chatblade --session-list)}") _describe 'session' sessions ;; esac } _chatblade # 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 ================================================ FILE: src/_chcpu ================================================ #compdef chcpu # ------------------------------------------------------------------------------ # 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 chcpu v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu_list' \ '(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu_list' \ '(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu_list' \ '(-g --deconfigure)'{-g,--deconfigure}'[deconfigure the specified CPUs]:cpu_list' \ '(-p --dispatch)'{-p,--dispatch}'[set the CPU dispatching mode]:mode:(horizontal vertical)' \ '(-r --rescan)'{-r,--rescan}'[trigger a rescan of CPUs]' # 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 ================================================ FILE: src/_chmem ================================================ #compdef chmem # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 chmem, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - configure memory # # Author: # *Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments -s \ '(-b --blocks)'{-b,--blocks}'[Use a BLOCKRANGE parameter instead of RANGE or SIZE]' \ '(-d --disable)'{-d,--disable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline]' \ '(-e --enable)'{-e,--enable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory online]' \ '(-z --zone)'{-z,--zone}'[Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline]' \ '(-v --verbose)'{-v,--verbose}'[Verbose mode]' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' # 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 ================================================ FILE: src/_choc ================================================ #compdef choc # ------------------------------------------------------------------------------ # Copyright (c) 2012 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 choc (https://chocolatapp.com/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Nicholas Penree (https://github.com/drudge) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line ret=1 typeset -A opt_args _arguments -C \ '(-a --async)'{-a,--async}'[do not wait for the user to close the file in Chocolat]' \ '(-w --wait)'{-w,--wait}'[wait for file to be closed by Chocolat]' \ '(-n --no-reactivation)'{-n,--no-reactivation}'[after editing with -w, do not reactivate the calling app]' \ '(-h --help)'{-h,--help}'[show help information]' \ '(-v --version)'{-v,--version}'[print version information]' \ '*:script or directory:_files' && ret=0 return ret # 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 ================================================ FILE: src/_chpasswd ================================================ #compdef chpasswd # ------------------------------------------------------------------------------ # 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 chpasswd v4.17 (https://github.com/shadow-maint/shadow) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(-c --crypt-method)'{-c,--crypt-method}'[use the specified method to encrypt the passwords]:method:(DES MD5 SHA256 SHA512 YESCRYPT NONE)' \ '(-e --encrypted)'{-e,--encrypted}'[supplied passwords are in encrypted form]' \ '(-m --md5)'{-m,--md5}'[use MD5 encryption instead of DES]' \ '(-R --root)'{-R,--root}'[apply changes in the specified CHROOT_DIR directory]:dir:_files -/' \ '(-P --prefix)'{-P,--prefix}'[apply changes to configuration files under the specified directory PREFIX_DIR]:dir:_files -/' \ '(-s --sha-rounds)'{-s,--sha-rounds}'[use the specified number of rounds to encrypt the passwords]:rounds' # 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 ================================================ FILE: src/_chromium ================================================ #compdef chromium # Copyright 2018 CERN for the benefit of the LHCb Collaboration # 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 CERN 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 THE COPYRIGHT # OWNER OR CONTRIBUTORS 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. # # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. _arguments \ "--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \ "--app=[Runs URL in app mode]:url:_urls" \ "--incognito[Open in incognito mode]" \ "--new-window[open in new window]" \ "(--no-proxy-server --proxy-auto-detect --proxy-pac-url)--proxy-server=[specify proxy server]:[\://][\:]:_chromium_proxyurls" \ "--no-proxy-server[Disables the proxy server]" \ "--proxy-auto-detect[Autodetect proxy configuration]" \ "--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \ "--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \ "--version[print version]" \ '*:: :{ _alternative "urls\:url\:_urls" "file\:file\:_files" }' # excerpt from the chromium help message: # # Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests. This overrides any environment variables or settings picked via the options dialog. An individual proxy server is specified # using the format: # # # # Where is the protocol of the proxy server, and is one of: # # "http", "socks", "socks4", "socks5". # # If the is omitted, it defaults to "http". Also note that "socks" is equivalent to "socks5". # # Examples: # # --proxy-server="foopy:99" # Use the HTTP proxy "foopy:99" to load all URLs. # # --proxy-server="socks://foobar:1080" # Use the SOCKS v5 proxy "foobar:1080" to load all URLs. # # --proxy-server="socks4://foobar:1080" # Use the SOCKS v4 proxy "foobar:1080" to load all URLs. # # --proxy-server="socks5://foobar:66" # Use the SOCKS v5 proxy "foobar:66" to load all URLs. # # It is also possible to specify a separate proxy server for different URL types, by prefixing the proxy server specifier with a URL specifier: # # Example: # # --proxy-server="https=proxy1:80;http=socks4://baz:1080" # Load https://* URLs using the HTTP proxy "proxy1:80". And load http://* # URLs using the SOCKS v4 proxy "baz:1080". # _chromium_proxyurls () { #TODO: semicolon separated urls not yet implemented # mostly copied from _urls local ipre scheme host user uhosts ret=1 expl match glob suf local localhttp zstyle -a ":completion:${curcontext}:urls" local localhttp local localhttp_servername="$localhttp[1]" local localhttp_documentroot="$localhttp[2]" local localhttp_userdir="$localhttp[3]" zstyle -a ":completion:${curcontext}:urls" urls urls if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]] then [[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1])) _wanted urls expl 'URL' compadd "$@" -a urls && return 0 urls=() fi urls="$urls[1]" glob=(-g '*(^/)') zparseopts -D -K -E 'g:=glob' ipre="$IPREFIX" if ! compset -P '(#b)([-+.a-z0-9]#):' then _tags -C argument prefixes while _tags do while _next_label prefixes expl 'URL prefix' -S '' "$@" do compset -S '[^:/]*' && compstate[to_end]='' compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0 done (( ret )) || return 0 done return 1 fi scheme="$match[1]" case "$scheme" in (http(|s)|socks(|4|5)) if ! compset -P // then _wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" // return fi ;; (file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)' [[ -prefix /// ]] && compset -P // if ! compset -P // then _tags -C file files while _tags do while _next_label files expl 'local file' do if [[ -prefix / ]] then _path_files "$expl[@]" -S '' "${glob[@]}" && ret=0 _path_files "$expl[@]" -S/ -r '/' -/ && ret=0 elif [[ -z "$PREFIX" ]] then compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0 fi done (( ret )) || return 0 done return 1 fi ;; esac if ! compset -P '(#b)([^:/]#)([:/])' then uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t)) _tags hosts while _tags do while _next_label hosts expl host do compset -S '[:/]*' || suf="/" (( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0 [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0 done (( ret )) || return 0 done return 1 fi host="$match[1]" [[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0 _tags remote-files files || return 1 if [[ "$localhttp_servername" = "$host" ]] then if compset -P \~ then if ! compset -P '(#b)([^/]#)/' then _users -S/ "$@" return fi user="$match[1]" while _tags do while _next_label files expl 'local file' do _path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0 _path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0 done (( ret )) || return 0 done else while _tags do while _next_label files expl 'local file' do _path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0 done (( ret )) || return 0 done fi else while _tags do (( $#urls )) && while _next_label files expl 'local file' do _path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0 done [[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0 (( ret )) || return 0 done fi return $ret } # 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 ================================================ FILE: src/_clang-check ================================================ #compdef clang-check # ------------------------------------------------------------------------------ # Copyright (c) 2022 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 clang-check v20.1.2 (https://clang.llvm.org/docs/ClangCheck.html) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)--help[Display available options]' \ '(- *)--help-hidden[Display available more options]' \ '(- *)--help-list[Display list of available options]' \ '(- *)--help-list-hidden[Display list of more available options]' \ '(- *)--version[Display the version of this program]' \ '--analyze[Run static analysis engine]' \ '--analyzer-output-path=[Write output to file]: :_files' \ '--ast-dump[Build ASTs and then debug dump them]' \ '--ast-dump-filter=[Use with -ast-dump or -ast-print to dump/print only AST declaration nodes having a certain substring]:string' \ '--ast-list[Build ASTs and print the list of declaration node qualified names]' \ '--ast-print[Build ASTs and then pretty-print them]' \ '*--extra-arg=[Additional argument to append to the compiler command line]:arg' \ '*--extra-arg-before=[Additional argument to prepend to the compiler command line]:arg' \ '--fix-what-you-can[Apply fix-it advice even in the presence of unfixable errors]' \ '--fixit[Apply fix-it advice to the input source]' \ '-p[Build directory where compile_commands.json is]: :_files -/' \ '--print-all-options[Print all option values after command line parsing]' \ '--print-options[Print non-default options after command line parsing]' \ '--syntax-tree-dump[dump the syntax tree]' \ '--tokens-dump[dump the preprocessed tokens]' \ '*: :_files' # 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 ================================================ FILE: src/_clang-format ================================================ #compdef clang-format # ------------------------------------------------------------------------------ # Copyright (c) 2022 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 clang-format v20.1.2 (https://clang.llvm.org/docs/ClangFormat.html) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ local -a styles=(LLVM GNU Google Chromium Microsoft) _arguments \ '(- *)--help[Display available options]' \ '(- *)--help-hidden[Display available more options]' \ '(- *)--help-list[Display list of available options]' \ '(- *)--help-list-hidden[Display list of more available options]' \ '--Wclang-format-violations[Warnings about individual formatting changes needed]' \ '--Werror=[If set, changes formatting warnings to errors]' \ '*--Wno-error=[If set, do not error out on the specified warning type]:warn' \ '--assume-filename=[Set filename used to determine the language and to find .clang-format file]: :_files' \ '--cursor=[The position of the cursor when invoking clang-format from an editor integration]:pos' \ '(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \ '--dump-config[Dump configuration options to stdout and exit]' \ '--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)' \ '--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' \ '--fno-color-diagnostics[If set, not to print diagnostics in color]' \ '-i[Inplace edit files, if specified]' \ '--length=[Format a range of this length(in bytes)]:bytes' \ '--lines=[format a range of lines]:format' \ '--list-ignored[List ignored files]' \ '--offset=[Format a range starting at this byte offset]' \ '--output-replacements-xml[Output replacements as XML]' \ '--print-all-options[Print all option values 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]' \ '--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \ '--style=[Set coding style]: :($styles)' \ '--verbose[If set, show the list of processed files]' \ '(- *)--version[Display the version of this program]' \ '*: :_files' # 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 ================================================ FILE: src/_clang-tidy ================================================ #compdef clang-tidy # ------------------------------------------------------------------------------ # Copyright (c) 2022 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 clang-tidy v15.0.2 (https://clang.llvm.org/extra/clang-tidy/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ local -a styles=(LLVM GNU Google Chromium Microsoft) _arguments \ '(- *)--help[Display available options]' \ '(- *)--help-hidden[Display available more options]' \ '(- *)--help-list[Display list of available options]' \ '(- *)--help-list-hidden[Display list of more available options]' \ '--allow-no-checks[Allow empty enabled checks]' \ '--checks=[Comma-separated list of globs with optional "-" prefix]:checks' \ '--config=[Specifies a configuration in YAML/JSON format]:conf' \ '--config-file=[Specify the path of .clang-tidy or custom config-file]: :_files' \ '--dump-config[Dumps configuration in the YAML format to stdout]' \ '--enable-check-profile[Enable per-check timing profiles, and print a report to stderr]' \ '--enable-module-headers-parsing[Enable preprocessor-level module header parsing for C++20 and above]' \ '--exclude-header-filter=[Regular expression of headers to exclude diagnostics from]:filter' \ '--explain-config[For each enabled check explains, where it is enabled]' \ '--export-fixes=[YAML file to store suggested fixes in]: :_files' \ '*--extra-arg[Additional argument to append to the compiler command line]:arg' \ '*--extra-arg-before[Additional argument to prepend to the compiler command line]:arg' \ '--fix[Apply suggested fixes]' \ '--fix-errors[Apply suggested fixes even if compilation errors were found]' \ '--fix-notes[If a warning has no fix, but a single fix can be found through an associated diagnostic node, apply the fix]' \ '--format-style=[Style for formatting code around applied fixes]: :(none file llvm google webkit mozilla)' \ '--header-filter=[Regular expression matching the names of the headers to output diagnostics from]:regexp' \ '--line-filter=[List of files with line ranges to filter the warnings]' \ '(- *)--list-checks[List all enabled checks and exit]' \ '--load=[Load the specified plugin]: :_files' \ '-p[Build directory where compile_commands.json is]: :_files -/' \ '--print-all-options[Print all option values after command line parsing]' \ '--print-options[Print non default options after command line parsing]' \ '--quiet[Run clang-tidy in quiet mode]' \ '--store-check-profile=[These per-TU profiles are instead stored as JSON]:prefix' \ '--system-headers[Display the errors from system headers]' \ '--use-color[Use colors in diagnostics]' \ '(- *)--version[Display the version of this program]' \ '--verify-config[Check the config files to ensure each check and option is recognized]' \ '--vfsoverlay=[Overlay the virtual filesystem described by file over the real file system]: :_files' \ '--warnings-as-errors=[Upgrades warning to errors]:check' \ '*: :_files' # 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 ================================================ FILE: src/_cmake ================================================ #compdef cmake -value-,CMAKE_GENERATOR,-default- # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 CMake 3.31.0 (https://cmake.org). # # ------------------------------------------------------------------------- # Authors # ------- # # * Scott M. Kroll (initial version) # * Paul Seyfert (handling of --build and updates) # * Norbert Lange (presets, command mode, updates) # # ------------------------------------------------------------------------- # Notes # ----- # # * By default only C and C++ languages are supported for compiler flag # variables. To define your own list of languages: # # cmake_langs=('C' 'C' # 'CXX' 'C++') # zstyle ':completion:*:cmake:*' languages $cmake_langs # # ------------------------------------------------------------------------- local -a cmake_build_options=( '-S[Explicitly specify a source directory]:source directory:_path_files -/' '-B[Explicitly specify a build directory]:build directory:_path_files -/' '-C[Pre-load a script to populate the cache]:initial cache:_files' '*-D-[Create a cmake cache entry]:property:_cmake_define_property' '*-U[Remove matching entries from CMake cache]:globbing expression' '-G[Specify a makefile generator]:generator:_cmake_generators' '-T[Specify toolset name if supported by generator]:toolset name' '-A[Specify platform name if supported by generator]:platform name' '--toolchain[Specify toolchain file]: :_files' '--install-prefix[Specify install directory]: :_path_files -/' # Warnings '(-Wdev)-Wno-dev[Suppress/Enable developer warnings]' '(-Wno-dev)-Wdev[Suppress/Enable developer warnings]' '(-Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]' '(-Wno-deprecated)-Wdeprecated[Suppress/Enable deprecation warnings]' '(-Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]' '(-Wno-error=dev)-Werror=dev[Make developer warnings (not) errors]' '(-Wno-error=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]' '(-Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]' '--preset=[Specify a configure preset]:preset:_cmake_presets' '--list-presets[List available presets]' '--workflow[Run a workflow preset]' '-E[CMake command mode]:command:_cmake_commands' '-L-[List cache variables]::_values "options" "[non-advanced cache variables]" "A[advanced cache variables]" "H[non-advanced cached variables with help]" "AH[advanced cache variables with help]"' '--fresh[Configure a fresh build tree, removing any existing cache file]' '--build[Build a CMake-generated project binary tree]::project directory:_path_files -/' '--install[Install a CMake-generated project binary tree]:project directory:_path_files -/' '--open[Open generated project in the associated application]:project directory:_path_files -/' '-N[View mode only]' '-P[Process script mode]:script:_files' '--find-package[Legacy pkg-config like mode. Do not use]' '--graphviz=[Generate graphviz of dependencies, see CMakeGraphVizOptions.cmake for more]:graphviz output:_files' '--system-information[Dump information about this system]::system information output:_files' '--print-config-dir[Print CMake config directory for user-wide FileAPI queries]' '--log-level=[Set the verbosity of messages from CMake files]:log level:(ERROR WARNING NOTICE STATUS VERBOSE DEBUG TRACE)' '--log-context[Prepend log messages with context, if given]' '--debug-trycompile[Do not delete the try_compile build tree. Only useful on one try_compile at a time]' '--debug-output[Put cmake in a debug mode]' '--debug-find[Put cmake find in a debug mode]' '--debug-find-pkg=[Limit cmake debug-find to the comma-separated list of packages]:packages' '--debug-find-var=[Limit cmake debug-find to the comma-separated list of result variables]:variables' '(--trace-expand)--trace[Put cmake in trace mode]' '(--trace)--trace-expand[Put cmake in trace mode with variable expansion]' '--trace-format=[Set the output format of the trace]:trace format:(human json-v1)' '*--trace-source[Trace only this CMake file/module. Multiple options allowed]:filename:_files' '--trace-redirect[Redirect trace output to a file instead of stderr]:trace output:_files' '--warn-uninitialized[Warn about uninitialized values]' '--no-warn-unused-cli[Do not warn about command line options]' '--warn-unused-vars[Warn about unused variables]' '--check-system-vars[Find problems with variable usage in system files]' '--compile-no-warning-as-error[Ignore COMPILE_WARNING_AS_ERROR property and CMAKE_COMPILE_WARNING_AS_ERROR variable]' '--profiling-format[Output data for profiling CMake scripts]:profiling format:(google-trace)' '--profiling-output[Select an output path for the profiling data]:filename:_files' ':cmake project:_path_files -/' ) # ------------------------ # _cmake_generator_options # # arguments are $1: build working directory (top level Makefile or build.ninja file) # $2: position of "--" in the command line # ------------------------ (( $+functions[_cmake_generator_options] )) || _cmake_generator_options() { # pass only the part of the command line starting at "--" to the completion shift (( $2 - 1 )) words (( CURRENT = $CURRENT + 1 - $2 )) if [ -f $1/Makefile ] then $_comps[make] elif [ -f $1/build.ninja ] then $_comps[ninja] fi } # -------------- # _cmake_presets # -------------- (( $+functions[_cmake_presets] )) || _cmake_presets() { local invoke=(${(Q)words}) invoke[$CURRENT]=() # TODO: remove all arguments -* except -S local list_presets=(${(f)"$(${invoke} --list-presets 2>/dev/null | sed -n -e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*-[[:space:]]*\(.*\),\1:\2,p' \ -e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*$,\1,p')"}) _describe 'presets' list_presets } # -------------- # _cmake_targets # -------------- (( $+functions[_cmake_targets] )) || _cmake_targets() { local dir="$1" local -a targets=() if [[ -f "${dir}/Makefile" && $+commands[make] ]]; then # `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does. targets=(${(f)"$(make -f $dir/Makefile help 2>/dev/null | awk '/^\.\.\./ { print $2 }')"}) elif [[ -f "${dir}/build.ninja" && $+commands[ninja] ]]; then # `ninja help` doesn't seem to be the list of targets we're interested in targets=(${(f)"$(ninja -C $dir -t targets all 2>/dev/null | awk -F: '{print $1}' )"}) fi _describe 'build targets' targets } _cmake_suggest_builddirs() { _alternative ':current directory:(.)' 'directory::_directories' && return 0 } _cmake_suggest_installdirs() { _alternative ':current directory:(.)' 'directory::_directories' && return 0 } _cmake_on_build() { local build_extras=( '--[Native build tool options]' '--target[specify build target]' '--clean-first[build target clean first]' '--config[For multi-configuration tools]' '--parallel[maximum number of build processes]' '--use-stderr' ) local -a undescribed_build_extras local i=1 for be in $build_extras ; do undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//") (( i++ )) done local in_build=false local dash_dash_position=-1 local build_at=$CURRENT for ((i = (($CURRENT - 1)); i > 1 ; i--)); do if [[ $words[$i] == --build ]]; then in_build=true build_at=$i (( difference = $CURRENT - $i )) elif [[ $words[$i] == -- ]]; then dash_dash_position=$i fi done # check if build mode has been left local out_of_build=false for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do # don't check the word after --build (should be a directory) if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]]; then continue fi if [[ $words[(($i - 1))] == --target ]]; then continue ; fi if [[ $words[(($i - 1))] == --config ]]; then continue ; fi if [[ $words[(($i - 1))] == --parallel ]] ; then continue ; fi out_of_build=true done if (( $dash_dash_position > 0 )) ; then _cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0 fi if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then # either there is no --build or completing the directory after --build _arguments -s \ - build_opts \ "$cmake_build_options[@]" \ - build_cmds \ "$cmake_suggest_build[@]" && return 0 elif [[ $words[(($CURRENT - 1))] == --target ]] ; then # after --build --target, suggest targets _cmake_targets $words[(($build_at + 1))] && return 0 elif [[ $words[(($CURRENT - 1))] == --config ]] ; then # after --build --config, no idea return 0 elif [[ $words[(($CURRENT - 1))] == --parallel ]] ; then # after --build --parallel return 0 elif [ "$out_of_build" = true ] ; then # after --build --, suggest other cmake_build_options (like -Wno-dev) _arguments "$cmake_build_options[@]" && return 0 else # after --build , suggest other cmake_build_options (like -Wno-dev) or --build options (like --clean-first) _arguments "$build_extras[@]" "$cmake_build_options[@]" && return 0 fi } _cmake_on_install() { local build_extras=( '--[Native build tool options]' '--prefix[Override the installation prefix, CMAKE_INSTALL_PREFIX]' '--config[For multi-configuration generators(e.g. Visual Studio)]' '--component[Component-based install]' '--strip[Strip before installing.]' ) local -a undescribed_build_extras local i=1 for be in $build_extras ; do undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//") (( i++ )) done local in_build=false local dash_dash_position=-1 local build_at=$CURRENT for ((i = (($CURRENT - 1)); i > 1 ; i--)); do if [[ $words[$i] == --install ]]; then in_build=true build_at=$i (( difference = $CURRENT - $i )) elif [[ $words[$i] == -- ]]; then dash_dash_position=$i fi done local out_of_build=false for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do # don't check the word after --install (should be a directory) if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi if [[ $words[(($i - 1))] == --prefix ]]; then continue ; fi if [[ $words[(($i - 1))] == --config ]]; then continue ; fi if [[ $words[(($i - 1))] == --component ]]; then continue ; fi out_of_build=true done if (( $dash_dash_position > 0 )) ; then _cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0 fi if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then # either there is no --install or completing the directory after --install _arguments -s \ - build_opts \ "$cmake_build_options[@]" \ - build_cmds \ "$cmake_suggest_install[@]" && return 0 elif [[ $words[(($CURRENT - 1))] == --prefix ]] ; then # after --install --prefix, no idea return 0 elif [[ $words[(($CURRENT - 1))] == --config ]] ; then # after --install --config, no idea return 0 elif [[ $words[(($CURRENT - 1))] == --component ]] ; then # after --build --component, no idea return 0 elif [ "$out_of_build" = true ] ; then # after --build --, suggest other cmake_build_options (like -Wno-dev) _arguments "$cmake_build_options[@]" && return 0 else # after --build , suggest other cmake_build_options (like -Wno-dev) or --build options (like --clean-first) _arguments "$build_extras[@]" "$cmake_build_options[@]" && return 0 fi } local -a cmake_help_actions=( '(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]' '(- 1)'{--version,-version}'[Print version number and exit]' '(- 1)--help-full[Print all help manuals and exit]' '(- 1)--help-manual[Print one help manual and exit]:module-name: _cmake_list_names --help-manual-list "manual name"' '(- 1)--help-manual-list[List help manuals available and exit]' '(- 1)--help-command[Print help for one command and exit]:command-name: _cmake_list_names --help-command-list "command name"' '(- 1)--help-command-list[List commands with help available and exit]' '(- 1)--help-commands[Print cmake-commands manual and exit]' '(- 1)--help-module[Print help for one module and exit]:module-name: _cmake_list_names --help-module-list "module name"' '(- 1)--help-module-list[List modules with help available and exit]' '(- 1)--help-modules[Print cmake-modules manual and exit]' '(- 1)--help-policy[Print help for one policy and exit]:policy-name: _cmake_list_names --help-policy-list "policy name"' '(- 1)--help-policy-list[List policies with help available and exit]' '(- 1)--help-policies[Print cmake-policies manual and exit]' '(- 1)--help-property[Print help for one property and exit]:property-name: _cmake_list_names --help-property-list "property name" brakremove' '(- 1)--help-property-list[List properties with help available and exit]' '(- 1)--help-properties[Print cmake-properties manual and exit]' '(- 1)--help-variable[Print help for one variable and exit]:variable-name: _cmake_list_names --help-variable-list "variable name" brakremove' '(- 1)--help-variable-list[List variables with help available and exit]' '(- 1)--help-variables[Print cmake-variables manual and exit]' ) # ----------------- # _cmake_list_names # ----------------- (( $+functions[_cmake_list_names] )) || _cmake_list_names() { local command="$@[1]" local desc="$@[2]" local opts=($@[3]) local list_names=(${(f)"$($service $command 2> /dev/null)"}) # Older CMake (< 3.0) writes out the version list_names=(${^list_names##cmake version*}) if [[ ${opts[(i)brakremove]} -le ${#opts} ]]; then list_names=(${^list_names//\[/\\\[}) list_names=(${^list_names//\]/\\\]}) fi _values ${desc} ${list_names[@]:-1} && return 0 } # ---------------------- # _cmake_define_property # ---------------------- (( $+functions[_cmake_define_property] )) || _cmake_define_property() { if compset -P '*='; then _wanted property-values expl 'property value' _cmake_define_property_values ${${IPREFIX%=}#-D} && return 0 else _wanted property-names expl 'property name' _cmake_define_property_names -qS= && return 0 fi } # ---------------------------- # _cmake_define_property_names # ---------------------------- (( $+functions[_cmake_define_property_names] )) || _cmake_define_property_names() { local alternatives=( 'common-property-names:common property name:_cmake_define_common_property_names -qS=' ) local -A cmake_langs zstyle -a ":completion:${curcontext}:" languages cmake_langs [[ $#cmake_langs -eq 0 ]] && cmake_langs=('C' 'C' 'CXX' 'C++') for cmake_lang in ${(k)cmake_langs}; do cmake_lang_desc="${cmake_langs[$cmake_lang]}" alternatives+=("${cmake_lang//:/-}-property-names:${cmake_lang_desc} language property name:_cmake_define_lang_property_names -qS= ${cmake_lang} ${cmake_lang_desc}") done _alternative "${alternatives[@]}" } # --------------------------------- # _cmake_define_lang_property_names # --------------------------------- (( $+functions[_cmake_define_lang_property_names] )) || _cmake_define_lang_property_names() { local cmake_lang="$@[-2]" local cmake_lang_desc="$@[-1]" local -a properties=( "CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler" "CMAKE_${cmake_lang}_COMPILER_LAUNCHER:${cmake_lang_desc} compiler launcher (e.g. ccache)" "CMAKE_${cmake_lang}_FLAGS:${cmake_lang_desc} compiler flags for all builds" "CMAKE_${cmake_lang}_FLAGS_DEBUG:${cmake_lang_desc} compiler flags for all Debug build" "CMAKE_${cmake_lang}_FLAGS_RELEASE:${cmake_lang_desc} compiler flags for all Release build" "CMAKE_${cmake_lang}_FLAGS_MINSIZREL:${cmake_lang_desc} compiler flags for all MinSizRel build" "CMAKE_${cmake_lang}_FLAGS_RELWITHDEBINFO:${cmake_lang_desc} compiler flags for all RelWithDebInfo build" "CMAKE_${cmake_lang}_STANDARD:${cmake_lang_desc} language standard" "CMAKE_${cmake_lang}_STANDARD_REQUIRED:${cmake_lang_desc} language standard is required" "CMAKE_${cmake_lang}_EXTENSIONS:${cmake_lang_desc} enable compiler specific extensions" ) _describe -t "${cmake_lang//:/-}-property-names" "${cmake_lang_desc} property name" properties $@[0,-3] && return 0 } # ----------------------------------- # _cmake_define_common_property_names # ----------------------------------- (( $+functions[_cmake_define_common_property_names] )) || _cmake_define_common_property_names() { local -a properties=( 'CMAKE_MODULE_PATH:Search path for CMake modules (FindPROJECT.cmake)' 'CMAKE_PREFIX_PATH:Search path for installations (PROJECTConfig.cmake)' 'CMAKE_BUILD_TYPE:Specifies the build type for make based generators' 'BUILD_SHARED_LIBS:Global flag to cause add_library() to create shared libraries if on' 'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a CMake script which sets up toolchain related variables' 'CMAKE_COLOR_MAKEFILE:Enables/disables color output when using the Makefile generator' 'CMAKE_INSTALL_PREFIX:Install directory used by install' 'CMAKE_EXPORT_COMPILE_COMMANDS:Enable/disable output of compilation database during generation' 'CMAKE_RULE_MESSAGES:Specify whether to report a message for each make rule' 'CMAKE_VERBOSE_MAKEFILE:Enable verbose output from Makefile builds' 'CMAKE_UNITY_BUILD:Batch include source files' ) _describe -t 'common-property-names' 'common property name' properties "$@" } # ---------------------------- # _cmake_define_property_values # ---------------------------- (( $+functions[_cmake_define_property_values] )) || _cmake_define_property_values() { local ret=1 local build_types=('Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel') local c_standards=(90 99 11 17 23) local cxx_standards=(98 11 14 17 20 23) setopt localoptions extendedglob case $@[-1] in (CMAKE_BUILD_TYPE) _wanted build-types expl 'build type' _values 'build type' ${build_types[@]} && ret=0 ;; (BUILD_SHARED_LIBS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_CXX_STANDARD) _wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${cxx_standards[@]} && ret=0 ;; (CMAKE_C_STANDARD) _wanted c-standards expl 'c standard' _values 'c standard' ${c_standards[@]} && ret=0 ;; (CMAKE_TOOLCHAIN_FILE) _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0 ;; (CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_RULE_MESSAGES) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_VERBOSE_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_UNITY_BUILD) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_INSTALL_PREFIX) _files -/ && ret=0 ;; (CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_*_COMPILER) _wanted compilers expl 'compiler' _cmake_compilers && ret=0 ;; (CMAKE_*_COMPILER_LAUNCHER) _wanted compilers expl 'compiler launcher' _cmake_launchers && ret=0 ;; (CMAKE_*_FLAGS(|_?*)) _message -e compiler-flags 'compiler flags' && _dispatch $service -value-,CPPFLAGS,-default- && ret=0 ;; (CMAKE_*_STANDARD_REQUIRED) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (CMAKE_*_EXTENSIONS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0 ;; (*) _files && ret=0 ;; esac return ret } # ----------------- # _cmake_generators # ----------------- (( $+functions[_cmake_generators] )) || _cmake_generators() { local -a generators=( ${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"} ) _describe -t generators 'generator' generators } # ---------------------- # _cmake_toolchain_files # ---------------------- (( $+functions[_cmake_toolchain_files] )) || _cmake_toolchain_files() { _files -g '*\.cmake*' } (( $+functions[_cmake_booleans] )) || _cmake_booleans() { _values booleans 'YES' 'NO' } # --------------- # _cmake_compilers # # by default just executable commands, but can be overridden by users. # --------------- (( $+functions[_cmake_compilers] )) || _cmake_compilers() { _command_names -e } # --------------- # _cmake_launchers # # by default just executable commands, but can be overridden by users. # useful commands might be ccache, distcc, ... # --------------- (( $+functions[_cmake_launchers] )) || _cmake_launchers() { _command_names -e } (( $+functions[_cmake_commands] )) || _cmake_commands() { local -a commands=( 'capabilities:Report capabilities built into cmake in JSON format' 'cat:concat the files and print them to the standard output' 'chdir:run command in a given directory' 'compare_files:check if file1 is same as file2' 'copy:copy files to destination (either file or directory)' 'copy_directory:copy content of ... directories to destination directory' 'copy_if_different:copy files if it has changed' 'echo:displays arguments as text' 'echo_append:displays arguments as text but no new line' 'env:run command in a modified environment' 'environment:display the current environment' 'make_directory:create parent and directories' 'md5sum:create MD5 checksum of files' 'sha1sum:create SHA1 checksum of files' 'sha224sum:create SHA224 checksum of files' 'sha256sum:create SHA256 checksum of files' 'sha384sum:create SHA384 checksum of files' 'sha512sum:create SHA512 checksum of files' 'remove:remove the file(s), use -f to force it' 'remove_directory:remove directories and their contents' 'rename:rename a file or directory (on one volume)' 'rm:remove files or directories' 'server:start cmake in server mode' 'sleep:sleep for given number of seconds' 'tar:create or extract a tar or zip archive' 'time:run command and display elapsed time' 'touch:touch a ' 'touch_nocreate:touch a but do not create it' 'create_symlink:create a symbolic link new -> old' 'create_hardlink:create a hard link new -> old' 'true:do nothing with an exit code of 0' 'false:do nothing with an exit code of 1' ) _describe -t commands 'command' commands } local -a cmake_suggest_build=( '--build[build]:build dir:_cmake_suggest_builddirs' ) local -a cmake_suggest_install=( '--install[install]:install dir:_cmake_suggest_installdirs' ) if [[ "$service" = -value-*CMAKE_GENERATOR* ]]; then _cmake_generators elif [ $CURRENT -eq 2 ] ; then _arguments -s \ - help \ "$cmake_help_actions[@]" \ - command \ '-E[CMake command mode]:command:_cmake_commands' \ - build_opts \ "$cmake_build_options[@]" \ - build_cmds \ "$cmake_suggest_build[@]" \ - install_cmds \ "$cmake_suggest_install[@]" && return 0 elif [[ $words[2] == --build ]] ; then _cmake_on_build elif [[ $words[2] == --install ]] ; then _cmake_on_install elif [[ $words[2] == --help-* ]] ; then _arguments "$cmake_help_actions[@]" else _arguments "$cmake_build_options[@]" fi # 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 ================================================ FILE: src/_coffee ================================================ #compdef coffee # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 Coffee.js v2.7.0 (https://coffeescript.org/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Mario Fernandez (https://github.com/sirech) # * Dong Weiming (https://github.com/dongweiming) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line ret=1 typeset -A opt_args _arguments -s -S \ '--ast[generate an abstract syntax tree of nodes]' \ '(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \ '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \ '(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \ '(- *)'{-h,--help}'[display this help message]' \ '(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \ '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]: :_files -g "*.coffee"' \ '(-l --literate)'{-l,--literate}'[treat stdio as literate style coffeescript]' \ '(-m --map)'{-m,--map}'[generate source map and save as .js.map files]' \ '(-M --inline-map)'{-M,--inline-map}'[generate source map and include it directly in output]' \ '(-n --nodes)'{-n,--nodes}'[print out the parse tree that the parser produces]' \ '--nodejs[pass options directly to the "node" binary]' \ '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]: :_files' \ '(-p --print --tokens)'{-p,--print}'[print out the compiled JavaScript]' \ '(-r --require)'\*{-r,--require}'[require the given module before eval or REPL]:module' \ '(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \ '(-t --transpile)'{-t,--transpile}'[pipe generated JavaScript through Babel]' \ '(-p --print --tokens)--tokens[print out the tokens that the lexer/rewriter produce]' \ '(- *)'{-v,--version}'[display the version number]' \ '(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \ '*:script or directory:_files' && ret=0 return ret # 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 ================================================ FILE: src/_conan ================================================ #compdef conan # ------------------------------------------------------------------------------ # Copyright (c) 2010-2017 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 conan 2.0.0 (https://conan.io). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # * Shohei Yoshida # # ------------------------------------------------------------------------------ _conan_common_options=( '(- *)'{-h,--help}'[show help message and exit]' '-v[verbose output]' '-vquiet[verbose level quiet]' '-verror[verbose level error]' '-vwarning[verbose level warning]' '-vnotice[verbose level notice]' '-vstatus[verbose level status]' '-vverbose[verbose level verbose]' '-vv[more verbose output]' '-vdebug[verbose level debug]' '-vvv[more and more verbose output]' '-vtrace[verbose level trace]' '--logger[show the output with log format, with time, type and message]' ) _conan_package_options=( '--name[Provide a package name if not specified in conanfile]:name' '--version[Provide a package version if not specified in conanfile]:version' '--user[Provide a user]:user' '--channel[Provide a channel]:channel' '--requires[directly provide requires instead of a conan file]:requires' '--tool-requires[directly provide tool-requires instead of a conanfile]:tool_requires' ) _conan_define_options=( \*{-o,--options,'-o\:h','--options\:host'}'[define options of host machine]:option' \*{'-o\:b','--options\:build'}'[define options of build machine]:option' ) _conan_profile_options=( '(-pr --profile -pr\:h --profile\:host)'{-pr,--profile,-pr:h,--profile:host}'[apply the specified profile to the host machine]: :_conan_profiles' '(-pr\:b --profile\:build)'{-pr:b,--profile:build}'[apply the specified profile to the build machine]: :_conan_profiles' ) _conan_setting_options=( \*{-s,--settings,'-s\:h','--settings\:host'}'[overwrite the defaults of host machine to build]:setting' \*{'-s\:b','--settings\:build'}'[overwrite the defaults of build machine to build]:setting' ) _conan_configuration_options=( \*{-c,--conf,'-c\:h','--conf\:host'}'[overwrite the defaults of host machine to configure]:config' \*{'-c\:b','--conf\:build'}'[overwrite the defaults of build machine to configure]:config' ) _conan_lockfile_options=( '(-l --lockfile)'{-l,--lockfile}'[path to a lockfile]: :_files' '--lockfile-partial[do not raise an error if some dependency is not found in lockfile]' '--lockfile-out[filename of the updated lockfile]: :_files' '--lockfile-packages[lock package-id and package-revision information]' '--lockfile-clean[remove unused entries from the lockfile]' ) _conan_remote_options=( '(-r --remote -nr --no-remote)'{-r,--remote}'[look in the specified remote server]:remote' '(-r --remote -nr --no-remote)'{-nr,--no-remote}'[do not use remote, resolve exclusively in the cache]' ) _conan() { local context state state_descr line typeset -A opt_args _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '(- : *)'{-v,--version}'[display version information]' \ '(-h --help)1: :_conan_commands' \ '(-h --help)*:: :->command_args' case $state in command_args) (( $+functions[_conan_${words[1]}] )) && _conan_${words[1]} ;; esac } (( $+functions[_conan_commands] )) || _conan_commands() { local -a commands=( # consumer commands 'cache:perform file operations in the local cache' 'config:manages conan configuration information' 'graph:obtain information about the dependency graph without fetching binaries' 'inspect:inspect a conanfile.py to return its public fields' 'install:installs the requirements specified in a "conanfile.py" or "conanfile.txt"' 'list:list recipes, revisions or packages in the cache or the remotes' 'lock:create or manage lockfiles' 'profile:manage profiles' 'remote:manage the remote list and the users authenticated on them' 'remove:remove recipes or packages from local cache or a remote' 'search:search for package recipes in all the remotes or a remote' # create commands 'build:install dependencies and call the build() method' 'create:create a package' 'download:download(without installing) a single conan package from a remote server' 'editable:allow working with a package that resides in user folder' 'export:export a recipe to the Conan package cache' 'export-pkg:create a package directly from pre-compiled binaries' 'new:create a new example recipe and source files from a template' 'source:call the source() method' 'test:test a package from a test_package folder' 'upload:upload packages to a remote' ) _describe -t 'subcommands' 'subcommands' commands } (( $+functions[_conan_cache] )) || _conan_cache() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[show help message and exit]' \ '1: :(clean path)' \ '*:: :->args' case $state in (args) local -a opts=($_conan_common_options[@]) case $words[1] in (clean) opts+=( '(-s --source)'{-s,--source}'[clean source folders]' '(-b --build)'{-b,--build}'[clean build folders]' '(-d --download)'{-d,--download}'[clean download folders]' \*{-p,--package-query}'[remove only the packages matching a specific query]:query' '1:pattern' ) ;; (path) opts+=( '--folder[path to show]::type:(export_source source build)' \ '1:recipe_or_package_reference:_files' ) ;; esac _arguments "$opts[@]" ;; esac return $ret } (( $+functions[_conan_config] )) || _conan_config() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_config_commands' \ '*:: :->args' case $state in (args) local -a opts=($_conan_common_options[@]) case $words[1] in (install) opts+=( '--verify-ssl[Verify SSL connection when downloading file]: :(True False)' '(-t --type)'{-t,--type}'[Type of remote config]: :(git dir file url)' \*{-a,--args}'[String with extra arguments for "git clone"]:arg' \*{-sf,--source-folder}'[Install files only from a source subfolder from specified origin]: :_files -/' '(-tf --target-folder)'{-tf,--target-folder}'[Install to that path in the conan cache]: :_files -/' ) ;; (list) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' ) ;; esac _arguments "$opts[@]" ;; esac } (( $+functions[_conan_config_commands] )) || _conan_config_commands() { local -a commands=( 'home:show the Conan home folder' 'install:install the configuration into the Conan home folder' 'list:show all the Conan available configurations:' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_graph] )) || _conan_graph() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_graph_commands' \ '*:: :->args' local -a common_opts=( $_conan_package_options[@] \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] ) case $state in (args) local -a opts=($_conan_common_options[@]) case $words[1] in (build-order) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' $common_opts[@] ) ;; (build-order-merge) opts+=( '--file[files to be merged]:file:_files' ) ;; (info) opts+=( $common_opts[@] '(-f --format)'{-f,--format}'[select the output format]:format:(html json dot)' '--check-updates[check if there are recipe updates]' '*--filter[show only the specified fields]:filter' '*--package-filter[print information only for packages that match the patterns]:package_filter' '--deploy[deploy using the provided deployer to the output folder]:deployer' ) ;; esac _arguments "$opts[@]" ;; esac } (( $+functions[_conan_graph_commands] )) || _conan_graph_commands() { local -a commands=( 'build-order:compute the build order of a dependency graph' 'build-order-merge:merge more than 1 build-order file' 'info:compute the dependency graph and shows information about it' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_inspect] )) || _conan_inspect() { _arguments \ "$_conan_common_options[@]" \ '(-f --format)'{-f,--format}'[select the output format]:format:(json)' \ '*:recipe_folder:_files -/' } (( $+functions[_conan_install] )) || _conan_install() { local -a generators=( cmake cmake_multi cmake_paths cmake_find_package cmake_find_package_multi msbuild visual_studio visual_studio_multi visual_studio_legacy xcode compiler_args gcc boost-build b2 qbs qmake scons pkg_config virtualenv virtualenv_python virtualbuildenv virtualrunenv youcompleteme txt json premake make markdown deploy ) local -a opts=( $_conan_common_options[@] '(-f --format)'{-f,--format}'[select the output format]:format:(json)' \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] '(-g --generator)'{-g,--generator}"[generators to use]:generator:($generators)" '(-of --output)'{-of,--output-folder}'[the root output folder for generated and build files]:dir:_files -/' '--deploy[deploy using the provided deployer to the output folder]:deployer' '1:recipe_dir_or_conanfile:_files' ) _arguments "$opts[@]" } (( $+functions[_conan_list] )) || _conan_list() { local -a opts=( $_conan_common_options[@] '(-f --format)'{-f,--format}'[select the output format]:format:(json html)' \*{-p,--package-query}'[remove only the packages matching a specific query]:query' '(-r --remote)'{-r,--remote}'[remote names]:remote' '(-c --cache)'{-c,--cache}'[search in the local cache]' '1:recipe_or_package_reference:_files' ) _arguments "$opts[@]" } (( $+functions[_conan_lock] )) || _conan_lock() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_lock_commands' \ '*:: :->args' case $state in (args) local -a opts=($_conan_common_options) case $words[1] in (add) opts+=( '*--requires[add references to lockfile]:requires' '*--build-requires[add build-requires to lockfile]:build_requires' '*--python-requires[add python-requires to lockfile]' '--lockfile-out[file name of the created lockfile]:filename:_files' '--lockfile[file name of the input lockfile]:filename:_files' ) ;; (create) opts+=( \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] '1: :_files' ) ;; (merge) opts+=( '--lockfile-out[file name of the created lockfile]:filename:_files' '--lockfile[file name of the input lockfile]:filename:_files' ) ;; esac _arguments "$opts[@]" ;; esac } (( $+functions[_conan_lock_commands] )) || _conan_lock_commands() { local -a commands=( 'add:add requires, build-requires or python requires to an existing or new lockfile' 'create:create a lockfile from a conanfile or a reference' 'merge:merge 2 or more lockfiles' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_profile] )) || _conan_profile() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_profile_commands' \ '*:: :->args' case $state in (args) local opts=($_conan_common_options[@]) case $words[1] in (detect) opts+=( '--name[profile name, "default" if not specified]::name' '(-f --force)'{-f,--force}'[overwrite if exists]' ) ;; (list) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' ) ;; (path|show) opts+=( $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] ) ;; esac _arguments "$opts[@]" ;; esac } (( $+functions[_conan_profile_commands] )) || _conan_profile_commands() { local -a commands=( 'detect:generate a profile using auto-detected values' 'list:list all profiles in the cache' 'path:show profile path location' 'show:show aggregated profiles from the passed arguments' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_remote] )) || _conan_remote() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_remote_commands' \ '*:: :->args' case $state in (args) local -a opts=($_conan_common_options[@]) case $words[1] in (add) opts+=( '--insecure[allow insecure server connections when using SSL]' '--index[insert the remote at a specific position in the remote list]:index' '(-f --force)'{-f,--force}'[force the definition of the remote even if duplicated]' '1:name' '2:url' ) ;; (auth) opts+=( '--with-user[only try to auth in those remotes that already have a user name]' '1:remote:_conan_remotes' ) ;; (list|list-users) opts+=('(-f --format)'{-f,--format}'[select the output format]:format:(json)') ;; (login) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' '(-p --password)'{-p,--password}'[user password]:password' '1:remote:_conan_remotes' '2:username:' ) ;; (logout) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' '1:remote:_conan_remotes' ) ;; (remove) opts+=('1:remote:_conan_remotes') ;; (rename) opts+=( '1:remote:_conan_remotes' '2:new_name' ) ;; (set-user) opts+=( '(-f --format)'{-f,--format}'[select the output format]:format:(json)' '1:remote:_conan_remotes' '2:user_name' ) ;; (update) opts+=( '--url[new url for the remote]' '--secure[do not allow insecure server connections when using SSL]' '--insecure[allow insecure server connections when using SSL]' '--index[insert the remote at a specific position in the remote list]:index' '1:remote:_conan_remotes' ) ;; esac _arguments "${opts[@]}" ;; esac } (( $+functions[_conan_remote_commands] )) || _conan_remote_commands() { local -a commands=( 'add:add a remote' 'auth:authenticate in the defined remotes' 'disable:disable all the remotes matching a pattern' 'enable:enable all the remotes matching a pattern' 'list:list current remotes' 'list-users:list the users logged into all the remotes' 'login:login into the specified remotes matching a pattern' 'logout:clear the existing credentials for the specified remotes matching a pattern' 'remove:remove a remote' 'rename:rename a remote' 'set-user:associate a username with a remote matching pattern without performing the authentication' 'update:update a remote' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_remove] )) || _conan_remove() { local -a opts=( $_conan_common_options[@] '(-c --confirm)'{-c,--confirm}'[remove without requesting a confirmation]' \*{-p,--package-query}'[remove only the packages matching a specific query]:query' \*{-r,--remote}'[will remove from the specified remote]:remote' '*:recipe_or_package_reference:_files' ) _arguments "$opts[@]" } (( $+functions[_conan_search] )) || _conan_search() { local -a opts=( $_conan_common_options[@] \*{-r,--remote}'[will remove from the specified remote]:remote' '*:recipe_reference:_files' ) _arguments "$opts[@]" } (( $+functions[_conan_build] )) || _conan_build() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] '*: :_files' ) _arguments "$opts[@]" } (( $+functions[_conan_create] )) || _conan_create() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] '--build-require[whether the provided reference is a build-require]' '(-tf --test-folder)'{-tf,--test-folder}'[alternative test folder name]:folder:_files -/' '*: :_files -/' ) _arguments "$opts[@]" } (( $+functions[_conan_download] )) || _conan_download() { local -a opts=( $_conan_common_options[@] '--only-recipe[download only the recipe, not the binary packages]' \*{-p,--package-query}'[only download packages matching a specific query]:query' '(-r --remote)'{-r,--remote}'[download from the specific remote]:remote:_conan_remotes' '*:recipe_or_package_reference:_files' ) _arguments "$opts[@]" } (( $+functions[_conan_editable] )) || _conan_editable() { _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '1: :_conan_editable_commands' \ '*:: :->args' case $state in (args) local opts=($_conan_common_options[@]) case $words[1] in (add) opts+=( $_conan_package_options[@] '(-of --output-folder)'{-of,--output-folder}'[the root output folder]:folder:_files -/' ) ;; (list) opts+=('(-f --format)'{-f,--format}'[select the output format]:format:(json)') ;; (remove) opts+=('(-r --refs)'{-r,--refs}'[directly provide reference patterns]:refs') ;; esac _arguments "$opts[@]" ;; esac } (( $+functions[_conan_editable_commands] )) || _conan_editable_commands() { local -a commands=( 'add:define the given path location as the package reference' 'list:list all the packages in editable mode' 'remove:remove the editable mode for this reference' ) _describe -t 'commands' "command" commands } (( $+functions[_conan_export] )) || _conan_export() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] $_conan_remote_options[@] $_conan_lockfile_options[@] '--build-require[whether the provided reference is a build-require]' '*: :_files -/' ) _arguments "$opts[@]" } (( $+functions[_conan_export-pkg] )) || _conan_export-pkg() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] $_conan_remote_options[@] $_conan_lockfile_options[@] $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] '*: :_files -/' ) _arguments "$opts[@]" } (( $+functions[_conan_new] )) || _conan_new() { local -a templates=( basic cmake_lib cmake_exe meson_lib meson_exe msbuild_lib msbuild_exe bezel_lib bezel_exe autotools_lib autotools_exe ) local -a opts=( $_conan_common_options[@] \*{-d,--define}'[define a template argument as key=value]:key_value' '(-f --force)'{-f,--force}'[overwrite file if it already exists]' "1:template:($templates)" ) _arguments "$opts[@]" } (( $+functions[_conan_source] )) || _conan_source() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] '1: :_files' ) _arguments "$opts[@]" } (( $+functions[_conan_test] )) || _conan_test() { local -a opts=( $_conan_common_options[@] $_conan_package_options[@] \*{-b,--build}'[optional, specify which packages to build from source]:build' $_conan_remote_options[@] '(-u --update)'{-u,--update}'[will check the remote and in case a newer version]' $_conan_define_options[@] $_conan_profile_options[@] $_conan_setting_options[@] $_conan_configuration_options[@] $_conan_lockfile_options[@] '1:path:_files -/' '2:reference' ) _arguments "$opts[@]" } (( $+functions[_conan_upload] )) || _conan_upload() { local -a opts=( $_conan_common_options[@] \*{-p,--package-query}'[only upload packages matching a specific query]:query' '(-r --remote)'{-r,--remote}'[upload to this specific remote]:remote:_conan_remotes' '--only-recipe[upload only the recipe, not the binary packages]' '--force[force the upload of the artifacts]' '--check[perform an integrity check before upload]' '(-c --confirm)'{-c,--confirm}'[upload all matching recipes without confirmation]' '1::reference' ) _arguments "$opts[@]" } (( $+functions[_conan_remotes] )) || _conan_remotes() { local -a remotes=(${(f)"$(_call_program remotes $service remote list)"}) _describe -t remotes 'remote' remotes "$@" } (( $+functions[_conan_profiles] )) || _conan_profiles() { local -a profiles=(${(f)"$(_call_program profiles $service profile list 2>/dev/null)"}) _describe -t profiles 'profile' profiles "$@" } _conan "$@" # 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 ================================================ FILE: src/_concourse ================================================ #compdef concourse # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for concourse 5.2.0 (https://concourse-ci.org). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ (( $+functions[_concourse_server] )) || _concourse_server() { local context state state_descr line ret=1 typeset -A opt_args local -a concourse_postgres_configurations=( '--postgres-host=[the host to connect to]: :_hosts' '--postgres-port=[the port to connect to]: :_concourse_ports' '--postgres-socket=[path to a UNIX domain socket to connect to]: :_files' '--postgres-user=[the user to sign in as]: :_users' "--postgres-password=[the user's password]:password" '--postgres-sslmode=[whether or not to use SSL(default: disable)]:SSL mode:(disable require verify-ca verify-full)' '--postgres-sslnegotiation=[how SSL encryption is negotiated with the server(default: postgres)]: :(postgres direct)' '--postgres-ca-cert=[CA cert file location, to verify when connecting with SSL]: :_files' '--postgres-client-cert=[client cert file location]: :_files' '--postgres-client-key=[client key file location]: :_files' '--postgres-connect-timeout=[dialing timeout]: :_concourse_durations' '--postgres-database=[the name of the database to use(default: atc)]:database name' ) _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '(- : *)'{-v,--version}'[print the version of Concourse and exit]' \ '(-): :->command' \ '(-)*:: :->arguments' \ && ret=0 case $state in (command) _concourse_commands && ret=0 ;; (arguments) curcontext=${curcontext%:*:*}:concourse-$words[1]: if [[ $words[1] == "quickstart" || $words[1] == "web" ]]; then _concourse_quickstart_or_web "${words[1]}" && ret=0 else if (( $+functions[_concourse_${words[1]}] )); then _concourse_${words[1]} && ret=0 else _message "unknown command ${words[1]}" && ret=1 fi fi ;; esac return ret } (( $+functions[_concourse_commands] )) || _concourse_commands() { local commands=( "generate-key:generate RSA key for use with Concourse components" "land-worker:safely drain a worker's assignments for temporary downtime" "migrate:run database migrations" "quickstart:run both 'web' and 'worker' together, auto-wired" "retire-worker:safely remove a worker from the cluster permanently" "web:run the web UI and build scheduler" "worker:run and register a worker" ) _describe -t commands commands commands } (( $+functions[_concourse_quickstart_or_web] )) || _concourse_quickstart_or_web() { local command="$1" local ret=1 # define common variables local -a concourse_web_configurations=( '--peer-address=[network address of this web node, reachable by other web nodes]: :_concourse_host_colon_ports' '--log-level=[minimum level of logs to see]:level:_concourse_log_levels' '--bind-ip=[IP address on which to listen for web traffic]: :_concourse_ip_addresses' '--bind-port=[port on which to listen for HTTP traffic(default: 8000)]: :_concourse_ports' '--tls-bind-port=[port on which to listen for HTTPS traffic]: :_concourse_ports' '--tls-cert=[file containing an SSL certificate]: :_files' '--tls-key=[file containing an RSA private key, used to encrypt HTTPS traffic]: :_files' '--tls-ca-cert=[file containing the client CA certificate, enables mTLS]: :_files' '--external-url=[URL used to reach any ATC from the outside world]: :_urls' '--concurrent-request-limit=[limit the number of concurrent requests to an API endpoint]:limit' '--api-max-conns=[maximum number of open connections for the api connection pool(default: 10)]:limit' '--backend-max-conns=[maximum number of open connections for the backend connection pool(default: 50)]:limit' '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' '--old-encryption-key=[encryption key previously used for encrypting sensitive information]:encryption key' '--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' '--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' '--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations' '--component-runner-interval=[interval on which runners are kicked off for builds, locks, scans and checks]:interval:_concourse_durations' '--lidar-scanner-interval=[interval on which the resource scanner will run to see if new checks need to be scheduled]:interval:_concourse_durations' '--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations' '--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations' '--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations' '--resource-with-webhook-checking-interval=[interval on which to check for new versions of resources that has webhook defined]:interval:_concourse_durations' '--max-checks-per-second=[maximum number of checks that can be started per second]:number' '--pause-pipelines-after=[number of days after which a pipeline will be automatically paused when there are no jobs]:days' '--baggageclaim-response-header-timeout=[how long to wait for Baggageclaim to send the response header]: :_concourse_durations' '--streaming-artifacts-compression=[compression algorithm for internal streaming(default: gzip)]:alg:(gzip zstd raw)' '--streaming-size-limitation=[internal volume streaming size limitation in MB]:size' '--garden-request-timeout=[how long to wait for requests to Garden to complete(default: 5m)]: :_concourse_durations' '--cli-artifacts-dir=[directory containing downloadable CLI binaries]: :_files -/' '--web-public-dir=[Web public/ directory to server live for local development]:dir:_files -/' '--log-db-queries[log database queries]' '--log-cluster-name[log cluster name]' '--build-tracker-interval=[interval on which to run build tracking]: :_concourse_durations' '--default-build-logs-to-retain=[default build logs to retain, 0 means all]:number' '--max-build-logs-to-retain=[maximum build logs to retain, 0 means not specified]:number' '--default-days-to-retain-build-logs=[default days to retain build logs. 0 means unlimited]:number' '--max-days-to-retain-build-logs=[maximum days to retain build logs, 0 means not specified]:number' '--job-scheduling-max-in-flight=[maximum number of jobs to be scheduling at the same time(default: 32)]:number' '--default-task-cpu-limit=[default max number of cpu shares per task, 0 means unlimited]:number' '--default-task-memory-limit=[default maximum memory per task, 0 means unlimited]:number' '--enable-build-auditing[enable auditing for all api requests connected to builds]' '--enable-container-auditing[enable auditing for all api requests connected to containers]' '--enable-job-auditing[enable auditing for all api requests connected to jobs]' '--enable-pipeline-auditing[enable auditing for all api requests connected to pipelines]' '--enable-resource-auditing[enable auditing for all api requests connected to resources]' '--enable-system-auditing[enable auditing for all api requests connected to system transactions]' '--enable-team-auditing[enable auditing for all api requests connected to teams]' '--enable-worker-auditing[enable auditing for all api requests connected to workers]' '--enable-volume-auditing[enable auditing for all api requests connected to volumes]' '--config-rbac=[customize RBAC role-action mapping]:mapping' '--system-claim-key=[token claim key to use when matching system-claim-values(default: aud)]:key' '--system-claim-value=[configure which token requests should be considered "system" requests(default: concourse-worker)]:value' '--base-resource-type-defaults=[base resource type defaults]:type' '--p2p-volume-streaming-timeout=[timeout of p2p volume streaming(default: 15m)]: :_concourse_durations' '--display-user-id-per-connector=[define how to display user ID for each authentication connector]:how' '--default-get-timeout=[default timeout of get steps]: :_concourse_durations' '--default-put-timeout=[default timeout of put steps]: :_concourse_durations' '--default-task-timeout=[default timeout of task steps]: :_concourse_durations' '--num-goroutine-threshold=[when number of goroutines reaches to this threshold, then slow down current ATC]:num' '--db-notification-bus-queue-size=[DB notification bus queue size(default: 10000)]:size' \ ) local -a concourse_credential_manager_configurations=( # Credential Management '--secret-retry-attempts=[the number of attempts secret will be retried to be fetched, in case a retriable error happens]:number' '--secret-retry-interval=[the interval between secret retry retrieval attempts]: :_concourse_durations' '--secret-cache-enabled[enable in-memory cache for secrets]' '--secret-cache-duration=[secret values will be cached for not longer than this duration]: :_concourse_durations' '--secret-cache-duration-notfound=[secret not found responses will be cached for this duration]: :_concourse_durations' '--secret-cache-purge-interval=[if the cache is enabled, expired items will be removed on this internal]: :_concourse_durations' # Vault Credential Management '--vault-url=[vault server address used to access secrets]: :_urls' '--vault-path-prefix=[path under which to namespace credential lookup]:prefix' '--vault-lookup-templates=[path templates for credential lookup]: :_files' '--vault-shared-path=[path under which to lookup shared credentials]:path' '--vault-namespace=[Vault namespace to use for authentication and secret lookup]:namespace' '--vault-login-timeout=[timeout value for Vault login(default: 60s)]: :_concourse_durations' '--vault-query-timeout=[timeout value for Vault queue(default: 60s)]: :_concourse_durations' '--vault-disable-srv-lookup[disable that client will lookup the host through DNS SRV lookup]' '--vault-ca-cert=[path to a PEM-encoded CA cert file to use to verify the vault server SSL cert]: :_files' '--vault-ca-path=[path to a directory of PEM-encoded CA cert files to verify the vault server SSL cert]: :_files -/' '--vault-client-cert=[path to the client certificate for Vault authorization]: :_files' '--vault-client-key=[path to the client private key for Vault authorization]: :_files' '--vault-server-name=[if set, is used to set the SNI host when connecting via TLS]:server name' '--vault-insecure-skip-verify[enable insecure SSL verification]' '--vault-client-token=[client token for accessing secrets within the Vault server]:client token' '--vault-client-token-path=[absolute path to a file containing the Vault client token]: :_files' '--vault-auth-backend=[auth backend to use for logging in to Vault]:auth backend' '--vault-auth-backend-max-ttl=[time after which to force a re-login]: :_concourse_durations' '--vault-retry-max=[the maximum time between retries when logging in or re-authing a secret]: :_concourse_durations' '--vault-retry-initial=[the initial time between retries when logging in or re-authing a secret]: :_concourse_durations' '*--vault-auth-param=[parameter to pass when logging in via the backend]: :_concourse_name_colon_values' # Conjur Credential Management '--conjur-appliance-url=[URL of the conjur instance]: :_urls' '--conjur-account=[Conjur Account]:account' '--conjur-cert-file=[cert file used if conjur instance is using a self signed cert]: :_files' '--conjur-authn-login=[host username for conjur authn login]:host' '--conjur-authn-api-key=[Api key related to the host for conjur authn]:api_key' '--conjur-authn-token-file=[token file used if conjur instance is running in k8s or iam]: :_files' '--conjur-pipeline-secret-template=[Conjur secret identifier template used for pipeline specific parameter]:template' '--conjur-team-secret-template=[Conjur secret identifier template used for team specific parameter]:template' '--conjur-secret-template=[Conjur secret identifier template used for full path conjur secrets]:template' # CredHub Credential Management '--credhub-url=[CredHub server address used to access secrets]: :_urls' '--credhub-path-prefix=[path under which to namespace credential lookup]:path' '--credhub-ca-cert=[path to PEM-encoded CA cert files to use to verify the CredHub server SSL cert]: :_files' '--credhub-client-cert=[path to the client certificate for mutual TLS authorization]: :_files' '--credhub-client-key=[path to the client private key for mutual TLS authorization]: :_files' '--credhub-insecure-skip-verify[enable insecure SSL verification]' '--credhub-client-id=[client ID for CredHub authorization]:client ID' '--credhub-client-secret=[client secret for CredHub authorization]:client secret' # Dummy Credential Management '--dummy-creds-var=[a YAML value to expose via credential management]:key_val' # Kubernetes Credential Management '--kubernetes-in-cluster[enable the Kubernetes in-cluster client]' '--kubernetes-config-path=[path to Kubernetes config]: :_files' '--kubernetes-namespace-prefix=[prefix to use for Kubernetes namespace]:prefix' # AWS SecretsManager Credential Management '--aws-secretsmanager-access-key=[AWS Access key ID]:access key' '--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key' '--aws-secretsmanager-session-token=[AWS Session Token]:session token' '--aws-secretsmanager-region=[AWS region to send requests to]:region' '--aws-secretsmanager-pipeline-secret-template=[AWS Secrets Manager secret identifier template used for pipeline specific parameter]:template' '--aws-secretsmanager-team-secret-template=[AWS Secrets Manager secret identifier template used for team specific parameter]:template' '--aws-secretsmanager-shared-secret-template=[AWS Secrets Manager secret identifier templated used for shared parameter]:template' # AWS SSM Credential Management '--aws-ssm-access-key=[AWS Access key ID]:access key' '--aws-ssm-secret-key=[AWS Secret Access Key]:secret key' '--aws-ssm-session-token=[AWS Session Token]:session token' '--aws-ssm-region=[AWS region to send requests to]:region' '--aws-ssm-pipeline-secret-template=[AWS SSM parameter name template used for pipeline specific parameter]:template' '--aws-ssm-team-secret-template=[AWS SSM parameter name template used for team specific parameter]:template' '--aws-ssm-shared-path=[AWS SSM parameter path used for shared parameters]: :_files' ) local -a concourse_placement_strategies=( volume-locality random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes ) local -a concourse_second_placement_strategies=( random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes ) local -a concourse_container_placement_strategy_configurations=( '--container-placement-strategy=[method by which a worker is selected during container placement]: :(($concourse_placement_strategies))' '--no-input-container-placement-strategy=[a second container placement strategy]: :(($concourse_second_placement_strategies))' '--check-container-placement-strategy=[a third container placement strategy]: :(($concourse_second_placement_strategies))' '--max-active-tasks-per-worker=[maximum allowed number of active build tasks per worker]:tasks' '--max-active-containers-per-worker=[maximum allowed number of active containers per worker]:containers' '--max-active-volumes-per-worker=[maximum allowed number of active volumes per worker]:volumes' ) local -a concourse_metric_configurations=( # Metrics & Diagnostics '--metrics-host-name=[host string to attach to emitted metrics]: :_hosts' '*--metrics-attribute=[a key-value attribute to attach to emitted metrics]: :_concourse_name_colon_values' '--metrics-buffer-size=[size of the buffer used in emitting event metrics(default: 1000)]:size' '--capture-error-metrics[enable capturing of error log metrics]' # Metric Emitter (Datadog) '--datadog-agent-host=[datadog agent host to expose dogstatsd metrics]: :_hosts' '--datadog-agent-port=[datadog agent port to expose dogstatsd metrics]: :_concourse_ports' '--datadog-agent-uds-filepath=[Datadog agent unix domain socket filepath]: :_files' '--datadog-prefix=[prefix for all metrics to easily find them in Datadog]:prefix' # Metric Emitter (InfluxDB) '--influxdb-url=[influxDB server address to emit points to]: :_urls' '--influxdb-database=[influxDB database to write points to]:database name' '--influxdb-username=[influxDB server username]: :_users' '--influxdb-password=[influxDB server password]:password' '--influxdb-insecure-skip-verify[skip SSL verification when emitting to InfluxDB]' '--influxdb-batch-size=[number of points to batch together when emitting to InfluxDB(default: 5000)]:size' '--influxdb-batch-duration=[duration to wait before emitting a batch of points to InfluxDB(default: 300s)]: :_concourse_durations' # Metric Emitter (Lager) '--emit-to-logs[emit metrics to logs]' # Metric Emitter (NewRelic) '--newrelic-account-id=[new Relic Account ID]:account ID' '--newrelic-api-key=[new Relic Insights API Key]:API key' '--newrelic-insights-api-url=[Base Url for insights Insert API]: :_urls' '--newrelic-service-prefix=[an optional prefix for emitted New Relic events]:prefix' '--newrelic-batch-size=[number of events to batch together before emitting(default: 2000)]:size' '--newrelic-batch-duration=[length of time to wait between emitting(default: 60s)]: :_concourse_durations' '--newrelic-batch-disable-compression=[disable compression of the batch before sending it]' # Metric Emitter (Prometheus) '--prometheus-bind-ip=[IP to listen on to expose Prometheus metrics]: :_concourse_ip_addresses' '--prometheus-bind-port=[port to listen on to expose Prometheus metrics]: :_concourse_ports' ) local -a concourse_tracing_configurations=( '--tracing-service-name=[service name to attach to traces as metadata(default: concourse-web)]:name' '--tracing-attribute=[attributes to attach to traces as metadata]:attributes' '--tracing-honeycomb-api-key=[honeycomb.io api key]:key' '--tracing-honeycomb-dataset=[honeycomb.io dataset name]:name' '--tracing-jaeger-endpoint=[jaeger http-based thrift collected]:endpoint' '--tracing-jaeger-tags=[tags to add to the components]:tags' '--tracing-jaeger-service=[jaeger process service name(default; web)]:name' "--tracing-stackdriver-projectid=[GCP's project ID]:project_id" '--tracing-otlp-address=[odlp address to send traces to]:address' '--tracing-otlp-header=[headers to attach to each tracing messages]:header' '--tracing-otlp-use-tls[whether to use TLS or not]' ) local -a concourse_policy_check_agent_configurations=( # Policy Checking '--policy-check-filter-http-method=[API http method to go through policy check]:method' '--policy-check-filter-action=[actions in the list will go through policy check]:actions' '--policy-check-filter-action-skip=[actions the list will not go through policy check]:actions' # Policy Check Agent (Open Policy Agent): '--opa-url=[OPA policy check endpoint]:url:_urls' '--opa-timeout=[OPA request timeout(default: 5s)]: :_concourse_durations' '--opa-result-allowed-key=[key name of if pass policy check in OPA returned result]:key' '--opa-result-should-block-key=[key name of if should block current action in OPA returned result]:key' '--opa-result-messages-key=[key name of messages in OPA returned result]:key' ) local -a concourse_web_server_configurations=( '--x-frame-options=[the value to set for X-Frame-Options]:options' '--content-security-policy=[value to set for Content-Security-Policy header]:value' '--strict-transport-security=[value to set for the Strict-Transport-Security header]:value' '--cluster-name=[a name for this Concourse cluster, to be displayed on the dashboard page]:name' '--client-id=[client ID to use for login flow(default: concourse-web)]:id' '--client-secret=[client secret to use for login flow]:secret' ) local -a concourse_gc_configurations=( '--gc-interval=[interval on which to perform garbage collection]: :_concourse_durations' '--gc-one-off-grace-period=[period after which one-off build containers will be garbage-collected]: :_concourse_durations' '--gc-missing-grace-period=[period after which to reap containers and volumes that were created but went missing from the worker]: :_concourse_durations' '--gc-hijack-grace-period=[period after which hijacked containers will be garbage collected]: :_concourse_durations' '--gc-failed-grace-period=[period after which failed containers will be garbage collected]: :_concourse_durations' '--gc-check-recycle-period=[period after which to reap checks that are completed]: :_concourse_durations' '--gc-var-source-recycle-period=[period after which to reap var_sources that are not used]: :_concourse_durations' ) local -a concourse_syslog_configurations=( '--syslog-hostname=[client hostname with which the build logs will be sent to the syslog server]: :_hosts' '--syslog-address=[remote syslog server address with port]: :_concourse_host_colon_ports' '--syslog-transport=[transport protocol for syslog messages]:protocol:(tcp udp tls)' '--syslog-drain-interval=[interval over which checking is done for new build logs to send to syslog server]: :_concourse_durations' '--syslog-ca-cert=[paths to PEM-encoded CA cert files to use to verify the Syslog server SSL cert]: :_files' ) local -a concourse_authentication_configurations=( '--cookie-secure[force sending secure flag on http cookies]' '--auth-duration=[length of time for which tokens are valid]: :_concourse_durations' '--session-signing-key=[file containing an RSA private key, used to sign auth tokens]: :_files' '--password-connector=[connector to use when authenticating via "fly login -u .. -p.."]: :(local ldap)' '*--add-local-user=[list of username:password combinations for all your local users]: :_concourse_username_colon_passwords' '*--add-client=[list of client_id:client_secret combinations]:pair' # Authentication Main Team '*--main-team-local-user=[list of whitelisted local concourse users]: :_users' {-c,--main-team-config=}'[configuration file for specifying team params]: :_concourse_config_files' # Authentication Main Team Bitbucket Cloud '*--main-team-bitbucket-cloud-user=[list of whitelisted Bitbucket Cloud users]: :_users' '*--main-team-bitbucket-cloud-team=[list of whitelisted Bitbucket Cloud teams]:team' # Authentication Main Team CloudFoundry '*--main-team-cf-user=[list of whitelisted CloudFoundry users]: :_users' '*--main-team-cf-org=[list of whitelisted CloudFoundry orgs]:org name' '*--main-team-cf-space=[list of whitelisted CloudFoundry spaces]:space name' '*--main-team-cf-space-with-any-role=[a whitelisted CloudFoundry space for users with any role]:space' '*--main-team-cf-space-with-developer-role=[a whitelisted CloudFoundry space for users with the developer role]:space' '*--main-team-cf-space-with-auditor-role=[a whitelisted CloudFoundry space for users with the auditor role]:space' '*--main-team-cf-space-with-manager-role=[a whitelisted CloudFoundry space for users with the manager role]:space' '*--main-team-cf-space-guid=[a whitelisted CloudFoundry space guid]:space_guid' # Authentication Main Team GitHub '*--main-team-github-user=[list of whitelisted GitHub users]: :_users' '*--main-team-github-org=[list of whitelisted GitHub orgs]:org name' '*--main-team-github-team=[list of whitelisted GitHub teams]:team name' # Authentication Main Team GitLab '*--main-team-gitlab-user=[list of whitelisted GitLab users]: :_users' '*--main-team-gitlab-group=[list of whitelisted GitLab groups]:group name' # Authentication Main Team LDAP '*--main-team-ldap-user=[list of whitelisted LDAP users]: :_users' '*--main-team-ldap-group=[list of whitelisted LDAP groups]:group name' # Authentication Main Team Microsoft '*--main-team-microsoft-user=[a whitelisted Microsoft user]: :_users' '*--main-team-microsoft-group=[a whitelisted Microsoft group]:group name' # Authentication Main Team OAuth2 '*--main-team-oauth-user=[list of whitelisted OAuth2 users]: :_users' '*--main-team-oauth-group=[list of whitelisted OAuth2 groups]:group name' # Authentication Main Team OIDC '*--main-team-oidc-user=[list of whitelisted OIDC users]: :_users' '*--main-team-oidc-group=[list of whitelisted OIDC groups]:group name' # Authentication Main Team SAML '*--main-team-saml-user=[a whitelisted SAML user]: :_users' '*--main-team-saml-group=[a whitelisted SAML group]:group name' # Authentication Bitbucket Cloud '--bitbucket-cloud-client-id=[client id]:client ID' '--bitbucket-cloud-client-secret=[client secret]:client secret' # Authentication CloudFoundry '--cf-client-id=[client id]:client ID' '--cf-client-secret=[client secret]:client secret' '--cf-api-url=[the base API URL of your CF deployment]: :_urls' '--cf-ca-cert=[CA Certificate]: :_files' '--cf-skip-ssl-validation[skip SSL validation]' # Authentication GitHub '--github-client-id=[client id]:client ID' '--github-client-secret=[client secret]:client secret' '--github-host=[hostname of GitHub Enterprise deployment]: :_hosts' '--github-ca-cert=[CA certificate of GitHub Enterprise deployment]: :_files' # Authentication GitLab '--gitlab-client-id=[client id]:client ID' '--gitlab-client-secret=[client secret]:client secret' '--gitlab-host=[hostname of Gitlab Enterprise deployment]: :_hosts' # Authentication LDAP '--ldap-display-name=[the auth provider name displayed to users on the login page]:display name' '--ldap-host=[the host and optional port of the LDAP server]: :_hosts' '--ldap-bind-dn=[bind DN for searching LDAP users and groups]:bind DN' '--ldap-bind-pw=[bind Password for the user specified by bind-dn]:bind password' '--ldap-insecure-no-ssl[required if LDAP host does not use TLS]' '--ldap-insecure-skip-verify[skip certificate verification]' '--ldap-start-tls[start on insecure port, then negotiate TLS]' '--ldap-ca-cert=[CA certificate]: :_files' '--ldap-username-prompt=[propmt when logging in through the UI]:prompt' '--ldap-user-search-base-dn= [baseDN to start the search from]:baseDN' '--ldap-user-search-filter=[optional filter to apply when searching the directory]:filter' '--ldap-user-search-username=[attribute to match against the inputted username]:attribute' "--ldap-user-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:((sub one))" '--ldap-user-search-id-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' '--ldap-user-search-email-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' '--ldap-user-search-name-attr=[a mapping of attributes on the user entry to claims]:attribute mapping' '--ldap-group-search-base-dn=[baseDN to start the search from]:baseDN' '--ldap-group-search-filter=[optional filter to apply when searching the directory]:filter' "--ldap-group-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:(sub one)" "--ldap-group-search-user-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute" "--ldap-group-search-group-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute" '--ldap-group-search-name-attr=[the attribute of the group that represents its name]:attribute' # Authentication Microsoft '--microsoft-client-id=[Microsoft client ID]:id' '--microsoft-client-secret=[Microsoft client secret]:secret' '--microsoft-tenant=[Microsoft Tenant limitation]:tenant' '--microsoft-groups=[allowed Active Directory Groups]:groups' '--microsoft-only-security-groups[only fetch security groups]' # Authentication OAuth2 '--oauth-display-name=[the auth provider name displayed to users on the login page]:display name' '--oauth-client-id=[client id]:client ID' '--oauth-client-secret=[client secret]:client secret' '--oauth-auth-url=[Authorization URL]: :_urls' '--oauth-token-url=[Token URL]: :_urls' '--oauth-userinfo-url=[UserInfo URL]: :_urls' '*--oauth-scope=[any additional scopes that need to be requested during authorization]:scope' '--oauth-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key' '--oauth-user-id-key=[the user id key indicates which claim to use to map an external user id to a Concourse user id]:id key' '--oauth-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:name key' '--oauth-ca-cert=[CA Certificate]: :_files' '--oauth-skip-ssl-validation[skip SSL validation]' # Authorization OIDC '--oidc-display-name=[the auth provider name displayed to users on the login page]:display name' '--oidc-issuer=[An OIDC issuer URL that will be used to discover provider configuration]: :_urls' '--oidc-client-id=[client id]:client ID' '--oidc-client-secret=[client secret]:client secret' '*--oidc-scope=[any additional scopes that need to be requested during authorization]:scope' '--oidc-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key' '--oidc-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:user name key' '--oidc-ca-cert=[CA Certificate]: :_files' '--oidc-skip-ssl-validation[skip SSL validation]' '--oidc-disable-groups[disable OIDC groups claims]' '--oidc-skip-email-verified-validation[ignore the email_verified claim from the upstream provider]' '--oidc-disable-get-user-info[disable not query the additional claims]' # Authorization SAML '--saml-display-name=[SAML auth provider name displayed to users on the login page]:name' '--saml-sso-url=[SAML SSO URL used for POST value]:url:_urls' '--saml-ca-cert=[SAML CA Certificate]: :_files' "--saml-entity-issuer=[SAML manually specify dex's issuer value]" '--saml-sso-issuer=[issuer value expected in the SAML response]:issuer' '--saml-username-attr=[SAML concourse user name]:name' '--saml-email-attr=[SAML concourse email]:name' '--saml-groups-attr=[SAML concourse teams]:name' '--saml-groups-delim=[groups are returned as string with this delimiter]:delimiter' '--saml-name-id-policy-format=[requested format of the NameID]:format' '--saml-skip-ssl-validation[SAML skip SSL validation]' ) local -a concourse_feature_flags=( '--enable-global-resources[enable equivalent resources across pipelines and teams to share a single version history]' '--enable-redact-secrets[enable redacting secrets in build logs]' '--enable-rerun-when-worker-disappears[enable automatically build rerun when worker disappears]' '--enable-across-step[enable the experimental across step to be used in jobs]' '--enable-pipeline-auditing[enable pipeline instances]' '--enable-p2p-volume-streaming[enable P2P volume streaming]' '--enable-cache-streamed-volumes[streamed resource volumes will be cached on the destination]' '--enable-resource-causality[enable the resource causality page]' ) local -a concourse_tsa_configurations=( '--tsa-log-level=[minimum level of logs to see]: :_concourse_log_levels' '--tsa-bind-ip=[IP address on which to listen for SSH]: :_concourse_ip_addresses' '--tsa-peer-address=[network address of this web node, reachable by other web nodes]: :_urls' '--tsa-bind-port=[port on which to listen for SSH]: :_concourse_ports' '--tsa-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' '--tsa-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' '--tsa-host-key=[path to private key to use for the SSH server]: :_files' '--tsa-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_files' '--tsa-team-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_concourse_name_colon_paths' '--tsa-atc-url=[ATC API endpoints to which workers will be registered]: :_urls' '--tsa-client-id=[client used to fetch a token from the auth server]:id' '--tsa-client-secret=[client used to fetch a token from the auth server]:secret' '--tsa-token-url=[token endpoint of the auth server]: :_urls' '*--tsa-scope=[scopes to request from the auth server]' '--tsa-heartbeat-interval=[interval on which to heartbeat workers to the ATC]: :_concourse_durations' '--tsa-garden-request-timeout=[how long to wait for requests to Garden to complete]: :_concourse_durations' '--tsa-cluster-name=[a name for this Concourse cluster]:name' '--tsa-log-cluster-name=[log cluster name]:name' ) case $command in (quickstart) _concourse_quickstart && ret=0 ;; (web) _concourse_web && ret=0 ;; esac return ret } (( $+functions[_concourse_generate-key] )) || _concourse_generate-key() { _arguments \ '(- : *)'{-h,--help}'[display help information]' \ '(-t --type)'{-t,--type=}'[the type of key to generate]:key type:(rsa ssh)' \ '(-f --filename)'{-f,--filename=}'[file path where the key shall be created. When generating ssh keys, the public key will be stored in a file with the same name but with .pub appended]: :_files' \ '(-b --bits)'{-b,--bits=}'[the number of bits in the key to create]:integer' } (( $+functions[_concourse_land-worker] )) || _concourse_land-worker() { _arguments \ '(- : *)'{-h,--help}'[display help information]' \ '--name=[the name of the worker you wish to land]:worker name' \ '*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \ '--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \ '--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files' } (( $+functions[_concourse_migrate] )) || _concourse_migrate() { _arguments \ '(- : *)'{-h,--help}'[display help information]' \ '--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' \ '(- : *)--current-db-version[print the current database version and exit]' \ '(- : *)--supported-db-version[print the max supported database version and exit]' \ '--migrate-db-to-version=[migrate to the specified database version and exit]:database version' \ '--migrate-to-latest-version[migrate to the latest migration version and exit]' \ $concourse_postgres_configurations[@] \ } (( $+functions[_concourse_quickstart] )) || _concourse_quickstart() { local -a concourse_worker_configurations=( '--worker-name=[name to set for the worker during registration]:name' '--worker-tag=[tag to set during registration]:tag' '--worker-team=[name of the team that this worker will be assigned to]:team' '--worker-http-proxy=[HTTP proxy endpoint to use for containers]:proxy:_urls' '--worker-https-proxy=[HTTPS proxy endpoint to use for containers]:proxy:_urls' '*--worker-no-proxy=[blacklist of addresses to skip the proxy when reaching]:url:_urls' '--worker-ephemeral[worker will be immediately removed upon stalling]' '--worker-certs-dir=[directory to use when creating the resource certificates volume]:dir:_files -/' '--worker-work-dir=[directory in which to place container data]:dir:_files -/' '--worker-bind-ip=[IP address on which to listen for the Garden server]:ip' '--worker-bind-port=[port on which to listen for the Garden server]:port' '--worker-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip' '--worker-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port' '--worker-healthcheck-bind-ip=[IP address on which to listen for health checking requests]:ip' '--worker-healthcheck-bind-port=[port on which to listen for health checking requests]:port' '--worker-healthcheck-timeout=[HTTP timeout for the full duration of health checking]: :_concourse_durations' '--worker-sweep-interval=[interval on which containers and volumes will be garbage collected from the worker]: :_concourse_durations' '--worker-volume-sweeper-max-in-flight=[maximum number of volumes which can be swept in parallel]:number' '--worker-container-sweeper-max-in-flight=[maximum number of containers which can be swept in parallel]:number' '--worker-rebalance-interval=[duration after which the registration should be swapped to another random SSH gateway]: :_concourse_durations' '--worker-connection-drain-timeout=[duration after which a worker should give up draining forwarded connections on shutdown]: :_concourse_durations' '--worker-external-garden-url=[API endpoint of an externally managed Garden server to use instead of running the embedded Garden server]:url:_urls' '--worker-resource-types=[path to directory containing resource types the worker should advertise]:dir:_files -/' '--worker-log-level=[minimum level of logs to see]:level:_concourse_log_levels' # TSA Configuration: '--worker-tsa-host=[TSA host to forward the worker through]:host' '--worker-tsa-public-key=[file containing a public key to expect from the TSA]:file:_files' '--worker-tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]:file:_files' # Tracing: '--worker-tracing-service-name=[service name to attach to traces as metadata]:name' '--worker-tracing-attribute=[attributes to attach to traces as metadata]:attr' '--worker-tracing-honeycomb-api-key=[honeycomb.io api key]:key' '--worker-tracing-honeycomb-dataset=[honeycomb.io dataset name]:dataset' '--worker-tracing-jaeger-endpoint=[jaeger http-based thrift collector]:endpoint' '--worker-tracing-jaeger-tags=[tags to add to the components]:tags' '--worker-tracing-jaeger-service=[jaeger process service name]:service' "--worker-tracing-stackdriver-projectid=[GCP's Project ID]:id" '--worker-tracing-otlp-address=[otlp address to send traces to]:address' '--worker-tracing-otlp-header=[headers to attach to each tracing message]:header' '--worker-tracing-otlp-use-tls[whether to use tls or not]' # Runtime Configuration '--worker-runtime=[runtime to use with the worker]:runtime:(guardian containerd houdini)' # Guardian Configuration '--worker-garden-bin=[path to a garden server executable]:bin' '--worker-garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time:_concourse_durations' '--worker-garden-config=[path to a config file to use for the Garden backend]:path:_files' # DNS Proxy Configuration '--worker-garden-dns-proxy-enable[enable proxy DNS server]' # Container Networking '--worker-garden-network-pool=[network range to use for dynamically allocated container subnets]:range' # Limits: '--worker-garden-max-containers=[maximum container capacity]:capacity' # Containerd Configuration: '--worker-containerd-config=[path to a config file to use for the Containerd daemon]:file:_files' '--worker-containerd-bin=[path to a containerd executable]:file:_files' '--worker-containerd-init-bin=[path to an init executable]:file:_files' '--worker-containerd-seccomp-profile=[path to a seccomp filter override]:file:_files' '--worker-containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/' '--worker-containerd-cni-plugins-dir=[path to CNI network plugins]:dir:_files -/' '--worker-containerd-request-timeout=[how long to wait for requests to Containerd to complete]: :_concourse_durations' '--worker-containerd-max-containers=[max container capacity]:capacity' '--worker-containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)' # Containerd Networking "--worker-containerd-external-ip=[IP address to use to reach container's mapped ports]:ip" '--worker-containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip' '--worker-containerd-additional-hosts=[additional entries to add to /etc/hosts in containers]:hosts' '--worker-containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range' '--worker-containerd-network-pool=[network range to use for dynamically allocated container subnets]:range' '--worker-containerd-mtu=[MTU size for container network interfaces]:size' "--worker-containerd-allow-host-access[allow containers to reach the host's network]" # DNS Proxy Configuration: '--worker-containerd-dns-proxy-enable[Enable proxy DNS server]' # IPv6 Configuration: '--worker-containerd-v6-enable[enable IPv6 networking]' '--worker-containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range' '--worker-containerd-v6-disable-masquerade [Masquerade container traffic with worker address]:address' # Baggageclaim Configuration: '--worker-baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels' '--worker-baggageclaim-bind-ip=[IP address on which to listen for API traffic]:ip' '--worker-baggageclaim-bind-port=[port on which to listen for API traffic]:port' '--worker-baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip' '--worker-baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port' '--worker-baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern' '--worker-baggageclaim-p2p-interface-family=[4 for IPv4 and 6 for IPv6]:type:(4 6)' '--worker-baggageclaim-volumes=[directory in which to place volume data]:dir:_files -/' '--worker-baggageclaim-driver=[driver to use for managing volumes]:type:(detect naive btrfs overlay)' '--worker-baggageclaim-btrfs-bin=[path to btrfs binary]:path:_files' '--worker-baggageclaim-mkfs-bin=[path to mkfs binary]:path:_files' '--worker-baggageclaim-overlays-dir=[path to directory in which to store overlay data]:dir:_files -/' '--worker-baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]:namespace' ) _arguments \ $concourse_web_configurations[@] \ "--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \ "--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \ $concourse_postgres_configurations[@] \ $concourse_credential_manager_configurations[@] \ '--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \ '--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \ '--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \ $concourse_container_placement_strategy_configurations[@] \ $concourse_metric_configurations[@] \ $concourse_tracing_configurations[@] \ $concourse_policy_check_agent_configurations[@] \ $concourse_web_server_configurations[@] \ $concourse_gc_configurations[@] \ $concourse_syslog_configurations[@] \ $concourse_authentication_configurations[@] \ $concourse_feature_flags[@] \ $concourse_tsa_configurations[@] \ $concourse_worker_configurations[@] } (( $+functions[_concourse_retire-worker] )) || _concourse_retire-worker() { _arguments \ '(- : *)'{-h,--help}'[display help information]' \ '--name=[the name of the worker you wish to retire]:worker name' \ '--team=[the team name of the worker you with to retire]:team name' \ '*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \ '--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \ '--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files' } (( $+functions[_concourse_web] )) || _concourse_web() { local -a placement_strategies=( volume-locality random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes ) local -a second_placement_strategies=( random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes ) _arguments \ '(- : *)'{-h,--help}'[display help information]' \ $concourse_web_configurations[@] \ "--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \ "--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \ $concourse_postgres_configurations[@] \ $concourse_credential_manager_configurations[@] \ '--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \ '--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \ '--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \ $concourse_container_placement_strategy_configurations[@] \ $concourse_metric_configurations[@] \ $concourse_tracing_configurations[@] \ $concourse_policy_check_agent_configurations[@] \ $concourse_web_server_configurations[@] \ $concourse_gc_configurations[@] \ $concourse_syslog_configurations[@] \ $concourse_authentication_configurations[@] \ $concourse_feature_flags[@] \ $concourse_tsa_configurations[@] } (( $+functions[_concourse_worker] )) || _concourse_worker() { _arguments \ '(- : *)'{-h,--help}'[display help information]' \ '--name=[the name to set for the worker during registration]:name' \ '*--tag=[a tag to set during registration]:tag' \ '--team=[the name of the team that this worker will be assigned to]:team name' \ '--http-proxy=[HTTP proxy endpoint to use for containers]: :_urls' \ '--https-proxy=[HTTPS proxy endpoint to use for containers]: :_urls' \ '*--no-proxy=[blacklist of addresses to skip the proxy when reaching]: :_urls' \ '--ephemeral[if set, the worker will be immediately removed upon stalling]' \ '--certs-dir=[directory to use when creating the resource certificates volume]: :_files -/' \ '--work-dir=[directory in which to place container data]: :_files -/' \ '--bind-ip=[IP address on which to listen for the Garden server]: :_concourse_ip_addresses' \ '--bind-port=[port on which to listen for the Garden server]: :_concourse_ports' \ '--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \ '--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \ '--healthcheck-bind-ip=[IP address on which to listen for health checking requests]: :_concourse_ip_addresses' \ '--healthcheck-bind-port=[port on which to listen for health checking requests]: :_concourse_ports' \ '--healthcheck-timeout=[HTTP timeout for the full duration of health checking]: :_concourse_durations' \ '--sweep-interval=[interval on which containers and volumes will be garbage collected from the worker]: :_concourse_durations' \ '--volume-sweeper-max-in-flight=[maximum number of volumes which can be swept in parallel]:number' \ '--container-sweeper-max-in-flight=[maximum number of containers which can be swept in parallel]:number' \ '--rebalance-interval=[duration after which the registration should be swapped to another random SSH gateway]: :_concourse_durations' \ '--connection-drain-timeout=[duration after which a worker should give up draining forwarded connections on shutdown]: :_concourse_durations' \ '--external-garden-url=[API endpoint of an externally managed Garden server to use instead of running the embedded Garden server]: :_urls' \ '--resource-types=[path to directory containing resource types the worker should advertise]: :_files -/' \ '--log-level=[minimum level of logs to see]: :_concourse_log_levels' \ '*--tsa-host=[TSA host to forward the worker through]: :_hosts' \ '--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \ '--tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]: :_files' \ '--runtime=[runtime to use with the worker(default: guardian)]:runtime:(guardian containerd houdini)' \ '--garden-bin=[path to gdn executable (or leave as gdn to find it in $PATH)]: :_path_commands' \ '--garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time' \ '--garden-config=[path to a config file to use for Garden]: :_files' \ '--garden-dns-proxy-enable[enable proxy DNS server]' \ '--garden-network-pool=[network range to use for dynamically allocated container subnets]:range' \ '--garden-max-containers=[maximum container capacity for Garden]:limit' \ '--containerd-config=[path to a config file to use for the Containerd]:path:_files' \ '--containerd-bin=[path to a containerd executable]:command:_path_commands' \ '--containerd-init-bin=[path to an init executable]:init:_files' \ '--containerd-seccomp-profile=[path to a seccomp filter override]:filter:_files' \ '--containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/' \ '--containerd-cni-plugins-dir=[path to CnI network plugins]:dir:_files -/' \ '--containerd-request-timeout=[how long to wait for requests to Containerd to complete]:timeout' \ '--containerd-max-containers=[max conatiner capacity for containerd]:limit' \ '--containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)' \ "--containerd-external-ip=[IP address to use to reach container's mapped ports]:ip" \ '--containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip' \ '--containerd-additional-hosts=[additioanl entries to add to /etc/hosts in containers]:hosts' \ '--containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range' \ '--containerd-network-pool=[network range to use for dynamically allocated containers subnets]:range' \ '--containerd-mtu=[MTU size for container network interfaces]:size' \ "--containerd-allow-host-access[allow containers to reach the host's network]" \ '--containerd-dns-proxy-enable[enable proxy DNS server]' \ '--containerd-v6-enable[enable IPv6 networking]' \ '--containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range' \ '--containerd-v6-disable-masquerade[Masquerade container traffic with worker address]' \ '--baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels' \ '--baggageclaim-bind-ip=[IP address on which to listen for API traffic]: :_concourse_ip_addresses' \ '--baggageclaim-bind-port=[port on which to listen for API traffic]: :_concourse_ports' \ '--baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \ '--baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \ '--baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern' \ '--baggageclaim-p2p-interface-family=[IPv4 or IPv6(default IPv4)]:type:(4 6)' \ '--baggageclaim-volumes=[directory in which to place volume data]: :_files -/' \ '--baggageclaim-driver=[driver to use for managing volumes]:driver:(detect naive btrfs overlay)' \ '--baggageclaim-btrfs-bin=[path to btrfs binary]: :_path_commands' \ '--baggageclaim-mkfs-bin=[path to mkfs.btrfs binary]: :_files' \ '--baggageclaim-overlays-dir=[path to directory in which to store overlay data]: :_files -/' \ '--baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]' } (( $+functions[_concourse_config_files] )) || _concourse_config_files() { _files -g "*.(yml|yaml)" } (( $+functions[_concourse_ip_addresses] )) || _concourse_ip_addresses() { _message 'IP address' } (( $+functions[_concourse_ports] )) || _concourse_ports() { _message 'port number' } (( $+functions[_concourse_host_colon_ports] )) || _concourse_host_colon_ports() { local ret=1 if compset -P '*:'; then _concourse_ports && ret=0 else _alternative \ 'hosts: :_hosts -qS:' \ 'ip-addresses: :_guard "[[:digit:]]*" "IP address"' \ && ret=0 fi return ret } (( $+functions[_concourse_type_colon_images] )) || _concourse_type_colon_images() { local ret=1 if compset -P '*:'; then _message 'type' && ret=0 else _message 'image' && ret=0 fi return ret } (( $+functions[_concourse_name_colon_values] )) || _concourse_name_colon_values() { local ret=1 if compset -P '*:'; then _message 'name' && ret=0 else _message 'value' && ret=0 fi return ret } (( $+functions[_concourse_username_colon_passwords] )) || _concourse_username_colon_passwords() { local ret=1 if compset -P '*:'; then _message 'username' && ret=0 else _message 'password' && ret=0 fi return ret } (( $+functions[_concourse_name_colon_paths] )) || _concourse_name_colon_paths() { local ret=1 if compset -P '*:'; then _message 'name' && ret=0 else _files && ret=0 fi return ret } (( $+functions[_concourse_durations] )) || _concourse_durations() { _message 'duration, eg: "5s", "5m", "5h", "5d"' } (( $+functions[_concourse_log_levels] )) || _concourse_log_levels() { local levels=( 'debug:debug traces' 'info:normal log level' 'error:log only errors' 'fatal:log only fatal errors' ) _describe -t log-levels 'log level' levels } _concourse_server "$@" # 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 ================================================ FILE: src/_cppcheck ================================================ #compdef cppcheck # ------------------------------------------------------------------------------ # Copyright (c) 2019 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 cppcheck -- a tool for static C/C++ code analysis (https://cppcheck.sourceforge.io/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Georgy Komarov (https://github.com/jubnzv) # # ------------------------------------------------------------------------------ # Notes # ----- # # Created for Cppcheck version 2.17.1 (https://github.com/danmar/cppcheck) # # ------------------------------------------------------------------------------ _cppcheck_files() { _path_files -/ -g "*.(c|cpp|cxx|h|hpp|C)" } _cppcheck() { local check_ids='(all warning style performance portability information unusedFunction missingInclude)' local platforms='(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)' local coding_standards='(normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-cpp-2008 misra-cpp-2023)' _arguments \ "--addon=[Execute addon]" \ "--addon-python=[Specify the python interpreter]: :_files" \ "--cppcheck-build-dir=[Analysis output directory]:directory:_files -/" \ "--check-config[Check cppcheck configuration]" \ "--check-level=[Configure how much valueflow analysis you want]:level:(reduced normal exhaustive)" \ "--check-library[Show information when library files have incomplete info]" \ "--checkers-report=[Write a report of all the active checkers to the given file]:file:_files" \ "--clang=[Use clang parser instead of the builtin Cppcheck parser]: :_files" \ "--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \ "--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \ "--doc[Print a list of all available checks]" \ "*--disable=[Disable individual checks]:id:$check_ids" \ "--dump[Dump xml data for each translation unit]" \ "-D[Define preprocessor symbol]" \ "-E[Print preprocessor output on stdout and don't do any further processing]" \ "--enable=[Enable additional checks]:id:$check_ids" \ "--error-exitcode=[Integer to return if errors are found]" \ "--errorlist[Print a list of all the error messages in XML format]" \ "--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \ "*--file-filter=[Analyze only those files matching the given filter str]:filter" \ "--file-list=[Specify the files to check in a text file]:file:_files" \ "(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \ "(--fsigned-char --funsigned-char)--fsigned-char[Treat char type as signed]" \ "(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \ "(- 1 *)"{-h,--help}"[Print this help]" \ "-I[A file that contains a list of config-excludes]:directory:_files -/" \ "--include-file=[Specify directory paths to search for included header files in a text file]:file:_files" \ "--include=[Force inclusion of a file before the checked file]:file:_files" \ "-i[Give a source file or source file directory to exclude from the check]:directory or file:_files" \ "--inconclusive[Report even though the analysis is inconclusive]" \ "--inline-suppr[Enable inline suppressions]" \ "-j[Number of threads to do the checking simultaneously]::num" \ "-l[No new threads should be started if the load average is exceeds this value]::load_avg" \ {-x,--language=}"[Forces cppcheck to check all files as the given language]:language:(c c++)" \ "--library=[Load config file that contains information about types and functions]:config:_files" \ "--max-configs=[Maximum number of configurations to check in a file]" \ "--max-ctu-depth=[Maximum depth in whole program analysis]:num" \ "--output-file=[File to save results]:file:_files" \ "--output-format=[Specify the output format]:format:(text sarif xml)" \ "--platform=[Specified platform specific types and sizes]:platform:$platforms" \ "--plist-output=[Generate Clang-plist output files in folder]:file:_files" \ "--project=[Run Cppcheck on project]:file:_files" \ "--project-configuration=[Limit the configuration cppcheck should check]:configuration" \ "(-q --quiet)"{-q,--quiet}"[Do not show progress reports]" \ {-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:file:_files" \ "--report-progress[Report progress messages while checking a file]" \ "--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \ "--rule=[Match regular expression]:rule" \ "--rule-file=[Use given rule file]:file:_files" \ "--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \ "--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \ "--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \ "--suppressions-list=[Suppress warnings listed in the file]:file:_files" \ "--suppress-xml=[Suppress warnings listed in a xml file]:file:_files" \ "--template=[Format the error messages]" \ "--template-location=[Format the error message location]" \ "*-U[Undefine preprocessor symbol]:symbol" \ "(-v --verbose)"{-v,--verbose}"[Output more detailed error information]" \ "--version[Print out version number]" \ "--xml[Write results in xml format to stderr]" \ "*: :_cppcheck_files" } _cppcheck "$@" # 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 ================================================ FILE: src/_dad ================================================ #compdef dad # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 dad a command line manager of aria2 daemon. (https://github.com/baskerville/diana). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ _dad() { typeset -A opt_args local context state line local curcontext="$curcontext" local -a commands=( "start:Start aria2c daemon" "stop:Stop aria2c daemon" ) _arguments -C \ '(- 1 *)'-h"[Show help and exit]" \ "-d[Set download dir]:download_dir:->val" \ "-s[Set secret token]:secret_token:->val" \ "-u[Set aria2c username]:username:->val" \ "-p[Set aria2c password]:password:->val" \ '1:cmd:->cmds' \ '*: :->args' case "$state" in (cmds) _describe -t commands 'commands' commands ;; esac } _dad # 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 ================================================ FILE: src/_dart ================================================ #compdef dart # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 dart 3.11.0 (https://dart.dev/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _dart() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C -A "-*" \ '(-v --verbose)'{-v,--verbose}'[Show additional command output]' \ '(- *)--version[Print the Dart SDK version]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--enable-analytics[Enable analytics]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--disable-analytics[Disable analytics]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Disallow analytics for this "dart *" run without changing the analytics configuration]' \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_subcommands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) case $words[1] in (help) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_subcommands' \ && ret=0 ;; (analyze) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--fatal-infos[Treat info level issues as fatal]' \ '(--no-fatal-warnings --fatal-warnings)--fatal-warnings[Treat warnings level issue as fatal]' \ '(--no-fatal-warnings --fatal-warnings)--no-fatal-warnings[Do not treat warnings level issue as fatal]' \ '*: :_files -/' \ && ret=0 ;; (compile) _dart_compile && ret=0 ;; (create) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-t --template)'{-t,--template}'[The project template to use]:template:(cli console package server-shelf web)' \ '(--no-pub --pub)--pub[Run "pub get" after the project has been created]' \ '(--no-pub --pub)--no-pub[Do not run "pub get" after the project has been created]' \ '--force[Force project generation even if the target directory already exists]' \ '*: :_files -/' \ && ret=0 ;; (devtools) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(- *)--version[Prints the DevTools version]' \ '--host=[Hostname to serve DevTools on(defaults to localhost)]:host' \ '--port=[Port to serve DevTools on, specify 0 to automatically use any available port(defaults to 9100)]:port' \ '--dtd-uri=[A URI pointing to a Dart Tooling Daemon]:uri' \ '(--no-launch-browser --launch-browser)--launch-browser[Launches DevTools in a browser immediately at start]' \ '(--no-launch-browser --launch-browser)--no-launch-browser[Do not launches DevTools in a browser immediately at start]' \ '--machine[Sets output format to JSON for consumption in tools]' \ '--record-memory-profile=[Start devtools headlessly and write memory profiling samples to the indicated file]:file:_files' \ '--app-size-base=[Path to the base app size file used for app size]' \ '(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \ '(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \ '*:server_uri :' \ && ret=0 ;; (doc) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-o --output)'{-o,--output=}'[Configuration the output directory(defaults to "doc/api")]:dir:_files -/' \ '(--dry-run)--validate-links[Display warnings for broken links]' \ '(--validate-links)--dry-run[Try to generate the docs without saving them]' \ '*:dir:_files -/' \ && ret=0 ;; (fix) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-n --dry-run)'{-n,--dry-run}'[Preview the proposed changes but make no changes]' \ '--apply[Apply the proposed changes]' \ '--code=[Apply fixes for one or more diagnostics codes]:codes' \ '*: :_files' \ && ret=0 ;; (format) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \ '(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \ '--show[Set which filenames to print]:show type:(all changed none)' \ '--summary[Show the specified summary after formatting]:summary type:(line none profile)' \ '--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \ '--page-width[Try to keep lines no longer than this(defaults to 80)]:width' \ '--trailing-commas[How trailing commas in input affect formatting]:style:(automate preserve)' \ '(-i --indent)'{-i,--indent}'[Add this many spaces of leading indentation]' \ '--follow-links[Follow links to files and directories]' \ '(- *)--version[Show dart_style version]' \ '--enable-experiment[Enable one or more experimental features]:features' \ '--selection[Track selection through formatting]:selection' \ '--stdin-name[Use this path in error messages when input is read from stdin]:name' \ '*:file_or_directory:_files' \ && ret=0 ;; (info) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--no-remove-file-paths --remove-file-paths)--remove-file-paths[Remove file paths in displayed information]' \ '(--no-remove-file-paths --remove-file-paths)--no-remove-file-paths[Do not remove file paths in displayed information]' \ '*: :_files' \ && ret=0 ;; (pub) _dart_pub && ret=0 ;; (run) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-r --resident)'{-r,--resident}'[Enable faster startup times with the resident frontend compiler]' \ '--resident-compiler-info-file[The path to an info file to use to communicate with a resident frontend compiler]:file:_files' \ '--observe=[Specify debug port and bind address]:port_address' \ '--enable-vm-service=[Enable the VM service and listens on the specified port for connections(default port 8181)]:port_address' \ '(--serve-devtools --no-serve-devtools)--serve-devtools[Serves an instance of the Dart DevTools debugger and profiler]' \ '(--serve-devtools --no-serve-devtools)--no-serve-devtools[Do not serve an instance of the Dart DevTools debugger and profiler]' \ '--pause-isolates-on-exit[Pause isolates on exit when running with --enable-vm-service]' \ '--pause-isolates-on-unhandled-exceptions[Pause isolates when an unhandled exception is encountered when running with --enable-vm-service]' \ '--warn-on-pause-with-no-debugger[Print a warning when an isolate pauses with no attached debugger when running with --enable-vm-service]' \ '--timeline-streams=[Enables recording for specific timeline streams]:stream:_dart_run_timeline_streams' \ '--pause-isolates-on-start[Pause isolates on start when running with --enable-vm-service]' \ '--profile-microtasks[Record information about each microtask]' \ '(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \ '(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \ '--timeline-recorder=[Selects the timeline recorder to use]:recorder:(none ring endless startup systrace file callback)' \ '--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)' \ '*'{-d,--define=}'[Define an environment declaration]:key_value:' \ '--disable-service-auth-codes[Disables the requirement for an authentication code]' \ '--enable-service-port-fallback[Use 0 if binding port is failed]' \ '--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \ '--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:file:_files -/' \ '--trace-loading[Enable tracing of library and script loading]' \ '--packages=[The path to the package resolution configuration file]:file:_files'\ '--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \ '(--no-dds --dds)--dds[Use the Dart Development Service for enhanced debugging functionality]' \ '(--no-dds --dds)--no-dds[Not use the Dart Development Service for enhanced debugging functionality]' \ '(--no-serve-observatory --serve-observatory)--serve-observatory[Enable hosting Observatory throught the VM service]' \ '(--no-serve-observatory --serve-observatory)--no-serve-observatory[Disable hosting Observatory throught the VM service]' \ '(--no-print-dtd --print-dtd)--print-dtd[Prints connection details for the Dart Tooling Daemon]' \ '(--no-print-dtd --print-dtd)--no-print-dtd[Not print connection details for the Dart Tooling Daemon]' \ '--enable-experiment=[Enable one or more experimental features]:features:_dart_run_enable_experiment' \ '*: :_files' \ && ret=0 ;; (test) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(- *)--version[Show the package:test version]' \ '*'{-n,--name}'[A substring of the name of the test to run]:name' \ '*'{-N,--plain-name}'[A plain-text substring of the name of the test to run]:plain_name' \ '*'{-t,--tags}'[Run only tests with all of the specified tags]:tag' \ '*'{-x,--exclude-tags}'[Do not run tests with any of the specified tags]:tag' \ '--run-skipped[Run skipped tests instead of skipping them]' \ '(-p --platform)'{-p,--platform}'[The platform on which to run the tests]:platform:(vm chrome firefox edge node experimental-chrome-wasm)' \ '(-c --compiler)'{-c,--compiler}'[The compiler to use to run tests]:compiler:(dart2js dart2wasm exe kernel source)' \ '(-P --preset)'{-P,--preset}'[The configuration preset to use]:preset' \ '(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \ '--total-shards[The total number of invocations of the test runner being run]:number' \ '--shard-index[The index of this test runner invocation]:index' \ '(--ignore-timeouts --timeout)--timeout[The default test timeout]:timeout' \ '(--ignore-timeouts --timeout)--ignore-timeouts[Ignore all timeouts]' \ '--pause-after-load[Pause for debugging before any tests execute]' \ '--debug[Run the VM and Chrome tests in debug mode]' \ '--coverage=[Gather coverage and output it to the specified directory]:dir:_files -/' \ '(--no-chain-stack-traces --chain-stack-traces)--chain-stack-traces[Use chained stack traces to provide greater exception]' \ '(--no-chain-stack-traces --chain-stack-traces)--no-chain-stack-traces[Do not use chained stack traces to provide greater exception]' \ '--no-retry[Do not rerun tests that have retry set]' \ '--test-randomize-ordering-seed[Use the specified seed to randomize the execution order of test cases]:seed' \ '(--no-fail-test --fail-test)--fail-test[Stop running tests after the first failure]' \ '(--no-fail-test --fail-test)--no-fail-test[Do not stop running tests after the first failure]' \ '(-r --reporter)'{-r,--reporter=}'[Set how to print test results]:reporter:_dart_test_reporter' \ '--file-reporter[Enable an additional reporter writing test results to a file]:reporter_file' \ '--verbose-trace[Emit stack traces with core library frames]' \ '--js-trace[Emit raw JavaScript stack traces for browser tests]' \ '(--color --no-color)--color[Use terminal colors]' \ '(--color --no-color)--no-color[Do not use terminal colors]' \ '*: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_dart_compile] )) || _dart_compile() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_compile_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '(-o --output)'{-o,--output}'[Write the output to file]:output:_files' ) case $words[1] in (aot-snapshot|exe|jit-snapshot|kernel) opts+=( '--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)' '(-p --packages)'{-p,--packages=}'[Get package locations from the specified file instead of .dart_tool/package_config.json]:config:_files' ) ;| (aot-snapshot|exe|jit-snapshot|kernel|wasm) opts+=( '*'{-d,--define=}'[Define an environment declaration]:key_value:' ) ;| (aot-snapshot|exe|kernel) opts+=( '--depfile=[Path to output Ninja depfile]:file:_files' ) ;| (aot-snapshot|exe) opts+=( '(-S --save-debugging-info)'{-S,--save-debugging-info=}'[Remove debugging information from the output and save it separately to the specified file]:file:_files' '--target-os[Compile to a specific target operating system]:os:(android fuchsia ios linux macos windows)' ) ;| (aot-snapshot|wasm) opts+=( '--enable-asserts[Enable assert statements]' ) ;| (kernel) opts+=( '(--no-link-platform --link-platform)--link-platform[Include the platform kernel in the resulting kernel file]' '(--no-link-platform --link-platform)--no-link-platform[Do not include the platform kernel in the resulting kernel file]' '(--no-embed-sources --embed-sources)--embed-sources[Embed source files in the generated kernel component]' '(--no-embed-sources --embed-sources)--no-embed-sources[Do not embed source files in the generated kernel component]' ) ;| (wasm) opts+=( '(--no-source-maps --source-maps)--source-maps[Generate a source map file]' '(--no-source-maps --source-maps)--no-source-maps[Not generate a source map file]' ) ;; (js) opts+=( '-O-[Set the compiler optimization level(defaults to -O1)]:level:(0 1 2 3 4)' ) ;; esac opts+=('*:entry_point:_files') _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_compile_subcommands] )) || _dart_compile_subcommands() { local -a commands=( "aot-snapshot:Compile Dart to an AOT snapshot" "exe:Compile Dart to a self-contained executable" "jit-snapshot:Compile Dart to a JIT snapshot" "js:Compile Dart to JavaScript" "kernel:Compile Dart to a kernel snapshot" "wasm:Compile Dart to a WebAssembly/WasmGC module" ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_format_output] )) || _dart_format_output() { local -a outputs=( "json:Print code and selection as JSON" "none:Discard output" "show:Print code to terminal" "write:Overwrite formatted files on disk(default)" ) _describe -t outputs 'output' outputs "$@" } (( $+functions[_dart_pub] )) || _dart_pub() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-v --verbose)'{-v,--verbose}'[Print detailed logging]' \ '(--color --no-color)--color[Use colors in terminal output]' \ '(--color --no-color)--no-color[Do not use colors in terminal output]' \ '(-C --directory)'{-C,--directory=}'[Run the subcommand in the directory]:dir:_files -/'\ '1: :_dart_pub_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' ) case $words[1] in (add|downgrade|get|publish|remove|upgrade) opts+=( '(- *)'{-h,--help}'[Print this usage information]' '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' '(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/' '*: :_files' ) ;| (add|downgrade|get|upgrade) opts+=( '--offline[Use cached packages instead of accessing the network]' ) ;| (add|get|remove|upgrade) opts+=( '--precompile[Build executables in immediate dependencies]' '--no-example[Do not run "example/" if it exists]' ) ;| (get) opts+=( '--enforce-lockfile[Enforce pubspec.lock]' ) ;| (publish) opts+=( '(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]' '--skip-validation[Publish without validation and resolution]' '--ignore-warnings[Do not treat warnings as fatal]' ) ;| (upgrade) opts+=( '--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]' '--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]' '--major-versions[Upgrades packages to their latest resolvable versions and updates pubspec.yaml]' ) ;| (bump) _dart_pub_bump && return 0 ;; (cache) _dart_pub_cache && return 0 return 1 ;; (deps) opts+=( '(-s --style)'{-s,--style}'[How output should be displayed]:style:(compact tree list)' '(--dev --no-dev)--dev[Include dev dependencies]' '(--dev --no-dev)--no-dev[Do not include dev dependencies]' '--executables[List all available executables]' '--json[Output dependency information in a json format]' '(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/' ) ;; (global) _dart_pub_global && return 0 return 1 ;; (outdated) opts+=( '(--no-dependency-overrides --dependency-overrides)--dependency-overrides[Show resolutions with "dependency_overrides"]' '(--no-dependency-overrides --dependency-overrides)--no-dependency-overrides[Do not show resolutions with "dependency_overrides"]' '(--no-dev-dependencies --dev-dependencies)--dev-dependencies[Take dev dependencies into account]' '(--no-dev-dependencies --dev-dependencies)--no-dev-dependencies[Do not take dev dependencies into account]' '--json[Output the results using a json format]' '(--no-prereleased --prereleases)--prereleases[Include prereleases in latest version]' '(--no-prereleased --prereleases)--no-prereleases[Do not include prereleases in latest version]' '(--no-show-all --show-all)--show-all[Include dependencies that are already fulfilling --mode]' '(--no-show-all --show-all)--no-show-all[Do not include dependencies that are already fulfilling --mode]' '(--no-transitive --transitive)--transitive[Show transitive dependencies]' '(--no-transitive --transitive)--no-transitive[Do not show transitive dependencies]' '(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/' ) ;; (token) _dart_pub_token && return 0 return 1 ;; esac _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_subcommands] )) || _dart_pub_subcommands() { local -a commands=( "add:Add dependencies to 'pubspec.yaml'" "bump:Increases the version number of the current package" "cache:Work with the system cache" "deps:Print package dependencies" "downgrade:Downgrade the current package's dependencies to oldest versions" "get:Get the current package's dependencies" "global:Work with global packages" "login:Log into pub.dev" "logout:Log out of pub.dev" "outdated:Analyze your dependencies to find which ones can be upgraded" "publish:Publish the current package to pub.dev" "remove:Removes dependencies from 'pubspec.yaml'" "token:Manage authentication tokens for hosted pub repositories" "unpack:Downloads a package and unpacks it in place" "upgrade:Upgrade the current package's dependencies to latest versions" "workspace:Work with the pub workspace" ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_pub_bump] )) || _dart_pub_bump() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_pub_bump_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '(-n --dry-run)'{-n,--dry-run}'[Report what would change, but do not change anything]' ) _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_bump_subcommands] )) || _dart_pub_bump_subcommands() { local -a commands=( 'breaking:Increment to the next breaking version(eg. 0.1.2 -> 0.2.0)' 'major:Increment the major version number(eg. 3.1.2 -> 4.0.0)' 'minor:Increment the minor version number(eg. 3.1.2 -> 3.2.0)' 'patch:Increment the patch version number(eg. 3.1.2 -> 3.1.3)' ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_pub_cache] )) || _dart_pub_cache() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_pub_cache_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '*: :_files' ) case $words[1] in (add) opts+=( '--all[Install all matching versions]' '(-v --version)'{-v,--version}'[Version constraint]:version' ) ;; (clean) opts+=( '(-f --force)'{-f,--force}'[Do not ask for confirmation]' ) ;; esac _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_cache_subcommands] )) || _dart_pub_cache_subcommands() { local -a commands=( "add:Install a package" "clean:Clears the global PUB_CACHE" "repair:Reinstall cached packages" ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_pub_global] )) || _dart_pub_global() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_pub_global_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '*: :_files' ) case $words[1] in (activate) opts+=( '(-s --source)'{-s,--source}'[The source used to find the package]:source' '--git-path[Path of git package in repository]:git_path' '--git-ref[Git branch or commit to be retrieved]:git_ref' '(-x --executable --noexecutables)--no-executables[Do not put executables on PATH]' '(-x --executable --noexecutables)'{-x,--executable}'[Executable to place on PATH]' '--overwrite[Overwrite executables from other packages with the same name]' '(-u --hosted-url)'{-u,--hosted-url}'[A custom pub server URL for the package]:server' ) ;; (run) opts+=( '(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' '(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' '*--enable-experiment=[Runs the executable in a VM with the given experiments enabled]:experiment' ) ;; esac _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_global_subcommands] )) || _dart_pub_global_subcommands() { local -a commands=( "activate:Make a package's executables globally available" "deactivate:Remove a previously activated package" "list:List globally activated packages" "run:Run an executable from a globally activated package" ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_pub_token] )) || _dart_pub_token() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_pub_token_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '*: :_files' ) case $words[1] in (add) opts+=( '--env-var=[Read the secret token from this environment variable]:envvar' ) ;; (remove) opts+=( '--all[Remove all secret tokens]' ) ;; esac _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_token_subcommands] )) || _dart_pub_token_subcommands() { local -a commands=( "add:Add an authentication token for a package repository" "list:List servers for which a token exists" "remove:Remove secret token for package repository at hosted-url" ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_pub_workspace] )) || _dart_pub_workspace() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_dart_pub_workspace_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a opts=( '(- *)'{-h,--help}'[Print this usage information]' '--json[Output information in a json format]' ) _arguments "$opts[@]" && ret=0 ;; esac return $ret } (( $+functions[_dart_pub_workspace_subcommands] )) || _dart_pub_workspace_subcommands() { local -a commands=( 'list:List all packages in the workspace and their directory' ) _describe -t commands 'command' commands "$@" } (( $+functions[_dart_run_timeline_streams] )) || _dart_run_timeline_streams() { local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM) _values -s ',' streams $streams } (( $+functions[_dart_run_enable_experiment] )) || _dart_run_enable_experiment() { local -a features=( 'augumentations:Augumentations - enhancing declarations from outside' 'const-function:Allow more of the Dart language to be executed in const expression' 'dot-shorthands:Shorter dot syntax for static accesses' 'enhanced-parts:Generalize parts to be nested and have exports/imports' 'getter-setter-error:Stop reporting errors about mismatching types in a getter/setter pair' 'inference-update-4:A bundle of updates to type inference' 'macros:Static meta-programming' 'native-asserts:Compile and bundle native asserts' 'null-aware-elements:Null-aware elements and map entries in collections' 'record-use:Output arguments used by static functions' 'sound-flow-analysis:Assume sound null safety when computing type promotion, reachability, definite assignment' 'test-experiment:Has no effect' 'unquoted-imports:Shorter import syntax' 'variance:Sound variance' ) _describe -t features 'command' features "$@" } (( $+functions[_dart_test_reporter] )) || _dart_test_reporter() { local -a reporters=( "compact:A single line, updated continuously" "expanded:A separate line for each update" "failures-only:A separate line for failing tests with no output for passing tests" "github:A custom reporter for GitHub Actions" "json:A machine-readable format" "silent:A reporter with no output" ) _describe -t reporters 'reporter' reporters "$@" } (( $+functions[_dart_subcommands] )) || _dart_subcommands() { local -a commands=( "analyze:Analyze Dart code in a directory" "compile:Compile Dart to various formats" "create:Create a new Dart project" "devtools:Open DevTools (optionally connecting to an existing application)" "doc:Generate API documentation for Dart projects" "fix:Apply automated fixes to Dart source code" "format:Idiomatically format Dart source code" "info:Show diagnostic information about the installed tooling" "pub:Work with packages" "run:Run a Dart program" "test:Run tests for a project" ) _describe -t commands 'command' commands "$@" } _dart "$@" # 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 ================================================ FILE: src/_dget ================================================ #compdef dget # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 dget 2.25.19 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Kris Shannon # * Shohei YOSHIDA # # ------------------------------------------------------------------------------ _arguments -A "-*" \ '(- *)'{-h,--help}'[Show help message]' \ '(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \ '(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \ '(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \ '(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \ '(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \ '(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \ '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \ '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \ '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \ '(--no-conf -k --insecure)'{-k,--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"' # 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 ================================================ FILE: src/_dhcpcd ================================================ #compdef dhcpcd # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for dhcpcd 9.4.1 (http://roy.marples.name/projects/dhcpcd/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ _arguments \ '(-b --background)'{-b,--background}'[Background immediately]' \ '(-c --script)'{-c,--script}'[Use this script instead of the default]: :_files' \ '(-D --duid)'{-D,--duid}'[Use a DHCP Unique Identifier]:id' \ '(-d --debug)'{-d,--debug}'[Echo debug messages to the stderr and syslog]' \ '(-E --lastlease)'{-E,--lastlease}'[If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface]' \ '--lastleaseextend[Same as the -E/--lastlease, but the lease will be retained even if it expires]' \ \*{-e,--env}'[Push value to the environment for use in dhcpcd-run-hooks(8)]:env' \ '(-g --reconfigure)'{-g,--reconfigure}'[dhcpcd will re-apply IP address, routing and run dhcpcd-run-hooks(8) for each interface]' \ '(-F --fqdn)'{-F,--fqdn}'[Requests that the DHCP server updates DNS using FQDN instead of just a hostname]:fqdn' \ '(-f --config)'{-f,--config}'[Specify a config to load instead of default]: :_files' \ '(-h --hostname)'{-h,--hostname}'[Sends hostname to the DHCP server so it can be registered in DNS]:hostname' \ '(-I --clientid)'{-I,--clientid}'[Send the clientid]:clientid' \ '(-i --vendorclassid)'{-i,--vendorclassid}'[Override the DHCPv4 venderclassid field sent]:vendorclassid' \ '(-j --logfile)'{-j,--logfile}'[Writes to the specified logfile]: :_files' \ \*{-k,--release}'[Release its lease and de-configure the interface regardless of -p, --persistent option]: :_net_interfaces' \ '(-l --leasetime)'{-l,--leasetime}'[Request a lease time of seconds. -1 represents an infinite lease time]:seconds' \ '(-M --manager)'{-M,--manager}'[Start dhcpcd in Manager mode even if only one interface specified on the command line]' \ '(-m --metric)'{-m,--metric}'[Metrics are used to prefer an interface over another one, lowest wins]:metric' \ \*{-n,--rebind}'[Notifies dhcpcd to reload its configuration and rebind the specified interface]: :_net_interfaces' \ \*{-N,--renew}'[Notifies dhcpcd to renew existing addresses on the specified interface]: :_net_interfaces' \ \*{-o,--option}'[Request the DHCP option variable for use in dhcpcd-run-hooks]:option' \ '(-p --persistent)'{-p,--persistent}"[Don't de-configure the interface and configuration at exit]" \ '(-r --request)'{-r,--request}'[Request the address in the DHCP DISCOVER message]:address' \ '(-s --inform)'{-s,--inform}'[Behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \ '--inform6[Performs a DHCPv6 Information Request]' \ \*{-S,--static}'[Configures a static DHCP value]:value' \ '(-t --timeout)'{-t,--timeout}'[Timeout after seconds]:seconds' \ '(-u --userclass)'{-u,--userclass}'[Tags the DHCPv4 message with the userclass class]:class' \ '(-v --vendor)'{-v,--vendor}'[Add an encapsulated vendor option]:vendor' \ '(- *)--version[Display both program version and copyright information]' \ '-w[Wait for an address to be assigned before forking to the background]' \ '--waitip=[Wait for an address to assigned before forking to the background]: :(4 6)' \ \*{-x,--exit}'[This will signal an existing dhcpcd process running on the interface to exit]: :_net_interfaces' \ '(-y --reboot)'{-y,--reboot}'[Allow reboot seconds before moving to the discover phase if we have an old lease to use]:seconds' \ '1:network interface:_net_interfaces' # 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 ================================================ FILE: src/_diana ================================================ #compdef diana # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Diana a command line interface to the aria2 daemon. (https://github.com/baskerville/diana). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ local GIDs PGIDs _diana_load_gids() { GIDs=() local downloads hashArr fileName downloads=$(diana list | cut -d' ' -f1) if [ ${#downloads} -eq "0" ]; then return fi hashArr=("${(f)$(echo "$downloads")}") for ((i=1; i<=${#hashArr[@]}; i++)); do fileName=$(diana files $hashArr[i] | grep "[X]" | rev | cut -d'/' -f1 | rev); GIDs+=("$hashArr[i]:$fileName"); done } _diana_load_paused_gids() { PGIDs=() local downloads hashArr fileName downloads=$(diana paused | cut -d' ' -f1) if [ ${#downloads} -eq "0" ]; then return fi hashArr=("${(f)$(echo "$downloads")}") for ((i=1; i<=${#hashArr[@]}; i++)); do fileName=$(diana files $hashArr[i] | grep "[X]" | rev | cut -d'/' -f1 | rev); PGIDs+=("$hashArr[i]:$fileName"); done } _diana_command_arguments() { case $words[1] in (remove) _diana_load_gids _describe -t output 'Downloads to delete' GIDs ;; (info) _diana_load_gids _describe -t output 'Downloads to get info' GIDs ;; (files) _diana_load_gids _describe -t output 'Get files for downloads' GIDs ;; (forcerm) _diana_load_gids _describe -t output 'Downloads to delete' GIDs ;; (pause) _diana_load_gids _describe -t output 'Downloads to pause' GIDs ;; (resume) _diana_load_paused_gids _describe -t output 'Downloads to resume' PGIDs ;; (preview) _diana_load_gids _describe -t output 'Downloads to preview' GIDs ;; esac } _diana_subcommands() { 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." ) _describe -t commands 'commands' commands } _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 ================================================ FILE: src/_direnv ================================================ #compdef direnv # ------------------------------------------------------------------------------ # 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 OR THE AUTHOR 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 direnv 2.34.0 (https://direnv.net/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Nitai J. Perez # # ------------------------------------------------------------------------------ (( $+functions[_direnv_commands] )) || _direnv_commands() { local -a commands=( 'allow:Grants direnv permission to load the given .envrc or .env file' 'permit: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' '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' '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' 'export:Loads an .envrc or .env and prints the diff in terms of exports' "fetchurl:Fetches a given URL into direnv's CAS" 'help:shows this help' 'hook:Used to setup the shell hook' 'prune:removes old allowed files' 'reload:triggers an env reload' 'status:prints some debug status information' 'stdlib:Displays the stdlib available in the .envrc execution context' 'version:prints the version or checks that direnv is older than VERSION_AT_LEAST' ) _describe 'command' commands } _direnv() { local curcontext="$curcontext" state line typeset -A opt_args local ret=1 _arguments -C \ '1: :_direnv_commands' \ '*:: :->command_args' && ret=0 case $state in (command_args) case $words[1] in (allow|permit|grant|block|deny|revoke|edit) _arguments \ '1:rc file:_files' \ && ret=0 ;; (exec) _arguments \ '1:directory:_files -/' \ '2:command:_command_names' \ && 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) _arguments \ '1:shell:(bash zsh fish tcsh elvish)' \ && ret=0 ;; (fetchurl) _arguments \ '1:url:_urls' \ '2:integrity hash' \ && ret=0 ;; (status) _arguments \ '--json[print status information in JSON format]' \ && ret=0 ;; (version) _arguments \ '1:version at least' \ && ret=0 ;; (help) _arguments \ '1:show private:(SHOW_PRIVATE)' \ && ret=0 ;; (prune|reload|status|stdlib) # do not complete ret=0 ;; (*) _default && ret=0 ;; esac ;; esac return ret } _direnv "$@" # 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 ================================================ FILE: src/_diskutil ================================================ #compdef diskutil # ------------------------------------------------------------------------------ # 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 diskutil command macOS 26 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _diskutil() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments \ '1: :_diskutil_subcommands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) case $words[1] in (list) _arguments \ '-plist[output plist instead of normal user-readable output]' \ '1:: :(internal external)' \ '2:: :(physical virtual)' \ && ret=0 ;; (info) _arguments \ '-plist[output plist instead of normal user-readable output]' \ '-all[output all disks]' \ && ret=0 ;; (listFilesystems) _arguments \ '-plist[output plist instead of normal user-readable output]' \ && ret=0 ;; (unmount|unmountDisk|eject|disableJournal|disableJournal) _alternative 'force: :(force)' 'device: :_files' \ && ret=0 ;; (mount) _arguments \ '-mountOptions[mount options]:option' \ '-mountPoint[mount point]:path:_files -/' \ '*:: :_diskutil_mount_args' \ && ret=0 ;; (moveJournal) _alternative 'internal: :(internal)' 'device: :_files' \ && ret=0 ;; (eraseDisk) _arguments \ '-noEFI[do not create EFI partition]' \ '1:format:_diskutil_file_systems' \ '2:name' \ '*:: :_diskutil_erasedisk_args' \ && ret=0 ;; (eraseVolume) _arguments \ '1:format:_diskutil_file_systems' \ '2:name' \ '*:: :_diskutil_erasedisk_args' \ && ret=0 ;; (zeroDisk) _alternative 'force: :(force)' 'short: :(short)' 'device: :_files' \ && ret=0 ;; (secureErase) _arguments \ '1:format:_diskutil_secure_erase_args' \ '*:: :_files' \ && ret=0 ;; (partitionDisk) _arguments \ '-noEFI[do not create EFI partition on the target disk]' \ '*:: :_files' \ && ret=0 ;; (resizeVolume) _arguments \ '-plist[emit a property list instead of user-formatted output]' \ '*:: :_files' \ && ret=0 ;; (APFS) _diskutil_APFS && ret=0 ;; (appleRAID) _diskutil_appleRAID && ret=0 ;; (coreStorage) _diskutil_corestorage && ret=0 ;; (image) _diskutil_image && ret=0 ;; (*) _arguments \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_subcommands] )) || _diskutil_subcommands() { local -a commands=( "list:List disks" "info:Get detailed information about a specific whole disk or partition" "activity:Continuously display system-wide disk manipulation activity" "listFilesystems:Show the file system personalities available for formatting" "unmount:Unmount a single volume" "unmountDisk:Given a disk containing a partition map, unmount all of its volumes" "eject:Eject a disk" "mount:Mount a single volume" "mountDisk:Mount all mountable and UI-browsable volumes on the give partition map" "rename:Rename a volume" "enableJournal:Enable journaling on an HFS+ volume" "disableJournal:Disable journaling on an HFS+ volume" "moveJournal:Create a 512MB Apple_Journal partiton" "enableOwnership:Enable ownership a volume" "disableOwnership:Disable ownership of a volume" "verifyVolume:Verify the file system data structures of a volume" "repairVolume:Repair the file system data structures of a volume" "verifyDisk:Verify the partition map layout of a whole disk intended for booting or data use" "repairDisk:Repair the partition map layout of a whole disk intended for booting or data use" "eraseDisk:Erase an existing disk" "eraseVolume:Write out a new empty file system volume" "reformat:Erase an existing volume by writing out a new empty file system" "eraseOptical:Erase optical media" "zeroDisk:Erase a device, writing zeros to the media" "randomDisk:Erase a whole disk, writing random data to the media" "secureErase:Erase, using a secure method" "partitionDisk:Partition a disk, removing all volumes" "resizeVolume:Non-destructively resize a volume" "splitPartition:Destructively split a volume into multiple partitions" "mergePartitions:Merge two or more partitions on a disk" "addPartition:Create a new partition following an existing partition" "APFS:Apple APFS is a system of virtual volumes" "appleRAID:create, manipulate, destroy AppleRAID volumes" "coreStorage:gather information/remove CoreStorage volumes" "image:manipulate DiskImages framework with StorageKit framework" ) _describe -t commands 'command' commands "$@" } (( $+functions[_diskutil_mount_args] )) || _diskutil_mount_args() { local ret=1 local -a attributes=( 'readonly[the file system is mounted read only]' 'nobrowse[the file system is mounted with a recommendation to prevent display]' ) _alternative \ 'attributes: :_values -w attributes $attributes' \ 'device: :_files' && ret=0 return ret } (( $+functions[_diskutil_erasedisk_args] )) || _diskutil_erasedisk_args() { local ret=1 _alternative \ 'type: :(APM MBR GPT)' \ 'device: :_files' && ret=0 return ret } (( $+functions[_diskutil_secure_erase_args] )) || _diskutil_secure_erase_args() { local ret=1 local -a levels=( '0[Single-pass zero fill erase]' '1[Single-pass random fill erase]' '2[Seven-pass erase]' '3[Gutmann algorithm 35-pass erase]' '4[Three-pass erase, consisting of two random fills plus a final zero fill]' ) _alternative \ 'freespace: :(freespace)' \ 'level: :_values level $levels' && ret=0 return ret } (( $+functions[_diskutil_file_systems] )) || _diskutil_file_systems() { local file_systems=( 'APFSX:Case-sensitive APFS' 'APFS:APFS' 'ExFAT:ExFat' 'FREE:Free Space' 'MS-DOS:FAT' 'FAT32:FAT32' 'HFS+:MacOS Extended HFS+' 'HFSX:Case-sensitive Mac OS Extended HFS+' 'JHFSX:Case-sensitive and journaled Mac OS Extended HFS+' 'JHFS+:Journaled Mac OS Extended HFS+' ) _describe -t file_systems 'file_system' file_systems "$@" } (( $+functions[_diskutil_APFS] )) || _diskutil_APFS() { local ret=1 _arguments -C \ '1: :_diskutil_APFS_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (list|resizeContainer|listCryptoUsers|listSnapshots) _arguments \ '-plist[emit a property list instead of user-formatted output]' \ '*:: :_files' \ && ret=0 ;; (convert) _arguments \ '-dryrun[all calculations, checks, some data moving is performed but your disk is left as valid HFS]' \ '-prebootSource[staging directory of macOS boot items]' \ '*:: :_files' \ && ret=0 ;; (deleteContainer) _arguments \ '-force[Activate an alternate last-resort mode]' \ '*:: :_files' \ && ret=0 ;; (addVolume) _arguments \ '-passprompt[will be prompted interactively for a passphrase]' \ '-passphrase[passphrase]:passphrase' \ '-stdinpassphrase[read passphrase from standard input]' \ '-passphraseHint[passphrase hint]:hint' \ '-reserve[guarantee a minimum amount of space for your volume]:reserve' \ "-quota[limit your volume's file usage to a maximum amount]:quota" \ '-role[meta-data flags from APFS Volume Roles]:roles' \ '-groupWith[become a member of the same APFS Volume Group]' \ '-sibling[sibling group device]:group_device' \ '-nomount[leave volume unmounted]' \ '-mountpoint[mountpoint path]:path:_files' \ '*:: :_files' \ && ret=0 ;; (eraseVolume) _arguments \ '-passprompt[will be prompted interactively for a passphrase]' \ '-passphrase[passphrase]:passphrase' \ '-stdinpassphrase[read passphrase from standard input]' \ '-passphraseHint[passphrase hint]:hint' \ '-role[meta-data flags from APFS Volume Roles]:roles' \ '-groupWith[become a member of the same APFS Volume Group]' \ '-sibling[sibling group device]:group_device' \ '*:: :_files' \ && ret=0 ;; (unlockVolume) _arguments \ '-user[cryptographic user]:user' \ '-recoverykeychain[key chain file]:path:_files' \ '-passphrase[passphrase]:passphrase' \ '-stdinpassphrase[read passphrase from standard input]' \ '-nomount[leave volume unmounted]' \ '-mountpoint[mountpoint path]:path:_files' \ '-systemreadwrite[mount read/write]' \ '-verify[test passphrase correctness without affecting the locked or unlocked state]' \ '-plist[emit a property list instead of user-formatted output]' \ '*:: :_files' \ && ret=0 ;; (changePassphrase) _arguments \ '-user[cryptographic user]:user' \ '-oldPassphrase[old passphrase]:old_passphrase' \ '-oldStdinpassphrase[read old passphrase from standard input]' \ '-newPassphrase[new passphrase]:new_passphrase' \ '-newStdinpassphrase[read new passphrase from standard input]' \ '*:: :_files' \ && ret=0 ;; (setPassphraseHint) _arguments \ '-user[cryptographic user]:user' \ '-hint[hint message]:hint' \ '-clear[clear any existing hint]' \ '*:: :_files' \ && ret=0 ;; (encryptVolume) _arguments \ '-user[cryptographic user]:user' \ '-passphrase[passphrase]:passphrase' \ '-stdinpassphrase[read passphrase from standard input]' \ '*:: :_files' \ && ret=0 ;; (decryptVolume) _arguments \ '-user[cryptographic user]:user' \ '-recoverykeychain[key chain file]:path:_files' \ '-passphrase[passphrase]:passphrase' \ '-stdinpassphrase[read passphrase from standard input]' \ '*:: :_files' \ && ret=0 ;; (deleteSnapshot) _arguments \ '-user[cryptographic user]:user' \ '-xid[transaction ID]:xid' \ '-name[snapshort name]:name' \ '-wait[wait for removing snapshot]' \ '*:: :_files' \ && ret=0 ;; (updatePreboot) _arguments \ '-od[open directory path]:dir:_files -/' \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_APFS_subcommands] )) || _diskutil_APFS_subcommands() { local -a commands=( 'list:Display APFS objects as a tree' 'convert:Convert an HFS volume to an APFS Container with a single APFS Volume' 'create:Create an empty APFS Container and add one APFS Volume with the given name' 'createContainer:Create an empty APFS Container' 'deleteContainer:Destroy an existing APFS Container' 'resizeContainer:Resize an existing APFS Container' 'addVolume:Add a new APFS Volume to an existing APFS Container' 'deleteVolume:Remove the given APFS Volume from its APFS Container' 'deleteVolumeGroup:Remove all APFS Volumes from the APFS Container' 'eraseVolume:Erase the contents of an existing APFS Volume' 'changeVolumeRole:Change the role metadata flags of an existing APFS Volume' 'unlockVolume:Unlock the mount an encrypted and locked APFS Volume or verify a passphrase' 'lockVolume:Unmount and lock an encrypted unlocked APFS Volume' 'listCryptoUsers:Show all cryptographic users and special-purpose users' 'changePassphrase:Change the passphrase of the user associated with the given APFS Volume' 'setPassphraseHint:Set an arbitrary hint string to aid recall of a passphrase' 'encryptVolume:Start encryption of a currently-unencrypted APFS Volume' 'decryptVolume:Start decryption of a currently-encrypted APFS Volume' 'listSnapshots:Show all APFS Snapshots associated with the given APFS Volume' 'deleteSnapshot:Remove the given APFS Snapshot from its APFS Volume' 'listGroups:Display the relationships among APFS Volumes which are defined by APFS Volume Groups' 'defragment:Manage automatic background defragmentation at the APFS Container or Volume level' "updatePreboot:Update the target volume's associated Preboot Volume" 'syncPatchUsers:Perform a specific repair of APFS cryptographic user lock records' ) _describe -t commands 'command' commands "$@" } (( $+functions[_diskutil_appleRAID] )) || _diskutil_appleRAID() { local ret=1 _arguments -C \ '1: :_diskutil_appleRAID_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (list) _arguments \ '-plist[emit a property list instead of user-formatted output]' \ '*:: :_files' \ && ret=0 ;; (create) _arguments \ '1:command:(mirror stripe concat)' \ '*:: :_files' \ && ret=0 ;; (add) _arguments \ '1:type:(member spare)' \ '*:: :_files' \ && ret=0 ;; (enable) _arguments \ '1:command:(mirror concat)' \ '*:: :_files' \ && ret=0 ;; (update) _arguments \ '1:key:(AutoRebuild SetTimeout)' \ '2:value' \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_appleRAID_subcommands] )) || _diskutil_appleRAID_subcommands() { local -a commands=( 'list:Display AppleRAID volumes with current status and associated member disks' 'create:Create a new RAID set consisting of multiple disks and/or RAID sets' 'delete:Destroy an existing RAID set' 'repairMirror:Repair a degraded mirror' 'add:Add a new member or hot spare to an existing RAID set' 'remove:Remove a member or spare from an existing RAID set' 'enable:Convert a non-RAID disk partition into an RAID set' 'update:Update the key-value parameters of an existing RAID set' ) _describe -t commands 'command' commands "$@" } (( $+functions[_diskutil_corestorage] )) || _diskutil_corestorage() { local ret=1 _arguments -C \ '1: :_diskutil_corestorage_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (list|info) _arguments \ '-plist[emit property list instead of the formatted tree output]' \ '*:: :_files' \ && ret=0 ;; (unlockVolume) _arguments \ '-nomount[not mount automatically]' \ '-stdinpassphrase[read password from standard input]' \ '-passphrase[passphrase]:passphrase' \ '-recoverykeychain[a path to keychain file]:file:_files' \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_corestorage_subcommands] )) || _diskutil_corestorage_subcommands() { local -a commands=( 'list:Display a tree view of the CoreStorage world' 'info:Display properties of the CoreStorage object' 'delete:Delete a CoreStorage logical volume group' 'unlockVolume:Unlock a logical volume and file system' ) _describe -t commands 'command' commands "$@" } (( $+functions[_diskutil_image] )) || _diskutil_image() { local ret=1 _arguments -C \ '--stdinpassphrase[read the passphrase from stdin]' \ '--verbose[enable verbose output]' \ '--plist[produce output in a plist format]' \ '1: :_diskutil_image_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (attach) _arguments \ '--readOnly[disk image is attached read-only]' \ '--nobrowse[hide the mounted volume in the disk image from GUI applications]' \ '--mountPoint[path to mount the image]:mount_point:_files -/' \ '--mountOptions[comma separated mount options]:option' \ '--mountPolicy[mount policy]:policy:(noMount autoMount forceMount)' \ '--noMount[skip any mount attempts and only attach the disk image]' \ '*--shadow[shadow file path]:file:_files' \ '*:: :_files' \ && ret=0 ;; (info) _arguments \ '--extra[additional information will be retrieved for some image types]' \ && ret=0 ;; (create) _diskutil_image_create && ret=0 ;; (resize) _arguments \ '(-s --size)'{-s,--size}'[new size of the disk image]:size' \ '--image-only[only resize the disk image and adjust a secondary GPT table to the new size]' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_image_subcommands] )) || _diskutil_image_subcommands() { local -a commands=( 'attach:Attach a disk image as a device' 'info:Print out information includes about a disk image' 'chpass:Change the passphrase of a given encrypted image' 'create:Create a disk image' 'resize:Resizes an existing disk image represented by given URL' ) _describe -t commands 'command' commands "$@" } (( $+functions[_diskutil_image_create] )) || _diskutil_image_create() { local ret=1 _arguments -C \ '1: :_diskutil_image_create_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (blank) _arguments \ '--format[disk format]:format:(RAW ASIF USDB)' \ '--size[disk size]:size' \ '--volumeName[volume name]:name' \ '-fs[create a file system in the specified format]:format:(APFS ExFAT MS-DOS)' \ '*:: :_files' \ && ret=0 ;; (from) _arguments \ '--format[disk format]:format:(RAW UDRO UDZO ULFO ULMO ASIF UDSB)' \ '--shadow[path to the shadow file]:path:_files' \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_diskutil_image_create_subcommands] )) || _diskutil_image_create_subcommands() { local -a commands=( 'blank:create a blank disk image' 'from:create a disk image from source' ) _describe -t commands 'command' commands "$@" } _diskutil "$@" # 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 ================================================ FILE: src/_distro_info ================================================ #compdef distro-info ubuntu-distro-info debian-distro-info # # ------------------------------------------------------------------------------ # Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # 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 for distro-info # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[display help message and exit]' \ '--date=[date for calculating the version]:date' \ '(-a --all)'{-a,--all}'[list all known versions]' \ '(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \ '(-d --devel)'{-d,--devel}'[latest development version]' \ '--series=[series to calculate the version for]:series' \ '(-s --stable)'{-s,--stable}'[latest stable version]' \ '--supported[list of all supported version, including development releases]' \ '--unsupported[list of all unsupported stable versions]' \ '(-c --codename)'{-c,--codename}'[print the codename(default)]' \ '(-r --release)'{-r,--release}'[print the release version]' \ '(-f --fullname)'{-f,--fullname}'[print the full name]' # 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 ================================================ FILE: src/_do-release-upgrade ================================================ #compdef do-release-upgrade # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 do-release-upgrade 25.10.7 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[Show this help message and exit]' \ '(- *)'{-v,--version}'[Show version and exit]' \ '(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \ '--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]' \ '(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \ '(- *)--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]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode]' # 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 ================================================ FILE: src/_docpad ================================================ #compdef docpad # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 docpad v6.38.2 (https://github.com/bevry/docpad). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Changwoo Park (https://github.com/pismute) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _docpad_subcommands() { local -a commands=( "run:run docpad on your project" "init:initialize your project" "generate:(re)generates your project" "render:render the file at and output its results to stdout" "watch:watches your project for changes, and (re)generates whenever a change is made" "clean:ensure everything is cleaned correctly (will remove your out directory)" "update:update your local DocPad and plugin installations to their latest compatible version" "upgrade:update your local DocPad and plugin installations to their latest compatible version" "install:install plugins" "uninstall:uninstall a plugin" "info:display the information about your docpad instance" ) _describe -t commands 'command' commands "$@" } _docpad() { local ret=1 _arguments \ '--outpath[a custom directory to place the rendered project]: :_files -/' \ '--config[a custom configuration file to load in]: :_files' \ '--env[the environment name to use for this instance, multiple names can be separated with a comma]' \ '--log[the rfc log level to display]:level' \ '(-v --verbose)'{-v,--verbose}'[set log level to 7]' \ '(-d --debug)'{-d,--debug}'[output a log file]' \ '--global[whether or not we should just fire global installation of docpad]' \ '(--color --colour)'{--color,--colour}'[use color terminal output(default: true)]' \ '--silent[do not write anything that is not essential]' \ '--progress[output the progress as it occurs(default: true)]' \ '--version[show version]' \ '(- *)'{-h,--help}'[output usage information]'\ '1: :_docpad_subcommands'\ '*:: :_files' && ret=0 return ret } _docpad "$@" # 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 ================================================ FILE: src/_ecdsautil ================================================ #compdef ecdsautil # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for ecdsaultils v0.4.0 (https://github.com/freifunk-gluon/ecdsautils) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Robinhuett # # ------------------------------------------------------------------------------ _ecdsautil_args() { case $words[1] in (sign) _arguments '1:somefile:_files' ;; (verify) _arguments \ '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' \ '-n[signaturecount]:signaturecount:""' ':file:_files' ;; esac } _ecdsautil() { local -a commands=( "help:Show help" "generate-key:generate a new secret on stdout" "show-key:output public key of secret read from stdin" "sign:sign file" "verify:verify signature of file" ) _arguments -C \ '1:cmd:->cmds' \ '*:: :->args' case "$state" in (cmds) _describe -t commands 'commands' commands ;; (*) _ecdsautil_args ;; esac } _ecdsautil "$@" # 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 ================================================ FILE: src/_emacs ================================================ #compdef emacs emacsclient # ------------------------------------------------------------------------------ # Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # 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 emacs 31. (https://www.gnu.org/software/emacs/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ case $service in (emacs) _arguments -s \ '--batch[do not do interactive display, implies -q]' \ '--chdir[change to directory]:dir:_files -/' \ '(--daemon --bg-daemon --fg-daemon)'{--daemon,--bg-daemon=-}'[start a named server in the background]::name' \ '(--daemon --bg-daemon --fg-daemon)--fg-daemon=-[start a named server in the foreground]::name' \ '--debug-init[enable Emacs Lisp debugger for init file]' \ '(-d --display)'{-d,--display}'[use X server DISPLAY]:display:_x_display' \ '--module-assertions[assert behavior of dynamic modules]' \ '--dump-file[read dumped state from FILE]:file:_files' \ '(- *)--fingerprint[output fingerprint and exit]' \ '--seccomp=[read Seccomp BPF filter from FILE]: :_files' \ '--no-build-details[do not add build details such as time stamps]' \ '--no-desktop[do not load a saved desktop]' \ '(-q --no-init-file)'{-q,--no-init-file}'[loader neither ~/.emacs nor default.el]' \ '(-nl --no-loadup)'{-nl,--no-loadup}'[do not load loadup.el]' \ '--no-site-file[do not load site-start.el]' \ '--no-x-resources[do not load X resources]' \ '(-nsl --no-site-lisp)'{-nsl,--no-site-lisp}'[do not add site-lisp directories to load-path]' \ '--no-splash[do not display a splash screen on startup]' \ '(-nw --no-window-system)'{-nw,--no-window-system}'[do not communicate with X, ignoring $DISPLAY]' \ '--init-directory=[use DIR when looking for the Emacs init files]:dir:_files -/' \ '(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \ '--script[run FILE as an Emacs Lisp script]:file:_files' \ '-x[same as -Q --script]' \ '(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \ '(-u --user)'{-u,--user}"[load user's init file instead of your own]" \ \*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \ {--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \ \*{--file,--find-file,--visit}'[visit FILE]: :_files' \ \*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \ '--insert[insert contents of FILE into current buffer]:file:_files' \ '--kill[exit without asking for confirmation]' \ \*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \ '(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \ '(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \ '(-bd --border-color)'{-bd,--border-color}'[main border color]:color' \ '(-bw --border-width)'{-bw,--border-width}'[width of main border]' \ '--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \ '(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \ '(-fn --font)'{-fn,--font}'[default font, must be fixed-width]:font' \ '(-fg --foreground)'{-fg,--foreground}'[window foreground color]:color' \ '(-fh --fullheight)'{-fh,--fullheight}'[make the first frame high as the screen]' \ '(-fs --fullscreen)'{-fs,--fullscreen}'[make the first frame fullscreen]' \ '(-fw --fullwidth)'{-fw,--fullwidth}'[make the first frame wide as the screen]' \ '(-mm --maximized)'{-mm,--maximized}'[make the first frame maximized]' \ '(-g --geometry)'{-g,--geometry}'[window geometry]:geometry' \ '(-nbi --no-bitmap-icon)'{-nbi,--no-bitmap-icon}'[do not use picture of gnu for Emacs icon]' \ '--iconic[start Emacs in iconified state]' \ '(-ib --internal-border)'{-ib,--internal-border}'[width between text and main border]:width' \ '(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \ '(-ms --mouse-color)'{-ms,--mouse-color}'[mouse cursor color in Emacs window]:color' \ '(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \ '(-nbc --no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \ '(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \ '(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \ '--xrm[set additional X resources]:resource' \ '--parent-id[set parent window]:xid' \ '(- *)--help[display help and exit]' \ '(- *)--version[output version information and exit]' \ '*:: :_files' ;; (emacsclient) _arguments -s -n : \ '(- *)'{-V,--version}'[Print version information and exit]' \ '(- *)'{-H,--help}'[Print this usage information message and exit]' \ '(-nw -t --tty --no-window-system)'{-nw,-t,--tty,--no-window-system}'[Open a new Emacs frame on the current terminal]' \ '(-c --create-frame)'{-c,--create-frame}'[Create a new frame instead of trying to use the current Emacs frame]' \ '(-r --reuse-frame)'{-r,--reuse-frame}'[Create a new frame if none exists, otherwise use the current Emacs frame]' \ '(-F --frame-parameters)'{-F,--frame-parameters=}'[Set the parameters of a new frame]:alist' \ '(-e --eval)'{-e,--eval}'[Evaluate as Emacs Lisp expressions]' \ '(-n --no-wait)'{-n,--no-wait}'[Returns immediately without waiting for finish]' \ '(-w --timeout)'{-w,--timeout=}'[Seconds to wait before timing out]:seconds' \ '(-q --quiet)'{-q,--quiet}"[Don't display messages on success]" \ '(-u --suppress-output)'{-u,--suppress-output}"[Don't display return values from the server]" \ '(-d --display)'{-d,--display=}'[Tell the server to display the files on the given display]:display:_x_display' \ '--parent-id=[Open in parent window ID, via XEmbed]' \ '(-s --socket-name)'{-s,--socket-name=}'[Set filename of the UNIX socket for communication]: :_files' \ '(-f --server-file)'{-f,--server-file=}'[Set filename of the TCP authentication file]: :_files' \ '(-a --alternate-editor)'{-a,--alternate-editor=}'[Editor to fallback to if the server is not running if EDITOR is the empty string]:editor:_files' \ '(-T --tramp)'{-T,--tramp=}'[PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp]:prefix' \ '*:: :_files' ;; esac # 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 ================================================ FILE: src/_emulator ================================================ #compdef emulator # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for emulator (Android Emulator) 35.3.11.0 # (https://developer.android.com/studio/run/emulator-command). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ _emulator() { typeset -A opt_args local context state line curcontext="$curcontext" local ret=1 local -a option_names=( list-avds sysdir system vendor writable-system delay-adb datadir kernel ramdisk image initdata data encryption-key logcat-output partition-size cache cache-size no-cache nocache sdcard quit-after-boot qemu-top-dir monitor-adb snapstorage no-snapstorage snapshot no-snapshot no-snapshot-save no-snapshot-load force-snapshot-load qcow2-for-userdata snapshot-list no-snapshot-update-time wipe-data avd avd-arch skindir skin no-skin noskin memory ui-only id cores accel no-accel ranchu engine netspeed netdelay netfast code-profile show-kernel shell no-jni nojni dalvik-vm-checkjni logcat log-nofilter log-detailed no-audio noaudio audio radio port ports modem-simulator-port onion onion-alpha onion-rotation dpi-device scale wifi-client-port wifi-server-port http-proxy timezone change-language change-country change-locale dns-server net-tap net-socket net-tap-script-up net-tap-script-down cpu-delay no-boot-anim no-window qt-hide-window no-sim lowram version no-passive-gps gnss-file-path gnss-grpc-port virtio-console read-only is-restart report-console gps shell-serial tcpdump bootchart charmap studio-params prop shared-net-id nand-limits gpu use-host-vulkan vsync-rate camera-back camera-front webcam-list virtualscene-poster screen selinux unix-pipe fixed-scale wait-for-debugger skip-adb-auth metrics-to-console metrics-collection metrics-to-file no-metrics detect-image-hang feature icc-profile sim-access-rules-file phone-number acpi-config fuchsia window-size allow-host-audio restart-when-stalled perf-stat share-vid grpc grpc-tls-key grpc-tls-cer grpc-tls-ca grpc-use-token grpc-use-jwt grpc-allowlist idle-grpc-timeout waterfall grpc-ui packet-streamer-endpoint netsim-args multidisplay google-maps-key no-location-ui use-keycode-forwarding record-session legacy-fake-camera camera-hq-edge no-direct-adb check-snapshot-loadable no-hidpi-scaling no-mouse-reposition guest-angle usb-passthrough append-userspace-opt save-path no-nested-warnings wifi-tap wifi-tap-script-up wifi-tap-script-down wifi-socket vmnet-bridged vmnet-shared vmnet-start-address ting mnet_end_address vmnet-end-address vmnet-subnet-mask vmnet-isolated wifi-user-mode-options network-user-mode-options adb-path hotplug-multi-display xts wifi-mac-address no-ethernet android-serialno ) local -a help_flags=() for name in $option_names[@] do help_flags+=("(- *)-help-${name}[print -${name} help message]") done # TODO All image options are contextual to -sysdir value # TODO All skin options are contextual to -skindir value # TODO snapshot options are mutually exclusive # TODO Use '-snapshot-list' output for snapshot names # TODO -logcat: use completer from _adb # TODO Complete options with device values # TODO Complete -prop _arguments -C \ '-list-avds[list available AVDs]' \ '-sysdir[search for system disk images in the directory]: :_files -/' \ '-vendor[read initial vendor image]: :_files' \ "-writable-system[make system image writable after 'adb remount']" \ '-delay-adb[delay adb communication till boot completes]' \ '-datadir[write user data into the directory]: :_files -/' \ '-kernel[use specific emulated kernel]: :_files' \ '(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \ '-ramdisk[ramdisk image (default /ramdisk.img]: :_files -g "*.img"' \ "-initdata[same as '-init-data ']: :_files" \ '-data[data image (default /userdata-qemu.img]: :_files -g "*.img"' \ '-encryption-key[read initial encryption key image]: :_files' \ '-logcat-output[output file of logcat]: :_files' \ '-partition-size[system/data partition size]:size (in MBs)' \ '(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g "*.img"' \ '(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \ '-sdcard[SD card image (default /sdcard.img]: :_files -g "*.img"' \ '-quit-after-boot[quit emulator after guest boots completely]' \ '-qemu-top-dir[use the emulator in the specified dir]: :_files -/' \ '-monitor-adb[monitor the adb messages between guest and host]:verbose_level' \ '(-no-snapstorage)-snapstorage[file that contains all state snapshots]: :_files -g "*.img"' \ '(-snapstorage)-no-snapstorage[do not mount a snapshot storage file]' \ "-snapshot[name of snapshot within storage file for auto-start and auto-save]:snapshot name" \ '-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \ '-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \ '-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \ '-force-snapshot-load[force starting from snapshot]' \ '-qcow2-for-userdata[use qcow2 for userdata]' \ '-snapshot-list[show a list of available snapshots]' \ '-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \ '-wipe-data[reset the user data image (copy it from initdata)]' \ '-avd[use a specific android virtual device]:android virtual device name:($(_emulator_list_avds))' \ '-avd-arch[use a specific target architecture]:target' \ '-skindir[search skins in (default /skins)]: :_files -/' \ '-skin[select a given skin]' \ '(-noskin -no-skin)'{-noskin,-no-skin}'[don'\''t use any emulator skin]' \ '-memory[physical RAM size in MBs]:size (in MBs)' \ '-ui-only[run only the UI feature requested]:feature' \ '-id[assign an ID to this virtual device]:id' \ '-cores[Set number of CPU cores to emulator]:number' \ '(-no-accel)-accel[Configure emulation acceleration]:mode' \ "(-accel)-no-accel[Same as '-accel off']" \ '-ranchu[use new emulator backend instead of the classic one]' \ '-engine[select engine]:engine:(auto classic qemu2)' \ '-netspeed[maximum network download/upload speeds]:speed' \ '-netdelay[network latency emulation]:delay' \ '-netfast[disable network shaping]' \ '-code-profile[enable code profiling]:profile' \ '-show-kernel[display kernel messages]' \ '-shell[enable root shell on current terminal]' \ {-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \ '-logcat[enable logcat output with given tags]:logcat tags' \ '-logcat-nofilter[disable the duplicate log filter]' \ '-log-detailed[enable detailed logging info]' \ '(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \ '(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \ '-radio[redirect radio modem interface to character device]:device' \ '-port[TCP port that will be used for the console]:port number' \ '-ports[TCP ports used for the console and adb bridge]:console port,adb port' \ '-modem-simulator-port[TCP port to use for android modem simulator]:port' \ '-onion[use overlay PNG image over screen]: :_files -g "*.(png|PNG)"' \ '-onion-alpha[specify onion-skin translucency]:percentage' \ '-onion-rotation[specify onion-skin rotation]:rotation:(0 1 2 3)' \ '-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \ '-scale[scale emulator window]:scale' \ '-wifi-client-port[connect to other emulator for WiFi forwarding]:port' \ '-wifi-server-port[listen to other emulator for WiFi forwarding]:port' \ '-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \ "-timezone[use this timezone instead of the host's default]:timezone" \ '-change-language[use this language instead of the current one]:language' \ '-change-country[use this country instead of the current one]:country' \ '-change-locale[use this locale instead of the current one]' \ '-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \ '-net-tap[use this TAP interface for network]:interface' \ '-net-socket[use Socket interface for network]:option' \ '-net-tap-script-up[script to run when the TAP interface goes up]: :_files' \ '-net-tap-script-down[script to run when the TAP interface goes down]: :_files' \ '-cpu-delay[throttle CPU emulation]:CPU delay' \ '-no-boot-anim[disable animation for faster boot]' \ '-no-window[disable graphical window display]' \ '-qt-hide-window[start QT window but hide window display]' \ '-no-sim[device has no SIM card]' \ '-lowram[device is a low ram device]' \ '(- : *)-version[display emulator version number]' \ '-no-passive-gps[disable passive gps updates]' \ '-gnss-file-path[use the specified filepath to read gnss data]: :_files' \ '-gnss-grpc-port[use the specified port number to start grpc service]:port' \ '-virtio-console[using virtio console as console]' \ '-read-only[allow running multiple instances of emulators on the same AVD]' \ '-is-restart[specify that this emulator was a restart and to wait out given PID]: :_pids' \ '-report-console[report console port to remote socket]: :_socket' \ '-gps[redirect NMEA GPS to character device]:device' \ '-shell-serial[specific character device for root shell]:device' \ '-tcpdump[capture network packets to file]: :_files' \ '-bootchart[enable bootcharting]:timeout' \ '-charmap[use specific key character map]: :_files' \ '*-prop[set system property on boot]:name=value' \ '-shared-net-id[join the shared network, using IP address 10.1.2.]:number' \ '-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \ '-gpu[set hardware OpenGLES emulation mode]:mode' \ '-use-host-vulkan[use host for vulkan emulation regardless of "gpu" mode]' \ '-vsync-rate[set the vsync rate]:rate' \ '-camera-back[set emulation mode for a camera facing back]:mode' \ '-camera-front[set emulation mode for a camera facing front]:mode' \ '-webcam-list[list web cameras available for emulation]' \ '*-virtualscene-poster[load a png or jpeg image as a poster in the virtual scene]' \ '-screen[set emulated screen mode]:mode' \ '-selinux[set SELinux mode]:mode:(disabled permissive)' \ '-unix-pipe[add path to the list of allowed Unix pipes]:file:_files' \ '-fixed-scale[use fixed 1:1 scale for the initial emulator window]' \ '-wait-for-debugger[pause an launch and wait for a debugger process to attach before resuming]' \ '-skip-adb-auth[skip adb authentication dialogue]' \ '-metrics-to-console[enable usage metrics and print the messages to stdout]' \ '-metrics-collection[enable usage metrics and send them to google play]' \ '-metrics-to-file[enable usage metrics and write the messages into specified file]: :_files' \ '-no-metrics[disable metrics collection]' \ '-detect-image-hang[enable the detection of system image hangs]' \ '*-feature[force-enable or disable the features]:name' \ '-icc-profile[use icc profile from specified file]: :_files' \ '-sim-access-rules-file[use SIM access rules from specified file]: :_files' \ '-phone-number[set the phone number of the emulated device]:phone_number' \ '-acpi-config[specify acpi device properties]: :_files' \ '-fuchsia[run Fuchsia image]' \ '-window-size[set window size for when bypassing android-specific setup]:size' \ '-allow-host-audio[allow sending of audio from audio input devices]' \ '-restart-when-stalled[allow restarting guest when it is stalled]' \ '-perf-stat[run pediodic perf stat reporter in the background and output to specified file]: :_files' \ '-share-vid[share current video state in shared memory region]' \ '-grpc[TCP ports used for the gRPC bridge]' \ '-grpc-tls-key[file with the private key used to enable gRPC TLS]: :_files' \ '-grpc-tls-cer[file with the public X509 certificate used to enable gRPC TLS]: :_files' \ '-grpc-tls-ca[file with the Certificate Authorities used to validate client certificates]: :_files' \ '-grpc-use-token[use the emulator console token for gRPC authentication]' \ '-grpc-use-jwt[use a signed JWT token for gRPC authentication]' \ '-grpc-allowlist[use a custom allow list for gRPC authentication]: :_files' \ '-idle-grpc-timeout[terminate the emulrator if there is no gRPC activity within the given second]:seconds' \ '-waterfall[mode in which to run waterfall]:mode' \ '-grpc-ui[use the experimental gRPC ui]' \ '-packet-streamer-endpoint[use the provided packet streamer endpoint when present]:uri:_urls' \ '-netsim-args[additional netsim arguments]' \ '-google-maps-key[API key to use with the Google Maps GUI]:api_key' \ '-no-location-ui[disable the location UI in the extended window]' \ '-use-keycode-forwarding[use keycode forwarding instead of host charmap translation]' \ '-record-session[screen record the emulator session]' \ '-legacy-fake-camera[use legacy camera HAL for the emulated fake camera]' \ '-camera-hq-edge[enable high qualify edge processing for emulated camera]' \ '-no-direct-adb[use external adb executable for internal communication]' \ '-check-snapshot-loadable[check if a snapshot is loadable]' \ '-no-hidpi-scaling[disable HiDPI scaling of guest display on macOS devices]' \ '-no-mouse-reposition[do not reposition the mouse to emulator window center]' \ '-guest-angle[enable guest ANGLE as system driver]' \ '-usb-passthrough[host USB device Passthrough]:param' \ '*-append-userspace-opt[append a property which is passed to the userspace]:param' \ '-save-path[override save path for screenshot and bug report]: :_files' \ '-no-nested-warnings[disable warning dialog when emulator is running in nested virtualization]' \ '-wifi-tap[use this TAP interface for Virtio Wi-Fi]: :_files' \ '-wifi-tap-script-up[script to run when the TAP interface goes up]: :_files' \ '-wifi-tap-script-down[script to run when the TAP interface goes down]: :_files' \ '-wifi-socket[use Socket interface for Virtio Wi-Fi]: :_socket' \ '-vmnet-bridged[enable vmnet framework in shared mode]: :_files' \ '-vmnet-shared[enable vmnet framework in shared mode]' \ '-vmnet-start-address[starting IPv4 address to assing using DHCP]:v4_addr' \ '-vmnet-end-address[ending IPv4 address to assing using DHCP]:v4_addr' \ '-vmnet-subnet-mask[IPv4 netmask to assing using DHCP]:v4_addr' \ '-vmnet-isolated[enable isolation for the interface]' \ '-wifi-user-mode-options[override default user mode networking option for wifi network]:options' \ '-network-user-mode-options[override default user mode networking option for both radio and wifi network]:options' \ '-adb-path[use adb binary from specified path]: :_files' \ '-hotplug-multi-display[use the HAL hotplug display to implement multiDisplay]' \ '-xts[use android64-xts CPU profile instead of the default one]' \ '-wifi-mac-address[override the mac address of the wlan0 interface in AVD]:mac_address' \ '-no-ethernet[disable virtual Ethernet interface en0]' \ '-android-serialno[set customized android serial number]:serial_no' \ '-qemu[pass arguments to qemu]:arguments' \ "-verbose[same as '-debug-init']" \ '*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag' \ '(- : *)-help[display help information]' \ '(- : *)-help-disk-images[about disk images]' \ '(- : *)-help-debug-tags[debug tags for -debug ]' \ '(- : *)-help-char-devices[character specification]' \ '(- : *)-help-environment[environment variables]' \ '(- : *)-help-virtual-device[virtual device management]' \ '(- : *)-help-sdk-images[about disk images when using the SDK]' \ '(- : *)-help-build-images[about disk images when building Android]' \ '(- : *)-help-all[prints all help content]' \ $help_flags[@] \ '1: :->cmds' \ '*:: :->args' && ret=0 case $state in (cmds) local -a avds=($(_emulator_list_avds)) for ((i=1; i<=${#avds[@]}; i++)); do avds[i]="@${avds[i]}" done _values 'avds' "${avds[@]}" ;; esac return ret } _emulator_list_avds() { local -a _avds=($HOME/.android/avd/*.ini(N.:t:r)) echo "${_avds[@]}" } _emulator "$@" # 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 ================================================ FILE: src/_envdir ================================================ #compdef envdir # ------------------------------------------------------------------------------ # Copyright (c) 2016, 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 envdir (https://github.com/jezdez/envdir). # It completes its few options and then a directory and command. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Daniel Hahler # # ------------------------------------------------------------------------------ local -a args=( '(-h --help)'{-h+,--help}'[show this help message and exit]' '(-)'--version'[display version information and exit]' '(-)1:directory: _path_files -/' '(-)2:command: _command_names -e' '*::arguments: _precommand' ) _arguments -S $args # 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 ================================================ FILE: src/_exportfs ================================================ #compdef exportfs # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 nfs's exportfs - maintain table of exported NFS file systems. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Timofey Titovets # # ------------------------------------------------------------------------------ _arguments \ '(-d --debug)'{-d,--debug}'[Turn on debugging]:kind:(all auth call general parse)' \ '(-i)-a[Export or unexport all directories]' \ '(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \ '-o[Specify a list of export options in the same manner as in exports]:option' \ '(-i)-r[Reexport all directories]' \ '(-i)-u[Unexport one or more directories]' \ "-f[Flush everything out of kernel's export table]" \ '-v[Be verbose]' \ '-s[Display the current export list suitable for /etc/exports]' # 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 ================================================ FILE: src/_fab ================================================ #compdef fab # ------------------------------------------------------------------------------ # 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 Fabric (https://www.fabfile.org/) # # Source: https://github.com/vhbit/fabric-zsh-autocomplete # # ------------------------------------------------------------------------------ # Authors # ------- # # * Valerii Hiora (https://github.com/vhbit) # # ------------------------------------------------------------------------------ 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 } 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 # sh-indentation: 2 # indent-tabs-mode: nil # sh-basic-offset: 2 # End: # vim: ft=zsh sw=2 ts=2 et ================================================ FILE: src/_fail2ban-client ================================================ #compdef fail2ban-client # ------------------------------------------------------------------------------ # Copyright (c) 2020 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # 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 fail2ban-client (https://www.fail2ban.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Felix Neumärker # # ------------------------------------------------------------------------------ _fail2ban_client() { integer NORMARG _arguments -A "-*" -n \ '-c[configuration directory]:dir:_files -/' \ '-s[socket path]:file:_files' \ '-p[pidfile path]:file:_files' \ '--loglevel[logging level]:level:(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)' \ '--logtarget[logging target]:target:(stdout stderr syslog sysout)' \ '--syslogsocket[syslog socket path]:file:_files' \ '-d[dump configuration]' \ '(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \ '(-t --test)'{-t,--test}'[test configuration]' \ '-i[interactive mode]' \ '-v[increase verbosity]' \ '-q[decrease verbosity]' \ '-x[force execution of the server (remove socket file)]' \ '-b[start server in background]' \ '-f[start server in foreground]' \ '--str2sec[convert time abbreviation format to seconds]:_message str2sec' \ '(-h --help)'{-h,--help}'[display this help message]' \ '(-V --version)'{-V,--version}'[print the version]' \ '1:fail2ban command:_fail2ban_client_commands' \ '*:fail2ban command argument:_fail2ban_client_command_arguments' } _fail2ban_client_commands() { local cmds=( 'unban:unbans all IP addresses' 'set:set property' 'get:get property' 'status:gets the current status of the server' 'reload:reloads the configuration/jails' 'restart:restarts the server' 'start:starts the server and the jails' 'stop:stops all jails and terminate the server' 'ping:tests if the server is alive' 'flushlogs:flushes the logtarget if a file and reopens it' 'help:return this output' 'version:return the server version' ) _describe -V "fail2ban commands" cmds } _fail2ban_client_command_arguments() { local f2barg="$words[$NORMARG]" case "$f2barg" in (unban) local jail if (( $words[(I)(--all)] == 0 )); then for jail in $(_fail2ban_client_print_jails); do _fail2ban_client_jails "$jail" done local unban_opts=(--all) _describe -o "unban options" unban_opts else _nothing fi ;; (set|get) if (( $NORMARG + 1 == $CURRENT )); then _fail2ban_client_jails _fail2ban_client_settings else _fail2ban_client_jail_${f2barg} fi ;; (status) if (( $NORMARG + 1 == $CURRENT )); then _fail2ban_client_jails elif (( $NORMARG + 2 == $CURRENT )); then _values "flavor" basic cymru else _nothing fi ;; esac } _fail2ban_client_jail_set() { if (( $NORMARG + 2 == $CURRENT )); then case $words[$NORMARG+1] in (loglevel) local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG) _describe -V "loglevel" loglevel ;; (logtarget) local logtarget=(STDOUT STDERR SYSLOG) _describe -V "logtarget" logtarget _files ;; (syslogsocket) local syslogsocket=(auto) _describe -V "logtarget" syslogsocket _files ;; (dbfile) _files ;; (dbpurgeage) _message "sets the max age in that history of bans will be kept" ;; (*) local jailsettings=( unbanip banip action addaction addfailregex addignoreip addignoreregex addjournalmatch addlogpath bantime datepattern delaction delfailregex delignoreip delignorerexgex deljournalmatch dellogpath findtime idle ignorecache ignorecommand ignoreself logencoding maxlines maxretry usedns ) _describe -t "f2b_jail_setting" -V "jail setting" jailsettings ;; esac else local jail="$words[$NORMARG+1]" if (( $NORMARG + 3 == $CURRENT )) ; then case $words[$NORMARG+2] in unbanip) _fail2ban_client_ips "$jail" ;; delfailregex) _fail2ban_client_regexs fail "$jail" ;; delignorerexgex) _fail2ban_client_regexs ignore "$jail" ;; dellogpath) local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}") if [[ -n "${filelist[@]}" ]] ; then _describe -t "f2b_filelist" -V "filelist of jail $1" filelist else _nothing fi ;; idle) _values 'fail2ban idle' on off ;; ignoreself) _values 'fail2ban ignoreself' true false ;; delignoreip) local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}") if [[ -n "${ignoreips[@]}" ]] ; then _describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips else _nothing fi ;; delaction|action) _fail2ban_client_actions "$jail" ;; addlogpath) _files ;; *) _message "No completion for ${words[NORMARG+2]}" ;; esac elif (( $NORMARG + 4 == $CURRENT )) ; then case $words[$NORMARG+2] in action) _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3] ;; addaction) _files ;; *) _nothing ;; esac else _nothing fi fi } _fail2ban_client_jail_get() { if (( $NORMARG + 2 == $CURRENT )) ; then case $words[$NORMARG+1] in (loglevel|logtarget|syslogsocket|dbfile|dbpurgeage) _nothing ;; *) # jail local jailprops=( logpath logencoding journalmatch ignoreself ignoreip ignorecommand failregex ignoreregex findtime bantime datepattern usedns maxretry maxlines actions action actionproperties actionmethods ) _describe -t "f2b_jail_props" -V "jail properties" jailprops ;; esac else local jail="$words[$NORMARG+1]" if (( $NORMARG + 3 == $CURRENT )); then case $words[$NORMARG+2] in (action|actionproperties|actionmethods) _fail2ban_client_actions "$jail" ;; *) _nothing ;; esac elif (( $NORMARG + 4 == $CURRENT )); then case $words[$NORMARG+2] in (action|actionproperties|actionmethods) _fail2ban_client_actionproperties "$jail" $words[$NORMARG+3] ;; *) _nothing ;; esac else _nothing fi fi } _fail2ban_client_settings() { local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage) _describe -t "f2b_settings" -V "fail2ban-client settings" setargs } _fail2ban_client_regexs() { local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}") if [[ -n "${regex[@]}" ]] ; then _describe -t "f2b_regex" -V "jail $2 ${1}regex" regex else _nothing fi } _fail2ban_client_actions() { local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}") if [[ -n "${jailactions[@]}" ]] ; then _describe -t "f2b_jail_actions" -V "jail actions" jailactions else _nothing fi } _fail2ban_client_jails() { local jails=($(_fail2ban_client_print_jails)) _describe -V "jails" jails } _fail2ban_client_ips() { local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}") if [[ -n "${ips[@]}" ]]; then _describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips else _nothing fi } _fail2ban_client_actionproperties() { local default_actionproperties=( actionstart actionstop actioncheck actionban actionunban timeout ) local all_actionproperties=("${(@f)$(fail2ban-client get $1 actionproperties $2 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}") local add_actionproperties=("${(@)all_actionproperties:|default_actionproperties}") _describe -t "f2b_actions_defprops" -V "default action properties" default_actionproperties if [[ -n "${add_actionproperties[@]}" ]] ; then _describe -t "f2b_actions_remprops" -V "additional action properties" add_actionproperties else _nothing fi } _fail2ban_client_print_jails() { LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p' } _fail2ban_client "$@" # Local Variables: # mode: Shell-Script # sh-indentation: 2 # indent-tabs-mode: nil # sh-basic-offset: 2 # End: # vim: set et sw=2 ts=2 ft=zsh: ================================================ FILE: src/_fail2ban-regex ================================================ #compdef fail2ban-regex # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for fail2ban-regex (https://www.fail2ban.org/). # Environment: # Linux 6.14.10-arch1-1 x86_64 GNU/Linux # zsh 5.9 (x86_64-pc-linux-gnu) # fail2ban 1.1.0-7 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jesse Ayala # # ------------------------------------------------------------------------------ integer NORMARG _arguments -A "-*" -n \ '--version[show program''s version number]' \ '(-h --help)'{-h,--help}'[display the help message]' \ '(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \ '(-d --datepattern)'{-d,--datepattern=}'[set custom pattern used to match date/times]:DATEPATTERN' \ '(--timezone= --TZ=)'{--timezone=,--TZ=}'[set time-zone used by convert time format]:TIMEZONE' \ '(-e --encoding)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \ '(-r --raw)'{-r,--raw}'[raw hosts,don''t resolve dns]' \ '--usedns=[DNS specified replacement of tags in regexp]::((yes\:matches all form of hosts no\:IP addresses only))' \ '(-L --maxlines)'{-L,--maxlines}'[maxlines for multi-line regex]:MAXLINES' \ '(-m --journalmatch=)'{-m,--journalmatch=}'[journalctl style matches overriding filter file; "systemd-journal" only]:JOURNALMATCH' \ '(-l --log-level)'{-l,--log-level}'[log level for the Fail2Ban logger to use]:LOG_LEVEL' \ '-V[get version in machine-readable short format]' \ '--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \ '(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \ '(-D --debuggex)'{-D,--debuggex}'[produce debuggex.com urls for debugging there]' \ '--no-check-all[disable check for all regexes]' \ '(-o --out)'{-o,--out}'[set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)]:out' \ '--print-no-missed[do not print any missed lines]' \ '--print-no-ignored[do not print any ignored lines]' \ '--print-all-matched[print all matched lines]' \ '--print-all-missed[print all missed lines, no matter how many]' \ '--print-all-ignored[print all ignored lines, no matter how many]' \ '(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \ '--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \ '1:file:_files -g \*.log' \ '2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \ '3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' # Local Variables: # mode: Shell-Script # sh-indentation: 2 # indent-tabs-mode: nil # sh-basic-offset: 2 # End: # vim: set et sw=2 ts=2 ft=zsh: ================================================ FILE: src/_fallocate ================================================ #compdef fallocate # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 for fallocate, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - preallocate or deallocate space to a file # https://man7.org/linux/man-pages/man1/fallocate.1.html # ------------------------------------------------------------------------------ # Authors # ------- # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments \ '(-c --collapse-range)'{-c,--collapse-range}'[Removes a byte range from a file without leaving a hole]' \ '(-d --dig-holes)'{-d,--dig-holes}'[Detect and dig holes]' \ '(-i --insert-range)'{-i,--insert-range}'[Insert a hole of length bytes from offset]' \ '(-l --length)'{-l+,--length}'[Specifies the length of the range, in bytes]:bytes' \ '(-n --keep-size)'{-n,--keep-size}'[Do not modify the apparent length of the file]' \ '(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \ '(-p --punch-hole)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \ '(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \ '(-x --posix)'{-x,--posix}'[Enable POSIX operation mode]' \ '(-z --zero-range)'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \ '*:filename:_files' # 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 ================================================ FILE: src/_ffind ================================================ #compdef ffind # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 ffind (https://github.com/jaimebuelta/ffind). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Sergei Eremenko (https://github.com/SmartFinn) # # ------------------------------------------------------------------------------ _arguments -C \ '(-h --help)'{-h,--help}'[show help message and exit]' \ '--version[show version number and exit]' \ '-p[match whole path, not only name of files]' \ '--nocolor[do not display color]' \ '--nosymlinks[do not follow symlinks]' \ '--hidden[do not ignore hidden directories]' \ '-c[force case sensitive]' \ '-i[force case insensitive]' \ '--delete[delete files found]' \ '--exec[execute the given command with the file found]:command:_command_names' \ '--module[execute the given module with the file found]:module_name args:' \ '--command[execute the given python program with the file found]:program:_files' \ '--ignore-vcs[ignore version control system files and directories]' \ '-f[experimental fuzzy search]' \ '--return-results[for testing purposes only]' \ '1:directory to search:_path_files -/' \ '*:filepattern:' # 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 ================================================ FILE: src/_flutter ================================================ #compdef flutter # ------------------------------------------------------------------------------ # MIT License # # Copyright (c) 2018 Nickolay Simonov # # 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 the Flutter.io sdk's cli tool 3.41.1 (https://flutter.dev) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Nikolai Simonov (https://github.com/NiKoTron) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _flutter() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C -A "-*" \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-v --verbose)'{-v,--verbose}'[Noisy logging, including all shell commands executed]' \ '--prefixed-errors[Causes lines sent to stderr to be prefixed with "ERROR:"]' \ '--quiet[Reduce the amount of output from some commands]' \ '(--no-wrap --wrap)--wrap[Whether to use output word wrapping]' \ '(--wrap --no-wrap)--no-wrap[Whether to use output word wrapping]' \ '--wrap-column=[Set the output wrap column]:number:' \ '(-d --device-id)'{-d,--device-id}'[Target device id or name (prefixes allowed)]:id' \ '--version[Reports the version of this tool]' \ '--machine[When used with the "--version" flag, outputs the information using JSON]' \ '(--no-color --color)--color[Whether to use terminal colors]' \ '(--color --no-color)--no-color[Whether to use terminal colors]' \ '(--no-version-check --version-check)--version-check[Allow Flutter to check for updates when this command runs]' \ '(--version-check --no-version-check)--no-version-check[Not allow Flutter to check for updates when this command runs]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--disable-analytics[Disable telemetry reporting each time a flutter command runs]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--enable-analytics[Enable telemetry reporting each time a flutter command runs]' \ '(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Suppress analytics reporting when this command runs]' \ '--packages[Path to your ".packages" file. (required, since the current directory does not contain a ".packages" file)]' \ '--local-engine-src-path=[Path to your engine src directory]: :_path_files -/' \ '--local-engine=[Specific version of the engine]:version' \ '--local-engine-host=[The host operating system for which engine artifacts should be selected]:host' \ '--local-web-sdk=[Specific version of the Web SDK]:version' \ '--show-test-device=[List the special "flutter-tester" device in device listings]' \ '--show-web-server-device=[List the special "web-server" device in device listings]' \ '--ci[Enable a set of CI-specific test debug settings]' \ '--debug-logs-dir[Path to a directory where logs for debugging may be added]' \ '1: :_flutter_root_commands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) case $words[1] in (help) _arguments \ '1: :_flutter_root_commands' \ && ret=0 ;; (analyze) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--current-package[Include the lib/main.dart file from the current directory, if any. (defaults to on)]' \ '--no-current-package[Include the lib/main.dart file from the current directory, if any. (defaults to on)]' \ '--watch[Run analysis continuously, watching the filesystem for changes]' \ '--write=[Also output the results to a file]: :_files ' \ '(--no-suggestions --suggestions)--suggestions[Show suggestions about the current flutter project]' \ '(--no-suggestions --suggestions)--no-suggestions[Not show suggestions about the current flutter project]' \ '(--no-pub --pub)--pub[Run "flutter packages get" before analyzing(defaults on)]' \ '(--no-pub --pub)--no-pub[Not run "flutter packages get" before analyzing]' \ '(--no-congratulate --congratulate)--congratulate[Show output even when there are no errors/warnings/hints/lints]' \ '(--no-congratulate --congratulate)--no-congratulate[Not show output when there are no errors/warnings/hints/lints]' \ '(--no-preamble --preamble)--preamble[Display the number of files that will be analyzed(default on)]' \ '(--no-preamble --preamble)--no-preamble[Not display the number of files that will be analyzed]' \ '(--no-fatal-infos --fatal-infos)--fatal-infos[Treat info level issues as fatal]' \ '(--no-fatal-infos --fatal-infos)--no-fatal-infos[Not treat info level issues as fatal]' \ '(--no-fatal-warnings --fatal-warnings)--fatal-warnings[Treat warning level issues as fatal]' \ '(--no-fatal-warnings --fatal-warnings)--no-fatal-warnings[Not treat warning level issues as fatal]' \ && ret=0 ;; (assemble) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ \*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \ '--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \ '--performance-measurement-file[Output individual target performance to a JSON file]' \ {-i,--input=}'[Allows passing additional input]::input' \ '--depfile=[A file path where a depfile will be written]:file:_files' \ '--build-inputs=[A file path where a newline-separated file containing all inputs used will be written after a build]:files:_files' \ '--build-outputs=[A file path where a newline-separated file containing all outputs used will be written after a build]:files:_files' \ '(-o --output)'{-o,--output=}'[A directory where output files will be written]:dir:_files -/' \ '--resource-pool-size=[The maximum number of concurrent tasks the build system will run]:number' \ && ret=0 ;; (attach) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--debug[Build a debug version of your app (default mode)]' \ '--profile[Build a version of your app specialized for performance profiling]' \ '(-t --target)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]::_files -g "*.dart"' \ '--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \ '--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \ \*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \ '--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \ '--device-user=[Identifier number for a user or work profile on Android only]:id' \ '--debug-url=[The URL at which the observatory is listening]:url' \ '--app-id=[The package name (Android) or bundle identifier (iOS) for the app]:app_id' \ '--pid-file=[Specify a file to write the process id to]:file:_files' \ '(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation location(defaults on)]' \ '(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \ '--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port' \ '(--no-dds --dds)--dds[Enable the Dart Developer Service]' \ '(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ && ret=0 ;; (bash-completion) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--no-overwrite --overwrite)--overwrite[Overwrite completion setup if it already exists]' \ '(--overwrite --no-overwrite)--no-overwrite[Not overwrite completion setup if it already exists]' \ && ret=0 ;; (build) _flutter_build && ret=0 ;; (config) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--list[List all settings and their current values]' \ '--clear-ios-signing-cert[Clear the saved development certificate choice used to sign apps for iOS device deployment]' \ '--select-ios-signing-settings[Complete prompt to select and save code signing settings to sign apps for iOS]' \ '--android-sdk=[The Android SDK directory]:dir:_files -/' \ '--android-studio-dir=[The Android Studio install directory]:dir:_files -/' \ '--jdk-dir=[The Java Development Kit installation directory]:dir:_files -/' \ '--build-dir=[The relative path to override a projects build directory]:dir:_files -/' \ '(--no-enable-web --enable-web)--enable-web[Enable Flutter for web]' \ '(--no-enable-web --enable-web)--no-enable-web[Disable Flutter for web]' \ '(--no-enable-linux-desktop --enable-linux-desktop)--enable-linux-desktop[Enable support for desktop on Linux]' \ '(--no-enable-linux-desktop --enable-linux-desktop)--no-enable-linux-desktop[Disable support for desktop on Linux]' \ '(--no-enable-macos-desktop --enable-macos-desktop)--enable-macos-desktop[Enable support for desktop on macOS]' \ '(--no-enable-macos-desktop --enable-macos-desktop)--no-enable-macos-desktop[Disable support for desktop on macOS]' \ '(--no-enable-windows-desktop --enable-windows-desktop)--enable-windows-desktop[Enable support for desktop on Windows]' \ '(--no-enable-windows-desktop --enable-windows-desktop)--no-enable-windows-desktop[Disable support for desktop on Windows]' \ '(--no-single-widget-reload-optimization --single-widget-reload-optimization)--single-widget-reload-optimization[Enable Hot reload optimization for a single widget]' \ '(--no-single-widget-reload-optimization --single-widget-reload-optimization)--no-single-widget-reload-optimization[Disable Hot reload optimization for a single widget]' \ '(--no-enable-android --enable-android)--enable-android[Enable Flutter for Android]' \ '(--no-enable-android --enable-android)--no-enable-android[Disable Flutter for Android]' \ '(--no-enable-ios --enable-ios)--enable-ios[Enable Flutter for iOS]' \ '(--no-enable-ios --enable-ios)--no-enable-ios[Disable Flutter for iOS]' \ '(--no-enable-fuchsia --enable-fuchsia)--enable-fuchsia[Enable Flutter for Fuchsia]' \ '(--no-enable-fuchsia --enable-fuchsia)--no-enable-fuchsia[Disable Flutter for Fuchsia]' \ '(--no-enable-custom-devices --enable-custom-devices)--enable-custom-devices[Enable Early support for custom device types]' \ '(--no-enable-custom-devices --enable-custom-devices)--no-enable-custom-devices[Disable Early support for custom device types]' \ '(--no-cli-animations --cli-animations)--cli-animations[Enable animations in the command line interface]' \ '(--no-cli-animations --cli-animations)--no-cli-animations[Disable animations in the command line interface]' \ '(--no-enable-native-assets --enable-native-assets)--enable-native-assets[Enable native assets compilation and bundling]' \ '(--no-enable-native-assets --enable-native-assets)--no-enable-native-assets[Disable native assets compilation and bundling]' \ '(--no-enable-dart-data-assets --enable-dart-data-assets)--enable-dart-data-assets[Enable Dart data assets building and bundling]' \ '(--no-enable-dart-data-assets --enable-dart-data-assets)--no-enable-dart-data-assets[Disable Dart data assets building and bundling]' \ '(--no-enable-swift-package-manager --enable-swift-package-manager)--enable-swift-package-manager[Enable support for Swift Package Manager]' \ '(--no-enable-swift-package-manager --enable-swift-package-manager)--no-enable-swift-package-manager[Disable support for Swift Package Manager]' \ '(--no-omit-legacy-version-file --omit-legacy-version-file)--omit-legacy-version-file[Enable stops writing the legacy version file]' \ '(--no-omit-legacy-version-file --omit-legacy-version-file)--no-omit-legacy-version-file[Disable stops writing the legacy version file]' \ '(--no-enable-windowing --enable-windowing)--enable-windowing[Enable for windowing]' \ '(--no-enable-windowing --enable-windowing)--no-enable-windowing[Disable for windowing]' \ '(--no-enable-lldb-debugging --enable-lldb-debugging)--enable-lldb-debugging[Enable support for debugging with LLDB]' \ '(--no-enable-lldb-debugging --enable-lldb-debugging)--no-enable-lldb-debugging[Disable support for debugging with LLDB]' \ '(--no-enable-uiscene-migration --enable-uiscene-migration)--enable-uiscene-migration[Enable support for migration to UIScene lifecycle]' \ '(--no-enable-uiscene-migration --enable-uiscene-migration)--no-enable-uiscene-migration[Disable support for migration to UIScene lifecycle]' \ '--clear-features[Remove all configured features and restore them to the default values]' \ && ret=0 ;; (create) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--pub --no-pub)--pub[Run "flutter packages get" after the project has been created. (defaults to on)]' \ '(--pub --no-pub)--no-pub[Do not run "flutter packages get" after the project has been created]' \ '(--offline --no-offline)--offline[Run "flutter packages get" in offline mode]' \ '(--offline --no-offline)--no-offline[Do not run "flutter packages get" in offline mode]' \ '(--overwrite --no-overwrite)--overwrite[When performing operations, overwrite existing files]' \ '(--overwrite --no-overwrite)--no-overwrite[When performing operations, not overwrite existing files]' \ "--description=[The description to use for your new Flutter project(defaults to 'A new Flutter project.')]::" \ "--org=[The organization responsible for new Flutter project, in reverse domain name notation.(defaults to 'com.example')]::" \ '--project-name=[The project name for this new Flutter project]:name:' \ '(-i --ios-language)'{-i,--ios-language=}'[iOS project language]: :_flutter_ios_languages' \ '(-a --android-language)'{-a,--android-language=}'[Android project language]: :_flutter_android_languages' \ '--platforms=[The platforms supported by this project]:platforms:_flutter_platforms' \ '(-t --template=)'{-t,--template=}'[Specify the type of project to create]: :_flutter_project_templates' \ '(-e --empty)'{-e,--empty}'[Specifies creating using an application template with a main.dart that is minimal]' \ && ret=0 ;; (custom-devices) _flutter_custom_devices && ret=0 ;; (debug-adapter) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \ '(--no-dds --dds)--dds[Enable the Dart Developer Service]' \ '(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \ '(--no-test --test)--test[use the "flutter test" debug adapter to run tests]' \ '(--no-test --test)--no-test[not use the "flutter test" debug adapter to run tests]' \ && ret=0 ;; (devices) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ "--device-timeout=[Time in seconds to wait for devices to attach]:seconds:" \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ && ret=0 ;; (doctor) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ "--android-licenses[Run the Android SDK manager tool to accept the SDK's licenses]" \ && ret=0 ;; (drive) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--debug[Build a debug version of your app (default mode)]' \ '--profile[Build a version of your app specialized for performance profiling]' \ '--release[Build a release version of your app]' \ '*--dart-define=[Additional key-value pairs that will be available as constants]:' \ '--dart-define-from-file=[The path of a json or .env file containing key-value pairs]: :_files -g "*.(json|env)"' \ '*--web-define=[Additional key-value pairs that will be available as template variables in web/index.html]' \ '--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \ '--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \ '--use-application-binary=[Specify a pre-built application binary to use when running]:app:_files -g "*.apk"' \ '--trace-startup[Start tracing during startup]' \ '(--cache-startup-profile --no-cache-startup-profile)--cache-startup-profile[Caches the CPU profile collected before the first frame for startup analysis]' \ '(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \ '--verbose-system-logs[Include verbose logging from the Flutter engine]' \ '--purge-persistent-cache[Removes all existing persistent caches]' \ '--route[Which route to load when running the app]' \ '(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \ '(--no-start-paused --start-paused)--no-start-paused[Not start in a paused mode and wait for a debugger to connect]' \ '--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \ '--trace-systrace[Enable tracing to the system tracer]' \ '--trace-to-file=[Write the timeline trace to a file at the specified path]:file:_files' \ '--trace-skia[Enable tracing of Skia code]' \ '--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \ *{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \ '--wasm[Compile to WebAssembly rather than JavaScript]' \ '--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \ '--web-tls-cert-key-path=[The certificate key that host will use to authenticate cert]:key:_files' \ '--web-launch-url=[The URL to provide to the browser]: :' \ '(-t --target=)'{-t,--target=}'[The main entry-point file of the application, as run on the device.(defaults to "lib/main.dart")]: :_files -g "*.dart"' \ '--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \ '--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \ '(--no-pub --pub)--pub[Run "flutter packages get" before executing this command. (default: on)]' \ '(--no-pub --pub)--no-pub[Do not run "flutter packages get" before executing this command]' \ '(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation locations(defaults on)]' \ '(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \ '--device-user=[Identifier number for a user or work profile on Android only]:id:' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ '--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \ '(--no-dds --dds)--dds[Enable the Dart Developer Service]' \ '(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \ '(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--android-skip-build-dependency-validation[Skip version checking during Android builds]' \ '(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--no-android-skip-build-dependency-validation[Not skip version checking during Android builds]' \ *{-P,--android-project-arg=}'[Additional arguments specified as key=value that are passed directly to the gradle project]: :' \ '(--no-keep-app-running --keep-app-running)--no-keep-app-running[Will not keep the Flutter application running when done testing]' \ '(--no-keep-app-running --keep-app-running)--keep-app-running[Will keep the Flutter application running when done testing]' \ '--use-existing-app=[Connect to an already running instance via the given observatory URL]' \ '--driver=[The test file to run on the host]: :_files' \ '(--no-build --build)--build[If necessary, build the app before running. (defaults to on)]' \ '(--no-build --build)--no-build[If necessary, not build the app before running]' \ '--screenshot=[Directory location to write screenshots on test failure]::_path_files -/' \ '--driver-port=[The port where Webdriver server is launched at(default to "4444")]:port:' \ '(--no-headless --headless)--headless[Launch driver browser in headless mode(defaults to on)]' \ '(--no-headless --headless)--no-headless[Not launch driver browser in headless mode]' \ '--browser-name=[Name of the browser where tests will be executed]: :(android-chrome chrome edge firefox ios-safari safari)' \ '--browser-dimension=[The dimension of the browser when running a Flutter Web test(defaults to "1600,1024")]: :' \ '(--no-android-emulator --android-emulator)--android-emulator[Perform Flutter Driver testing using an Android Emulator]' \ '(--no-android-emulator --android-emulator)--no-android-emulator[Not perform Flutter Driver testing using an Android Emulator]' \ '--chrome-binary=[Location of the Chrome binary]::_files' \ '*--test-arguments=[Additional arguments to pass to the Dart VM running The test script]:arg' \ '--profile-memory=[Launch devtools and profile application memory, writing the output data as JSON]:file:_files -g "*.json"' \ '--timeout=[Timeout the test after the given number of seconds]:seconds' \ && ret=0 ;; (emulators) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--launch[The full or partial ID of the emulator to launch]' \ '--cold[Used with the "--launch" flag to cold boot the emulator instance (Android only)]' \ '--create[Creates a new Android emulator based on a Pixel device]' \ '--name[Used with the "--create" flag. Specifies a name for the emulator being created]' \ && ret=0 ;; (gen-l10n) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--arb-dir=[The directory where template arb files are located]::_path_files -/' \ '--output-dir=[The directory where the generated localization classes will be written]::_path_files -/' \ '--template-arb-file=[The path of template arb file]::_files' \ '--output-localization-file=[The filename for the output localization and localizations delegate classes]::_files -g "*.dart"' \ '--untranslated-messages-file=[The file that describes the localization messages have not been translated yet]::_files' \ '--output-class=[The Dart class name to use for the output localization and localizations delegate classes]:class:' \ '--preferred-supported-locales=[The list of preferred supported locales for the application]::' \ '--header=[The header to prepend to the generated Dart localizations files]:header:' \ '--header-file=[The header to prepend to the generated Dart localizations files]::_files' \ '(--no-use-deferred-loading --use-deferred-loading)--use-deferred-loading[Generate the Dart localization file as deferred]' \ '(--no-use-deferred-loading --use-deferred-loading)--no-use-deferred-loading[Not generate the Dart localization file as deferred]' \ '--gen-inputs-and-outputs-list=[the tool generates a JSON file containing the tools inputs and outputs]::_path_files -/' \ '--project-dir=[the directory of the root Flutter project]::_path_files -/' \ '(--no-required-resource-attributes --required-resource-attributes)--required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \ '(--no-required-resource-attributes --required-resource-attributes)--no-required-resource-attributes[Requires all resource ids to contain a corresponding resource attribute]' \ '(--no-nullable-getter --nullable-getter)--nullable-getter[The localizations class getter is nullable]' \ '(--no-nullable-getter --nullable-getter)--no-nullable-getter[The localizations class getter is not nullable]' \ '--format["dart format" is run after generating the localization files]' \ '--use-escaping[use escaping for message]' \ '--suppress-warnings[all warnings will be suppressed]' \ '--relax-syntax[Use the relax syntax]' \ '--use-named-parameter[Use named parameters for generated localization methods]' \ && ret=0 ;; (install) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--debug[Build a debug version of your app]' \ '--profile[Build a version of your app specialized for performance profiling]' \ '--release[Build a release version of your app(default mode)]' \ '--use-application-binary=[Specify a prebuild application binary to use when running]: :_files -g "*.apk"' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ '--device-user=[Identifier number for a user or work profile on Android only]:id:' \ '--flavor[Build a custom app flavors as defined by platform-specific build setup]:flavor' \ '(--no-uninstall-only --uninstall-only)--uninstall-only[Uninstall the app if already on the device. Skip install]' \ '(--no-uninstall-only --uninstall-only)--no-uninstall-only[Uninstall the app if already on the device. Skip install]' \ && ret=0 ;; (logs) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-c --clear)'{-c,--clear}'[Clear log history before reading from logs]' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds:' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ && ret=0 ;; (precache) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-a --all-platforms)'{-a,--all-platforms}'[Precache artifacts for all platforms]' \ '(-f --force)'{-f,--force}'[Force re-downloading of artifacts]' \ '(--no-ios --ios)--ios[Precache artifacts for iOS development]' \ '(--no-ios --ios)--no-ios[Not precache artifacts for iOS development]' \ '(--no-web --web)--web[Precache artifacts for web development]' \ '(--no-web --web)--no-web[Not precache artifacts for web development]' \ '(--no-linux --linux)--linux[Precache artifacts for Linux desktop development]' \ '(--no-linux --linux)--no-linux[Not recache artifacts for Linux desktop development]' \ '(--no-windows --windows)--windows[Precache artifacts for Windows desktop development]' \ '(--no-windows --windows)--no-windows[Not precache artifacts for Windows desktop development]' \ '(--no-macos --macos)--macos[Precache artifacts for macOS desktop development]' \ '(--no-macos --macos)--no-macos[Not precache artifacts for macOS desktop development]' \ '(--no-fuchsia --fuchsia)--fuchsia[Precache artifacts for Fuchsia development]' \ '(--no-fuchsia --fuchsia)--no-fuchsia[Not precache artifacts for Fuchsia development]' \ '(--no-universal --universal)--universal[Precache artifacts required for any development platform]' \ '(--no-universal --universal)--no-universal[Not precache artifacts required for any development platform]' \ && ret=0 ;; (pub) _flutter_pub && ret=0 ;; (run) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--debug[Build a debug version of your app (default mode)]' \ '--profile[Build a version of your app specialized for performance profiling]' \ '--release[Build a release version of your app]' \ \*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \ '--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \ '*--web-define=[Additional key-value pairs that will be available as template variables in web/index.html]' \ '--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \ '--no-web-resources-cdn[Do not use Web static resources hosted on a CDN]' \ '--use-application-binary=[Specify a pre-built-application binary to use when running]: :_files' \ '--trace-startup[Start tracing during startup]' \ '(--cache-startup-profile --no-cache-startup-profile)--cache-startup-profile[Caches the CPU profile collected before the first frame for startup analysis]' \ '(--cache-startup-profile --no-cache-startup-profile)--no-cache-startup-profile[Not caches the CPU profile collected before the first frame for startup analysis]' \ '--verbose-system-logs[Include verbose logging from the Flutter engine]' \ '--cache-sksl[Cache the shader in the SkSL format instead of in binary or GLSL formats]' \ '--purge-persistent-cache[Removes all existing persistent caches]' \ '--route[Which route to load when running the app]' \ '(--no-start-paused --start-paused)--start-paused[Start in a paused mode and wait for a debugger to connect]' \ '(--no-start-paused --start-paused)--no-start-paused[Not start in a paused mode and wait for a debugger to connect]' \ '--endless-trace-buffer[Enable tracing to an infinite buffer, instead of a ring buffer]' \ '--trace-systrace[Enable tracing to the system tracer]' \ '--trace-to-file=[Write the timeline trace to a file at the specified path]:file:_files' \ '--trace-skia[Enable tracing of Skia code]' \ '--no-enable-dart-profiling[Disable the Dart VM sampling CPU profiler]' \ '--enable-software-rendering[Enable rendering using the Skia software backend]' \ \*{-a,--dart-entrypoint-args=}'[Pass a list of arguments to the Dart entrypoint at application startup]: :' \ '--wasm[Compile to WebAssembly rather than JavaScript]' \ '--web-tls-cert-path=[The certificate that host will use to serve using TLS connection]:cert:_files' \ '--web-tls-cert-key-path=[The certificate key that host will use to authenticate cert]:key:_files' \ '--web-launch-url=[The URL to provide to the browser]: :' \ '(-t --target=)'{-t,--target=}'[The main entry-point file of the application, as run on the device(default: "lib/main.dart")]: :_files -g "*.dart"' \ '--device-vmservice-port=[Look for vmservice connections only from the specified port]:port:' \ '--host-vmservice-port=[When a device-side vmservice port is forwarded to a host-side port]:port:' \ '(--no-pub --pub)--pub[Run "flutter packages get" before executing this command(default: on)]' \ '(--no-pub --pub)--no-pub[Do not run "flutter packages get" before executing this command]' \ '(--no-track-widget-creation --track-widget-creation)--track-widget-creation[Track widget creation locations. (defaults to on)]' \ '(--no-track-widget-creation --track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \ '--device-user=[Identifier number for a user or work profile on Android only]:id' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ '--dds-port=[When this value is provided, the Dart Development Service (DDS) will be bound to the provided port]:port:' \ '(--no-dds --dds)--dds[Enable the Dart Developer Service]' \ '(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \ '(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--android-skip-build-dependency-validation[Skip version checking during Android builds]' \ '(--no-android-skip-build-dependency-validation --android-skip-build-dependency-validation)--no-android-skip-build-dependency-validation[Skip version checking during Android builds]' \ *{-P,--android-project-arg=}'[Additional arguments specified as key=value that are passed directly to the gradle project via the -P flag]: :' \ '--android-project-cache-dir[Specify the project-specific cache directory]:dir:_file -/' \ '--ignore-deprecation[Indicates that the app should ignore deprecation warnings and continue to build using deprecated APIs]' \ '--no-await-first-frame-when-tracing[Just dump the trace as soon as the application is running]' \ '(--no-use-test-fonts --use-test-fonts)--use-test-fonts[Enable (and default to) the "Ahem" font]' \ '(--no-use-test-fonts --use-test-fonts)--no-use-test-fonts[Not enable (and default to) the "Ahem" font]' \ '--no-build[Do not build the app before running]' \ '--no-hot[Run without support for hot reloading]' \ '--pid-file=[Specify a file to write the process id to]: :_files' \ && ret=0 ;; (screenshot) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-o --out)'{-o,--out=}'[Location to write the screenshot]: :_files' \ '--vm-service-url=[The VM Service URL to which to connect]' \ '--type=[The type of screenshot to retrieve]:type:(device skia)' \ '--device-timeout=[Time in seconds to wait for devices to attach]:seconds' \ '--device-connection=[Discover devices based on connection type]:type:_flutter_device_connection_types' \ && ret=0 ;; (symbolize) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-d --debug-info)'{-d,--debug-info=}'[A path to the symbols file generated with "--split-debug-info"]: :_files' \ '(-u --unit-id-debug-info)'{-d,--unit-id-debug}'[A loading unit id and the path to the symbols file]:id' \ '(-i --input)'{-i,--input=}'[A file path containing a Dart stack trace]: :_files' \ '(-o --output)'{-o,--output=}'[A file path for a symbolized stack trace to be written to]: :_files' \ && ret=0 ;; (test) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--pub --no-pub)--pub[Run "flutter packages get" before executing this command(defaults to on)]' \ '(--pub --no-pub)--no-pub[Not to run "flutter packages get" before executing this command]' \ '(--track-widget-creation --no-track-widget-creation)--track-widget-creation[Track widget creation locations]' \ '(--track-widget-creation --no-track-widget-creation)--no-track-widget-creation[Not track widget creation locations]' \ \*{-D,--dart-define=}'[Additional key-value pairs that will be available as constants]:define' \ '--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' \ '--device-user=[Identifier number for a user or work profile on Android only]:id:' \ '--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' \ '--name=[A regular expression matching substrings of the names of tests to run]' \ '--plain-name=[A plain-text substring of the names of tests to run]' \ *{-t,--tags=}'[Run only tests associated with the specified tags]:tag:' \ *{-x,--exclude-tags=}'[Run only tests that do not have the specified tags]:tag:' \ '--start-paused[Start in a paused mode and wait for a debugger to connect]' \ '(--no-fail-fast --fail-fast)--fail-fast[Stop running tests after the first failure]' \ '(--no-fail-fast --fail-fast)--no-fail-fast[Do not stop running tests after the first failure]' \ '(--no-run-skipped --run-skipped)--run-skipped[Run skipped tests instead of skipping them]' \ '(--no-run-skipped --run-skipped)--no-run-skipped[Not run skipped tests instead of skipping them]' \ '--coverage[Whether to collect coverage information]' \ '--merge-coverage[Whether to merge coverage data with "coverage/lcov.base.info" (Requires lcov)]' \ '--branch-coverage[Whether to collect branch coverage information]' \ '--coverage-path=[Where to store coverage information (if coverage is enabled). (defaults to "coverage/lcov.info")]::_files' \ '--coverage-package=[A regular expression matching packages names to include in the coverage report]:pattern' \ '--update-goldens[Whether "matchesGoldenFile()" calls within your test methods should update the golden files]' \ '(-j --concurrency)'{-j,--concurrency=}'[The number of concurrent test processes to run]:nums:' \ '(--test-assets --no-test-assets)--test-assets[Build the assets bundle for testing]' \ '(--test-assets --no-test-assets)--no-test-assets[Not build the assets bundle for testing]' \ '--test-randomize-ordering-seed[The seed to randomize the execution order of test cases within test files]' \ '--total-shards[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \ '--shard-index[Tests can be sharded with the "--total-shards" and "--shard-index" arguments]' \ {-r,--reporter=}'[Set how to print test results]: :(compact expanded failures-only github json silent)' \ '--file-reporter[Enable an additional reporter writing test results to a file]' \ '--timeout=[The default test timeout, specified either in seconds (e.g. "60s"). Defaults to "30s"]:seconds:' \ '--ignore-timeouts[Ignore all timeouts]' \ '--wasm[Compile to WebAssembly rather than JavaScript]' \ '--dds-port=[the Dart Development Service (DDS) will be bound to the provided port]:port:' \ '(--no-dds --dds)--dds[Enable the Dart Developer Service]' \ '(--no-dds --dds)--no-dds[Disable the Dart Developer Service]' \ && ret=0 ;; (upgrade) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-f --force)'{-f,--force}'[Force upgrade the flutter branch, potentially discarding local changes]' \ '--verify-only[Checks for any new Flutter updates, without actually fetching them]' \ && ret=0 ;; (widget-preview) _flutter_widget_preview && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_flutter_root_commands] )) || _flutter_root_commands() { local -a commands=( "analyze:Analyze the project's Dart code." 'assemble:Assemble and build flutter resources.' 'attach:Attach to a running application.' 'bash-completion:Output command line shell completion setup scripts.' 'build:Flutter build commands.' 'channel:List or switch flutter channels.' 'clean:Delete the build/ directory.' 'config:Configure Flutter settings.' 'create:Create a new Flutter project.' 'custom-devices:List, reset, add and delete custom devices' 'daemon:Run a persistent, JSON-RPC based server to communicate with devices.' 'debug-adapter:Run a Debug Adapter Protocol server to communicate with the Flutter tool' 'devices:List all connected devices.' 'doctor:Show information about the installed tooling.' 'downgrade:Downgrade Flutter to the last active version for the current channel' 'drive:Runs Flutter Driver tests for the current project.' 'emulators:List, launch and create emulators.' 'gen-l10n:Generate localizations for the current project.' 'help:Display help information for flutter.' 'install:Install a Flutter app on an attached device.' 'logs:Show log output for running Flutter apps.' "precache:Populates the Flutter tool's cache of binary artifacts." 'pub:Commands for managing Flutter packages.' 'run:Run your Flutter app on an attached device.' 'screenshot:Take a screenshot from a connected device.' 'symbolize:Symbolize a stack trace from an AOT-compiled Flutter app.' 'test:Run Flutter unit tests for the current project.' 'upgrade:Upgrade your copy of Flutter.' 'widget-preview:Manage the widget preview environment' ) _describe -t commands 'command' commands "$@" } (( $+functions[_flutter_build] )) || _flutter_build() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_build_subcommands' \ '*:: :->args' \ && ret=0 case $state in (args) local opts=( '(- *)'{-h,--help}'[Print this usage information]' '(--debug --profile --release)--debug[Build a debug version of your app]' '(--debug --profile --release)--profile[Build a version of your app specialized for performance profiling]' '(--debug --profile --release)--release[Build a release version of your app(default mode)]' '--no-tree-shake-icons[Not use Tree shake icon fonts]' '--flavor[Build a custom app flavor as defined by platform-specific build setup]:flavor' '--build-number[An identifier used as an internal version number]:build_number' '(-o --output)'{-o,--output}'[The absolute path to the directory where the repository is generated]:dir:_files -/' '(--no-pub)--pub[Run "flutter pub get" before executing this command]' '(--pub)--no-pub[Do not run "flutter pub get" before executing this command]' '--split-debug-info[Split debug info]: :_files -/' '--obfuscate[Remove identifiers and replace them with randomized values for code obfuscation]' '*--dart-define=[Additional key-value pairs that will be available as constants]:' '--dart-define-from-file=[The path of a json format file where flutter define a global constant pool]: :_files -g "*.(json|env)"' '--no-track-widget-creation[Not track widget creation locations]' '(--no-null-assertions)--null-assertions[Perform additional null assertions on the boundaries of migrated and un-migrated code]' '(--null-assertions)--no-null-assertions[Not perform additional null assertions on the boundaries of migrated and un-migrated code]' ) case $words[1] in (aar) opts+=( '--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)' *{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg' ) ;; (apk|appbundle) opts+=( '--build-name=[A string used as the version number shown to users]:build_name' '(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]' '(--analyze-size)--no-analyze-size[Not produce additional profile information for artifact output size]' '--code-size-directory=[The location to write code size analysis files]: :_files -/' *{-P,--android-project-arg}'[Additional arguments specified as key=value that are passed to gradle -P option]:arg' '--no-multidex[the app is not built with multidex support]' '--ignore-deprecation[the app should ignore deprecation warnings and continue to build using deprecated APIs]' '--split-per-abi[Split the APKs per ABIs]' '--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)' ) if [[ $words[1] == "apk" ]]; then opts+=( '--config-only[Generate build files used by flutter but do not build any artifacts]' ) else opts+=( '--no-deferred-components[Disable building with deferred components]' '--no-validate-deferred-components[Do not validate deferred component]' ) fi ;; (bundle) opts+=( '--depfile[A file path where a depfile will be written]:depfile:_files' '--target-platform=[The target platform for which the project is compiled]: :(android-arm android-arm64 android-x86 android-x64)' '--asset-dir[The output directory for the kernel_blob.bin file]: :_files -/' ) ;; (ios) opts+=( '--code-size-directory=[The location to write code size analysis files]: :_files -/' '--no-codesign[Do not codesign the application bundle]' '--config-only[Update the project configuration without performing a build]' '--simulator[Build for the iOS simulator instead of the device]' ) ;; (ios-framework|macos-framework) opts+=( '--cocoapods[Produce a Flutter.podspec instead of an engine Flutter.xcframework]' '--plugins[Produce frameworks for the plugins]' '--static[Build plugins as static frameworks]' ) ;; (linux) opts+=( '(--no-analyze-size)--analyze-size[Produce additional profile information for artifact output size]' '(--analyze-size)--no-analyze-size[Not produce additional profile information for artifact output size]' '--code-size-directory=[The location to write code size analysis files]: :_files -/' '(-t --target)'{-t,--target=}'[The main entry-point file of the application]:file:_files' '--build-name=[A string used as the version number shown to users]:build_name' '--target-platform=[The target platform for which the project is compiled]: :(linux-arm64 linux-x64)' '--target-sysroot=[The root filesystem path of target platform]: :_files -/' ) ;; (macos) opts+=( '--build-name=[A string used as the version number shown to users]:build_name' '--config-only[Update the project configuration without performing a build]' ) ;; (web) opts+=( '(-t --target)'{-t,--target=}'[The main entry-point file of the application]:file:_files' '--no-native-null-assertions[Disable additional runtime null checks in web applications]' '--base-href[Overrides the href attribute of the base tag in web/index.html]' '--pwa-strategy=[The caching strategy to be used by the PWA service worker]: :(none offline-first)' '--web-renderer=[The renderer implementation to use when building for the web]: :_flutter_web_renderers' '(--no-web-resources-cdn)--web-resources-cdn[Use Web static resources hosted on a CDN]' '(--web-resources-cdn)--no-web-resources-cdn[Do not Web static resources hosted on a CDN]' '--csp[Disable dynamic generation of code in the generated output]' '(--no-source-maps)--source-maps[Generate a sourcemap file]' '(--source-maps)--no-source-maps[Do not generate a sourcemap file]' '--dart2js-optimization=[Sets the optimization level used for Dart compilation to JavaScript]: :(O0 O1 O2 O3 O4)' '--dump-info[Passes "--dump-info" to the JavaScript compiler]' '--no-frequency-based-minification[Disables the frequency based minifier]' '--wasm[Compile to WebAssembly]' '(--no-strip-wasm --strip-wasm)--strip-wasm[Strip the resulting wasm file of static symbol names]' '(--no-strip-wasm --strip-wasm)--no-strip-wasm[Not strip the resulting wasm file of static symbol names]' ) ;; (windows) opts+=( '--build-name=[A string used as the version number shown to users]:build_name' ) ;; esac _arguments $opts && ret=0 ;; esac return ret } (( $+functions[_flutter_build_subcommands] )) || _flutter_build_subcommands() { local -a entities=( "aar:Build a repository containing an AAR and a POM file" "apk:Build an Android APK file from your app" "appbundle:Build an Android App Bundle file from your app" "bundle:Build the Flutter assets directory from your app" "ios:Build an iOS application bundle" "ios-framework:Produces .xcframeworks for a Flutter project for existing, plain iOS Xcode projects" "linux:Build a Linux desktop application" "macos:Build a macOS desktop application" "macos-framework:Produces .xcframeworks for a Flutter project for existing, plain macOS Xcode projects" "web:Build a web application bundle" "windows:Build a Windows desktop application" ) _describe -t entities 'entity' entities "$@" } (( $+functions[_flutter_custom_devices] )) || _flutter_custom_devices() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_custom_devices_subcommands' \ '*:: :->args' \ && ret=0 case $state in (args) case $words[1] in (add) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--check[Make sure the config actually works]' \ '--json=[Add the custom device described by this JSON encoded string]:json' \ '--ssh[Add a ssh-device]' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 esac ;; esac return ret } (( $+functions[_flutter_custom_devices_subcommands] )) || _flutter_custom_devices_subcommands() { local -a subcmds=( "add:Add a new device the custom devices config file" "delete:Delete a device from the config file" "list:List the currently configured custom devices, both enabled and disabled, reachable or not" "reset:Reset the config file to the default" ) _describe -t subcmds 'subcommands' subcmds "$@" } (( $+functions[_flutter_pub] )) || _flutter_pub() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_pub_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (add|remove) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--offline[Use cached packages instead of accessing the network]' \ '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \ '--precompile[Build executables in immediate dependencies]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (cache) _flutter_pub_cache && ret=0 ;; (deps) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-s --style)'{-s,--style=}'[How output should be displayed]:style:(tree list compact)' \ '(--no-dev)--dev[Include dev dependencies]' \ '(--dev)--no-dev[Not include dev dependencies]' \ '--executables[List all available executables]' \ '--json[Output dependency information in a json format]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (downgrade) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--offline[Use cached packages instead of accessing the network]' \ '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (get) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--offline[Use cached packages instead of accessing the network]' \ '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \ '--enforce-lockfile[Enforce pubspec.lock]' \ '--precompile[Build executables in immediate dependencies]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (global) _flutter_pub_global && ret=0 ;; (outdated) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--no-dependency-overrides)--dependency-overrides[Show resolution with `dependency_overrides`]' \ '(--dependency-overrides)--no-dependency-overrides[Not show resolution with `dependency_overrides`]' \ '(--no-dev-dependencies)--dev-dependencies[Take the dependencies into account]' \ '(--dev-dependencies)--no-dev-dependencies[Not take the dependencies into account]' \ '--json[Output the results using a json format]' \ '(--no-prereleases)--prereleases[Include prereleases in latest version]' \ '(--prereleases)--no-prereleases[Not include prereleases in latest version]' \ '--show-all[Include dependencies that are already fulfilling --mode]' \ '--transitive[Show transitive dependencies]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (publish) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \ '(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]' \ '--skip-validation[Publish without validation and resolution]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ '--ignore-warnings[Do not treat warnings as fatal]' \ && ret=0 ;; (run) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--enable-asserts[Enable assert statements]' \ '--enable-experiment=[Run the executable in a VM with the given experiments enabled]:experiment' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (token) _flutter_pub_token && ret=0 ;; (upgrade) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--offline[Use cached packages instead of accessing the network]' \ '(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]' \ '--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]' \ '--precompile[Build executables in immediate dependencies]' \ '--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]' \ '--major-versions[Upgrades packages to their latest resolvable versions]' \ '--no-example[Do not run in "example/" if it exists]' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (uploader) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--package=[The package whose uploaders will be modified]:package' \ '(-C --directory)'{-C,--directory=}'[Run this in the given directory]:dir:_files -/' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 esac ;; esac return ret } (( $+functions[_flutter_pub_subcommands] )) || _flutter_pub_subcommands() { local -a subcommands=( "add:Add a dependency to pubspec.yaml" "cache:Work with the Pub system cache" "deps:Print package dependencies" "downgrade:Downgrade packages in a Flutter project" "get:Get packages in a Flutter project" "global:Work with Pub global packages" "login:Log into pub.dev" "logout:Log out of pub.dev" "outdated:Analyze dependencies to find which ones can be upgraded" "pub:Pass the remaining arguments to Dart's 'pub' tool" "publish:Publish the current package to pub.dartlang.org" "remove:Removes a dependency from the current package" "run:Run an executable from a package" "test:Run the 'test' package" "token:Manage authentication tokens for hosted pub repositories" "upgrade:Upgrade the current package's dependencies to latest versions" "uploader:Manage uploaders for a package on pub.dev" "version:Print Pub version" ) _describe -t subcommands 'subcommand' subcommands "$@" } (( $+functions[_flutter_pub_cache] )) || _flutter_pub_cache() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_pub_cache_subcommand' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (add) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--all[Install all matching versions]'\ '(-v --version)'{-v,--version}'[Version constraint]:version' \ && ret=0 ;; (clean) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-f --force)'{f,--force}'[Do not ask for confirmation]' \ && ret=0 ;; (repair) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_flutter_pub_cache_subcommand] )) || _flutter_pub_cache_subcommand() { local -a subcommands=( "add:Install a package" "clean:Clears the global PUB_CACHE" "repair:Reinstall cached packages" ) _describe -t subcommands 'subcommand' subcommands "$@" } (( $+functions[_flutter_pub_global] )) || _flutter_pub_global() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_pub_global_subcommand' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (activate) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(-s --source)'{-s,--source}'[The source used to find the package]:source:(git hosted path)' \ '--git-path[Path of git package in repository]:path' \ '--git-ref[Git branch or commit to bbe retrieved]:ref' \ '(-x --executable)--no-executables[Do not put executables on PATH]' \ '(--no-executables)'{-x,--executable}'[Executables to place on PATH]' \ '--overwrite[Overwrite executables from other packages with the same name]' \ '(-u --hosted-url)'{-u,--hosted-url}'[A custom pub server URL for the package]:URL' \ && ret=0 ;; (run) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--enable-asserts[Enable assert statements]' \ '--enable-experiment=[Run the executable in a VM with the given experiments enabled]' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 esac ;; esac return ret } (( $+functions[_flutter_pub_global_subcommand] )) || _flutter_pub_global_subcommand() { local -a subcommands=( "activate:Make a package's executables globally available" "deactivate:Remove a previously activated package" "list:List globally activated packages" "run:Run an executable from a globally activated package" ) _describe -t subcommands 'subcommand' subcommands "$@" } (( $+functions[_flutter_pub_token] )) || _flutter_pub_token() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_flutter_pub_token_subcommand' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (add) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--env-var[Read the secret token from this environment variable when making requests]:env' \ && ret=0 ;; (remove) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '--all[Remove all secret tokens]' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_flutter_pub_token_subcommand] )) || _flutter_pub_token_subcommand() { local -a subcommands=( "add:Add authentication tokens for a package repository" "list:List servers for which a token exists" "remove:Remove secret token for package repository" ) _describe -t subcommands 'subcommand' subcommands "$@" } (( $+functions[_flutter_widget_preview] )) || _flutter_widget_preview() { local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ \*{-v,--verbose}'[Noisy logging, including all shell commands executed]' \ '(-d --device-id)'{-d,--device-id}'[Target device id or name]:id_or_name' \ '(- *)--version[Report the version of this tool]' \ '(--enable-analytics --disable-analytics)--enable-analytics[Enable telemetry reporting each time a flutter or dart command runs]' \ '(--enable-analytics --disable-analytics)--disable-analytics[Disable telemetry reporting each time a flutter or dart command runs]' \ '--suppress-analytics[Suppress analytics reporting for the current CLI invocation]' \ '1: :_flutter_widget_preview_subcommand' \ '*:: :->arg' \ && ret=0 case $state in (arg) case $words[1] in (clean) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ && ret=0 ;; (start) _arguments \ '(- *)'{-h,--help}'[Print this usage information]' \ '(--pub --no-pub)--pub[Run "flutter packages get" after the project has been created]' \ '(--pub --no-pub)--no-pub[Do not run "flutter packages get" after the project has been created]' \ '(--offline --no-offline)--offline[Run "flutter packages get" in offline mode]' \ '(--offline --no-offline)--no-offline[Do not run "flutter packages get" in offline mode]' \ '(--web-server --no-web-server)--web-server[Serve the widget preview environment using the web-server device instead of browser]' \ '(--web-server --no-web-server)--no-web-server[Do not serve the widget preview environment using the web-server device]' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_flutter_widget_preview_subcommand] )) || _flutter_widget_preview_subcommand() { local -a subcommands=( "clean:Cleans up widget preview state" "start:Starts the widget preview environment" ) _describe -t subcommands 'subcommand' subcommands "$@" } # Utilities (( $+functions[_flutter_project_templates] )) || _flutter_project_templates() { local -a templates=( "app:(default) Generate a Flutter application" "module:Generate a shareable Flutter project containing modular Dart code" "package:Generate a shareable Dart/Flutter project containing modular Dart code" "package_ffi:Generate a shareable Dart/Flutter project containing an API in Dart with FFI" "plugin:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation for Android, for iOS code, or for both" "plugin_ffi:Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation through dart:ffi for Android, iOS, Linux, macOS, Windows, or any combination of these" "skeleton:Generate a List View / Detail View Flutter application that follows community best practices" ) _describe -t templates 'template' templates "$@" } (( $+functions[_flutter_platforms] )) || _flutter_platforms() { local -a platforms=("ios" "android" "windows" "linux" "macos" "web" "darwin") _values -s , "platforms" $platforms } (( $+functions[_flutter_ios_languages] )) || _flutter_ios_languages() { local -a languages=( "objc:Objective-C" "swift:(default) Swift" ) _describe -t languages 'language' languages "$@" } (( $+functions[_flutter_android_languages] )) || _flutter_android_languages() { local -a languages=( "java:Java" "kotlin:(default) Kotlin" ) _describe -t languages 'language' languages "$@" } (( $+functions[_flutter_web_renderers] )) || _flutter_web_renderers() { local -a renderers=( 'auto:HTML renderer on mobile devices' 'canvaskit:CanvasKit renderer' 'html:HTML renderer' 'skwasm:Experimental skwasm renderer' ) _describe -t renderers 'renderers' renderers "$@" } (( $+functions[_flutter_device_connection_types] )) || _flutter_device_connection_types() { local -a types=( 'attached:Only searches for devices connected by USB or built-in' 'both:Searches for both attached and wireless devices' 'wireless:Only searches for devices connected wirelessly' ) _describe -t types 'types' types "$@" } _flutter "$@" # 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 ================================================ FILE: src/_fwupdmgr ================================================ #compdef fwupdmgr # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for fwupdmgr 1.8.12 (https://github.com/hughsie/fwupd). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _fwupdmgr() { local context state state_descr line typeset -A opt_args local ret=1 _arguments -C \ '(- : *)'{-h,--help}'[display help information]' \ '(- : *)--version[display version information]' \ '(-v --verbose)'{-v,--verbose}'[show extra debugging information]' \ '--offline[schedule installation for next reboot when possible]' \ '--allow-reinstall[allow re-installing existing firmware versions]' \ '--allow-older[allow downgrading firmware versions]' \ '--allow-branch-switch[allow switching firmware branch]' \ '--force[override warnings and force the action]' \ '(-y --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \ '--sign[sign the uploaded data with the client certificate]' \ '--no-unreported-check[do not check for unreported history]' \ '--no-metadata-check[do not check for old metadata]' \ '--no-reboot-check[do not check for reboot after update]' \ '--no-safety-check[do not perform device safety checks]' \ '--no-device-prompt[do not prompt for devices]' \ '--no-history[do not write to the history database]' \ '--show-all[show all results]' \ '--disable-ssl-strict[ignore SSL strict checks when downloading files]' \ '--ipfs[only use IPFS when downloading files]' \ '--filter[filter with a set of device flags using a ~ prefix to exclude]:filter' \ '--json[output in JSON format]' \ '--no-authenticate[do not prompt for authentication]' \ '(-): :->command' \ '(-)*:: :->arguments' \ && ret=0 case $state in (command) _fwupdmgr_commands ;; (arguments) case $words[1] in (activate|downgrade|emulation-tag|emulation-untag|get-releases|get-updates|reinstall|update|verify|verify-update) _arguments \ '1::device_id or GUID:_fwupdmgr_device_ids' \ && ret=0 ;; (clear-results|get-results|unlock) _arguments \ '1:device_id or GUID:_fwupdmgr_device_ids' \ && ret=0 ;; (device-emulate|device-test|emulation-load|emulation-save|get-details|set-approved-firmware) _arguments \ '*::files:_files' \ && ret=0 ;; (disable-remote|modify-remote) _arguments \ '1:remote ID:_fwupdmgr_remote_ids' \ && ret=0 ;; (install) _arguments \ '1:device_id or GUID:_fwupdmgr_device_ids' \ '2:version' \ && ret=0 ;; (local-install) _arguments \ '1:file:_files' \ '2:device_id or GUID:_fwupdmgr_device_ids' \ && ret=0 ;; (refresh) _arguments \ '1:file or remote ID:_alternative "file\:file\:_files" "remotes\:remote ID\:_fwupdmgr_remote_ids"' \ && ret=0 ;; (switch-branch) _arguments \ '1:device_id or GUID:_fwupdmgr_device_ids' \ '2:branch' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_fwupdmgr_commands] )) || _fwupdmgr_commands() { local -a commands=( 'activate:activate devices' 'block-firmware:blocks a specific firmware from being installed' 'clear-results:clears the results from the last update' 'device-emulate:emulate a device using a JSON manifest' 'device-test:test a device using a JSON manifest' 'disable-remote:disables a given remote' 'downgrade:downgrades the firmware on a device' 'emulation-load:load device emulation data' 'emulation-save:save device emulation data' 'emulation-tag:adds devices to watch for future emulation' 'emulation-untag:removes devices to watch for future emulation' 'enable-remote:enables a given remote' 'get-approved-firmware:gets the list of approved firmware' 'get-bios-settings:retrieve BIOS settings' 'get-blocked-firmware:gets the list of blocked firmware' 'get-details:gets details about a firmware file' 'get-devices:get all devices that support firmware updates' 'get-history:show history of firmware updates' 'get-plugins:get all enabled plugins registered with the system' 'get-releases:gets the releases for a device' 'get-remotes:gets the configured remotes' 'get-results:gets the results from the last update' 'get-topology:get all devices according to the system topology' 'get-updates:gets the list of updates for connected hardware' 'inhibit:inhibit the system to prevent upgrades' 'install:install a firmware file on this hardware' 'local-install:install a firmware file on this hardware' 'modify-config:modifies a daemon configuration value' 'modify-remote:modifies a given remote' 'quit:asks the daemon to quit' 'refresh:refresh metadata from remote server' 'security:gets the host security attributes' 'report-history:share firmware history with the developers' 'set-approved-firmware:sets the list of approved firmware' 'set-bios-setting:sets one or more BIOS settings' 'switch-branch:switch the firmware branch on device' 'sync-bkc:sync firmware versions to the host best known configuration ' 'unblock-firmware:unblocks a specific firmware from being installed' 'uninhibit:uninhibit the system to allow upgrades' 'unlock:unlocks the device for firmware access' 'update:updates all firmware to latest versions available' 'verify:gets the cryptographic hash of the dumped firmware' 'verify-update:update the stored metadata with current ROM contents' ) _describe -t commands commands commands } (( $+functions[_fwupdmgr_device_ids] )) || _fwupdmgr_device_ids() { # TODO add device name as description local -a devices devices=($(_call_program devices fwupdmgr get-devices | awk '/Device ID/||/DeviceId/{print $NF}')) _describe -t devices 'device ID' devices } (( $+functions[_fwupdmgr_remote_ids] )) || _fwupdmgr_remote_ids() { # TODO add remote description local -a remotes remotes=($(_call_program remotes fwupdmgr get-remotes | awk '/Remote ID/{print $NF}')) _describe -t remotes 'remote ID' remotes } _fwupdmgr "$@" # 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 ================================================ FILE: src/_gas ================================================ #compdef gas # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 gas (https://github.com/walle/gas). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Fredrik Wallgren # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line cmds ret=1 _arguments -C \ '(- 1 *)'{-v,--version}'[display version information]' \ '(-h --help)'{-h,--help}'[show help information]' \ '1: :->cmds' \ '*: :->args' && ret=0 case "$state" in (cmds) cmds=( "version:Prints Gas's version" "use:Uses author" "show:Shows your current user" "list:Lists your authors" "import:Imports current user to gasconfig" "help:Describe available tasks or one specific task" "delete:Deletes author" "add:Adds author to gasconfig" ) _describe -t commands 'gas command' cmds && ret=0 ;; (args) case "$line[1]" in (use|delete) _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0 ;; esac ;; esac return ret # 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 ================================================ FILE: src/_ghc ================================================ #compdef ghc ghci ghc-pkg # ------------------------------------------------------------------------------ # 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 ghc 9.10.3 (https://www.haskell.org/ghc/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Gérard Milmeister # * Philip Dexter # # ------------------------------------------------------------------------------ # # ghci # _ghc_ghci() { local -a ghci_flags=( "-fshow-loaded-modules[Show the names of modules that GHCi loaded after a :load command]" "-fprint-bind-result[Turn on printing of binding results in GHCi]" "-fimplicit-import-qualified[Put in scope qualified identifiers for every loaded module]" "-fno-it[No longer set the special variable it]" "-interactive-print[Select the function to use for printing evaluated expressions]:name" "-fbreak-points[Insert breakpoints in the GHCi debugger]" "-fprint-evld-with-show[Instruct :print to use Show instances where possible]" "-fghci-hist-size=[Set the number of entries GHCi keeps for :history]:size" "-fbreak-on-exception[Break on any exception thrown]" "-fbreak-on-error[Break on uncaught exceptions and errors]" "-flocal-ghci-history[Use current directory for the GHCi command history file]" "-fghci-leak-check[(Debugging only) check for space leaks when loading new modules in GHCi]" "-ignore-dot-ghci[Disable reading of .ghci files]" "-ghci-script[Read additional .ghci files]" "-fexternal-interpreter[Run interpreted code in a separate process]" "-XExtendedDefaultRules[Use GHCi's extended default rules in a normal module]" ) _arguments \ $ghci_flags[@] \ '*:: :_files' } # # ghc # _ghc_compiler() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/using.rst.txt local -a using_flags=( "--interactive[Interactive mode ]" "--run[Run a Haskell program]:file:_files" "--make[Build a multi-module Haskell program, automatically figuring out dependencies]" "-e[Evaluate the given expr]:expr" "-E[Stop after preprocessing]" "-C[Stop after generating C]" "-S[Stop after generating assembly]" "-c[Stop after generating object]" "--merge-objs[Merge a set of objects into a GHCi library]" "-M[generate dependency information suitable for use in a Makefile]" "--frontend[run GHC with the given frontend plugin]:plugin" "-shared[Create a shared object]" "(- *)--help[Display help]" "--show-iface[display the contents of an interface file]:file:_files -g '*.hi'" {--supported-extensions,--supported-languages}"[display the supported language extensions]" "--show-options[display the supported command line options]" "--info[display information about the compiler]" "--version[display GHC version]" "--numeric-version[display GHC version (numeric only)]" "--print-booter-version[display bootstrap compiler version]" "--print-build-platform[display platform on which GHC was built]" "--print-c-compiler-flags[C compiler flags used to build GHC]" "--print-c-compiler-link-flags[C linker flags used to build GHC]" "--print-debug-on[print whether GHC was built with -DDEBUG]" "--print-global-package-db[display GHC's global package database directory]" "--print-have-interpreter[display whether GHC was built with interactive support]" "--print-have-native-code-generator[display whether target platform has NCG support]" "--print-host-platform[display host platform of GHC]" "--print-leading-underscore[display use of leading underscores on symbol names]" "--print-libdir[display GHC library directory]" "--print-ld-flags[display linker flags used to compile GHC]" "--print-object-splitting-supported[display whether GHC supports object splitting]" "--print-project-git-commit-id[display Git commit id GHC is built from]" "--print-project-version[display GHC version]" "--print-rts-ways[display which way RTS was built]" "--print-stage[display stage number of GHC]" "--print-support-smp[display whether GHC was compiled with SMP support]" "--print-tables-next-to-code[display whether GHC was compiled with --enable-tables-next-to-code]" "--print-target-platform[display target platform of GHC]" "--print-unregisterised[display whether this GHC was built in unregisterised mode]" "-j[When compiling with --make, compile n modules in parallel]:num" "-jsem[When compiling with --make, coordinate with other processes through the semaphore]" "-unit[Specify the options to build a specific unit]:file:_files" "-working-dir[Specify the directory a unit is expected to be compiled in]:dir:_files -/" "-this-package-name[The name of the package which this module would be part of when installed]:unit_id" "-hidden-module[A module which should not be visible outside its unit]:module_name" "-reexported-module[A module which should be reexported from this unit]:module_name" "-x[Override default behaviour for source files]:suffix" "-v[Verbose mode equivalent to -v3]" "-v0[Disable all non-essential messages]" "-v1[Minimal verbosity]" "-v2[Print the name of each compilation phase]" "-v3[Same as -v2 except that in addition the full command line for each compilation phase]" "-v4[Same as -v3 except that intermediate program representation is also printed]" "-fprint-potential-instances[display all available instances in type error messages]" "-fhide-source-paths[hide module source and object paths]" "-fprint-unicode-syntax[Use unicode syntax when printing expressions, types and kinds]" "-fprint-explicit-foralls[Print explicit forall quantification in types]" "-fprint-explicit-kinds[Print explicit kind foralls and kind arguments in types]" "-fprint-explicit-coercions[Print coercions in types]" "-fprint-axiom-incomps[Display equation incompatibilities in closed type families]" "-fprint-equality-relations[Distinguish between equality relations when printing]" "-fprint-expanded-synonyms[In type errors, also print type-synonym-expanded types]" "-fprint-redundant-promotion-ticks[Print redundant DataKinds promotion ticks]" "-fprint-typechecker-elaboration[Print extra information from typechecker]" "-fdefer-diagnostics[Defer and group diagnostic messages by severity]" "-fdiagnostics-as-json[Output diagnostics in Json format specified by JSON schema]" "-fdiagnostics-color=⟨always|auto|never⟩[Use colors in error messages]" "-fdiagnostics-show-caret[Whether to show snippets of original source code]" "-fshow-error-context[Whether to show textual information about error context]" "-fprint-error-index-links=f[Whether to emit diagnostic codes as ANSI hyperlinks to the Haskell Error Index]:type:(always auto never)" "-ferror-spans[Output full span in error messages]" "-fkeep-going[Continue compilation as far as possible on errors]" "-freverse-errors[Output errors in reverse order]" "-Rghc-timing[Summarise timing stats for GHC]" "-mavx[(x86 only) Enable support for AVX SIMD extensions]" "-mavx2[(x86 only) Enable support for AVX2 SIMD extensions]" "-mavx512cd[(x86 only) Enable support for AVX512-CD SIMD extensions]" "-mavx512er[(x86 only) Enable support for AVX512-ER SIMD extensions]" "-mavx512f[(x86 only) Enable support for AVX512-F SIMD extensions]" "-mavx512pf[(x86 only) Enable support for AVX512-PF SIMD extensions]" "-msse[(x86 only) Use SSE for floating-point operations]" "-msse2[(x86 only) Use SSE2 for floating-point operations]" "-msse3[(x86 only) Use SSE3 for floating-point operations]" "-msse4[(x86 only) Use SSE4 for floating-point operations]" "-msse4.2[(x86 only) Use SSE4.2 for floating-point operations]" "-mbmi[(x86 only) Use BMI1 for bit manipulation operations]" "-mbmi2[(x86 only) Use BMI2 for bit manipulation operations]" "-mfma[Use native FMA instructions for fused multiply-add floating-point operations]" "-haddock[Parse Haddock comments and include them in the interface file it produces]" "-ghcversion-file ⟨path to ghcversion.h⟩[Use this ghcversion.h file]:version_file:_files" "-H[Set the minimum size of the heap to the given size]:size" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/debug-info.rst.txt local -a debug_info_flags=( "-g-[Produce DWARF debug information in compiled object files]:level:(0 1 2)" "-finfo-table-map[Embed a lookup table in the generated binary]" "-finfo-table-map-with-stack[Include info tables for STACK closures in the info table map]" "-fno-info-table-map-with-stack[Omit info tables for STACK closures from the info table map]" "-finfo-table-map-with-fallback[Include info tables with no source location information]" "-fno-info-table-map-with-fallback[Omit info tables with no source location information]" "-fdistinct-constructor-tables[Generate a fresh info table for each usage of a data constructor]" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/debugging.rst.txt local -a debugging_flags=( "-ddump-to-file[Dump to files instead of stdout]" "-ddump-file-prefix=[Set the prefix of the filenames used for debugging output]:prefix" "-fdump-with-ways[Include the tag of the enabled ways in the extension of dump files]" "-dshow-passes[Print out each pass name as it happens]" "-dipe-stats[Show statistics about IPE information]" "-dfaststring-stats[Show statistics for fast string usage when finished]" "-ddump-faststrings[Dump the whole FastString table when finished]" "-dppr-debug[Turn on debug printing (more verbose)]" "-ddump-timings[Dump per-pass timing and allocation statistics]" "-ddump-parsed[Dump parse tree]" "-ddump-parsed-ast[Dump parser output as a syntax tree]" "-dkeep-comments[Include comments in the parser]" "-ddump-if-trace[Trace interface files]" "-ddump-tc-trace[Trace typechecker]" "-ddump-rn-trace[Trace renamer]" "-ddump-ec-trace[Trace exhaustiveness checker]" "-ddump-cs-trace[Trace constraint solver]" "-ddump-rn-stats[Renamer stats]" "-ddump-rn[Dump renamer output]" "-ddump-rn-ast[Dump renamer output as a syntax tree]" "-ddump-tc[Dump typechecker output]" "-ddump-tc-ast[Dump typechecker output as a syntax tree]" "-ddump-hie[Dump the hie file syntax tree]" "-ddump-splices[Dump TH spliced expressions, and what they evaluate to]" "-dth-dec-file[Dump evaluated TH declarations into '*.th.hs' files]" "-ddump-types[Dump type signatures]" "-ddump-deriv[Dump deriving output]" "-ddump-call-arity[Dump output of the call arity analysis pass]" "-ddump-core-stats[Print a one-line summary of the size of the Core program]" "-ddump-ds[Dump desugarer output]" "-ddump-exitify[Dump output of the exitification pass]" "-ddump-simpl-iterations[Dump output from each simplifier iteration]" "-ddump-simpl-stats[Dump simplifier stats]" "-ddump-simpl-trace[Dump trace messages in simplifier]" "-dverbose-core2core[Show output from each core-to-core pass]" "-ddump-spec[Dump specialiser output]" "-ddump-spec-constr[Dump specialiser output from SpecConstr]" "-ddump-rules[Dump rewrite rules]" "-ddump-rule-firings[Dump rule firing info]" "-ddump-rule-rewrites[Dump detailed rule firing info]" "-drule-check=⟨str⟩[Dump information about potential rule application]" "-dinline-check=⟨str⟩[Dump information about inlining decisions]" "-ddump-simpl[Dump final simplifier output]" "-ddump-inlinings[Dump inlinings performed by the simplifier]" "-ddump-verbose-inlinings[Dump all considered inlinings]" "-ddump-dmdanal[Dump demand analysis output]" "-ddump-dmd-signatures[Dump top-level demand signatures]" "-ddump-cpranal[Dump CPR analysis output]" "-ddump-cpr-signatures[Dump CPR signatures]" "-ddump-cse[Dump CSE output]" "-ddump-full-laziness[Dump full laziness pass output]" "-ddump-float-in[Dump float in output]" "-ddump-liberate-case[Dump liberate case output]" "-ddump-static-argument-transformation[Dump static argument transformation output]" "-ddump-worker-wrapper[Dump worker-wrapper output]" "-ddump-occur-anal[Dump occurrence analysis output]" "-ddump-prep[Dump prepared core]" "-ddump-late-cc[Dump core with late cost centres added]" "-ddump-view-pattern-commoning[Dump commoned view patterns]" "-ddump-stg-from-core[Show CoreToStg output]" "-dverbose-stg2stg[Show output from each STG-to-STG pass]" "-ddump-stg-unarised[Show unarised STG]" "-ddump-stg-cg[Show output after Stg2Stg]" "-ddump-stg-tags[Show output of the tag inference pass.]" "-ddump-stg-final[Show output of last STG pass.]" "-ddump-cmm-verbose-by-proc[Show output from main C-\\- pipeline passes (grouped by proc)]" "-ddump-cmm-verbose[Write output from main C-\\- pipeline passes to files]" "-ddump-cmm-from-stg[Dump STG-to-C-\\- output]" "-ddump-cmm-raw[Dump raw C-\\-]" "-ddump-cmm-cfg[Dump the results of the C-\\- control flow optimisation pass]" "-ddump-cmm-thread-sanitizer[Dump the results of the C-\\- ThreadSanitizer elaboration pass]" "-ddump-cmm-cbe[Dump the results of common block elimination]" "-ddump-cmm-switch[Dump the results of switch lowering passes]" "-ddump-cmm-proc[Dump the results of proc-point analysis]" "-ddump-cmm-sp[Dump the results of the C-\\- stack layout pass]" "-ddump-cmm-sink[Dump the results of the C-\\- sinking pass]" "-ddump-cmm-caf[Dump the results of the C-\\- CAF analysis pass]" "-ddump-cmm-procmap[Dump the results of the C-\\- proc-point map pass]" "-ddump-cmm-split[Dump the results of the C-\\- proc-point splitting pass]" "-ddump-cmm-info[Dump the results of the C-\\- info table augmentation pass.]" "-ddump-cmm-cps[Dump the results of the CPS pass]" "-ddump-cmm[Dump the final C-\\- output]" "-ddump-cfg-weights[Dump the assumed weights of the CFG.]" "-ddump-llvm[Dump LLVM intermediate code.]" "-ddump-c-backend[Dump C code produced by the C (unregisterised) backend]" "-ddump-cmm-opt[Dump the results of C-\\- to C-\\- optimising passes]" "-ddump-opt-cmm[Dump the results of C-\\- to C-\\- optimising passes]" "-ddump-asm-conflicts[Dump register conflicts from the register allocator]" "-ddump-asm-native[Dump initial assembly]" "-ddump-asm-liveness[Dump assembly augmented with register liveness]" "-ddump-asm-regalloc[Dump the result of register allocation]" "-ddump-asm-regalloc-stages[Dump the build/spill stages of the register allocator]" "-ddump-asm-stats[Dump statistics from the register allocator]" "-ddump-asm[Dump final assembly]" "-ddump-js[Dump final JavaScript code]" "-ddisable-js-minifier[Generate pretty-printed JavaScript code instead of minified code]" "-ddisable-js-c-sources[Disable the link with C sources compiled to JavaScript]" "-ddump-bcos[Dump interpreter byte code]" "-ddump-debug[Dump generated DWARF debug information]" "-ddump-rtti[Trace runtime type inference]" "-ddump-foreign[Dump foreign export stubs]" "-ddump-ticked[Dump the code instrumented by HPC]" "-ddump-mod-map[Dump the state of the module mapping database]" "-dppr-user-length[Set the depth for printing expressions in error msgs]" "-dppr-cols=⟨n⟩[Set the width of debugging output]" "-dppr-case-as-let[Print single alternative case expressions as strict lets]" "-dhex-word-literals[Print values of type Word# in hexadecimal]" "-dno-debug-output[Suppress unsolicited debugging output]" "-dsuppress-all[In dumps, suppress everything (except for uniques) that is suppressible]" "-dsuppress-ticks[Suppress 'ticks' in the pretty-printer output]" "-dsuppress-uniques[Suppress the printing of uniques in debug output]" "-dsuppress-idinfo[Suppress extended information about identifiers where they are bound]" "-dsuppress-unfoldings[Suppress the printing of the stable unfolding of a variable]" "-dsuppress-module-prefixes[Suppress the printing of module qualification prefixes]" "-dsuppress-timestamps[Suppress timestamps in dumps]" "-dsuppress-type-signatures[Suppress type signatures]" "-dsuppress-type-applications[Suppress type applications]" "-dsuppress-coercions[Suppress the printing of coercions in Core dumps to make them shorter]" "-dsuppress-coercion-types[Suppress the printing of coercion types]" "-dsuppress-var-kinds[Suppress the printing of variable kinds]" "-dsuppress-stg-free-vars[Suppress the printing of closure free variable lists in STG output]" "-dsuppress-core-sizes[Suppress the printing of core size stats per binding]" "-dsuppress-stg-reps[Suppress rep annotations on STG args]" "-dlint[Enable several common internal sanity checkers]" "-dcore-lint[Turn on internal sanity checking]" "-dlinear-core-lint[Turn on internal sanity checking]" "-dstg-lint[STG pass sanity checking]" "-dcmm-lint[C-\\- pass sanity checking]" "-dasm-lint[ASM pass sanity checking]" "-fllvm-fill-undef-with-garbage[Intruct LLVM to fill dead STG registers with garbage]" "-falignment-sanitisation[Compile with alignment checks for all info table dereferences]" "-fproc-alignment[Align functions at given boundary]" "-fcatch-nonexhaustive-cases[Add a default error alternative to case expressions]" "-forig-thunk-info[Generate stg_orig_thunk_info stack frames on thunk entry]" "-fcheck-prim-bounds[Instrument array primops with bounds checks]" "-fcmm-thread-sanitizer[Enable ThreadSanitizer instrumentation of memory accesses]" "-dinitial-unique=[Start UniqSupply allocation]:supply" "-dunique-increment=[Set the increment for the generated Unique's]:i" "-dno-typeable-binds[Don't generate bindings for Typeable methods]" "-dtag-inference-checks[Affirm tag inference results are correct at runtime]" "-funoptimized-core-for-interpreter[Disable optimizations with the interpreter]" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/packages.rst.txt local -a packages_flags=( "*-package[Expose package]:_ghc_pkg_list_packages" "*-package-id[Expose package by id]:id" "-hide-all-packages[Hide all packages by default]" "*-hide-package[Hide package]:package:_ghc_pkg_list_packages" "*-ignore-package[Ignore package]:package:_ghc_pkg_list_packages" "-no-auto-link-packages[Don't automatically link in the base and rts packages]" "-this-unit-id[Compile to be part of unit]:id" "*-trust[Expose package and set it to be trusted]:package:_ghc_pkg_list_packages" "*-distrust[Expose package and set it to be distrusted]:package:_ghc_pkg_list_packages" "-distrust-all-packages[Distrust all packages by default]" "-package-db[Add file to the package db stack]:file:_files" "-no-global-package-db[Remove the global package db from the stack]" "-no-user-package-db[Remove the user's package db from the stack]" "-clear-package-db[Clear the package db stack]" "-global-package-db[Add the global package db to the stack]" "-user-package-db[Add the user's package db to the stack]" "-package-env[Use the specified package environment]:file:_files" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/phases.rst.txt local -a phases_flags=( "-pgmL[Literate pre-processor command]:cmd" "-pgmP[C pre-processor command]:cmd" "-pgmJSP[JavaScript C-pre-processor command]:cmd" "-pgmCmmP[C-- C pre-processor command]:cmd" "-pgmc[C compilercommand]:cmd" "-pgmcxx[C++ compiler command]:cmd" "-pgmlo[LLVM optimiser command]:cmd" "-pgmlc[LLVM compiler command]:cmd" "-pgmlas[LLVM assembler command]:cmd" "-pgms[splitter command]:cmd" "-pgma[assembler command]:cmd" "-pgml[linker command]:cmd" "-pgmlm[linker command when merging object files]:cmd" "-pgmF[pre-processor command when -F is specified]:cmd" "-pgmotool[inspect mach-o dylibs command]:cmd" "-pgminstall_name_tool[command to inject runpath into mach-o dylibs on macOS]:command" "-pgmwindres[command for embedding manifests on Windows]:command" "-pgmi[external interpreter command]:command" "-optL[literate pre-processor options]:options" "-optP[cpp options]:options" "-optJSP[JavaScript C pre-processor options]:options" "-optCmmP[C-- C pre-processor options]:options" "-optF[custom pre-processor options]:options" "-optc[C compiler options]:options" "-pgml-supports-no-pie[Indicate that the linker supports -no-pie]" "-optcxx[C++ compiler options]:options" "-optlo[LLVM optimiser options]:options" "-optlc[LLVM compiler options]:options" "-optlas[LLVM assembler options]:options" "-opta[assembler options]:options" "-optl[linker options]:options" "-optlmption⟩[linker options when merging object files]:options" "-optwindres[windres options]:options" "-opti[options of the interpreter sub-process]:options" "-cpp[Run the C pre-processor on Haskell source files]" "*-D[Define a symbol in the C pre-processor]:symbol" "*-U[Undefine a symbol in the C pre-processor]:symbol" "*-I[Directories for #include files]:dir:_files -/" "-F[Enable the use of a pre-processor]" "-fasm[Use the native code generator]" "-fllvm[Compile using the LLVM code generator]" "-fno-code[Omit code generation]" "-fwrite-interface[Always write interface files]" "-fwrite-if-simplified-core[Write an interface file containing the simplified core of the module]" "-fobject-code[Generate object code]" "-fbyte-code[Generate byte-code]" "-fbyte-code-and-object-code[Generate object code and byte-code]" "-fPIC[Generate position-independent code (where available)]" "-fexternal-dynamic-refs[Generate code for linking against dynamic libraries]" "-fPIE[Generate code for a position-independent executable (where available)]" "-dynamic[Build dynamically-linked object files and executables]" "-dynamic-too[Build dynamic object files *as well as* static object files during compilation]" "-fexpose-internal-symbols[Produce symbols for all functions, including internal functions]" "-fprefer-byte-code[Use byte-code if it is available to evaluate TH splices]" "*-l[Link in library]:lib:->library" "-c[Stop after generating object file]" "-framework[Link in the framework]:name" "-staticlib[Generate a standalone static library]" "*-L[Directories for searching libraries]:dir:_files -/" "-fuse-rpaths[Set the rpath based on -L flags]" "*-framework-path ⟨dir⟩[Directories searched for frameworks on Darwin/OS X/iOS]:dir:_files -/" "-fsplit-sections[Split sections for link-time dead-code stripping]" "-static[Use static Haskell libraries]" "-dynamic[Build dynamically-linked object files and executables]" "-shared[Generate a shared library (as opposed to an executable)]" "-dynload[Selects one of a number of modes for finding shared libraries at runtime]" "-flink-rts[Link the runtime when generating a shared or static library]" "-main-is[Set main module and function]:thing" "-no-hs-main[Don't assume this program contains main]" "-debug[Use the debugging runtime]" "-threaded[Use the threaded runtime]" "-single-threaded[Use the single-threaded runtime]" "-eventlog[Enable runtime event tracing]" "-rtsopts=[Control whether the RTS behaviour]:flag:(none some all ignore ignoreAll)" "-with-rtsopts=[Default RTS options]:options" "-no-rtsopts-suggestions[Don't print RTS suggestions about linking with]" "-fno-gen-manifest[Do not generate a manifest file (Windows only)]" "-fno-embed-manifest[Do not embed the manifest in the executable (Windows only)]" "-fno-shared-implib[Don't generate an import library for a DLL (Windows only)]" "-dylib-install-name[Set the install name]:name:_files" "-rdynamic[add all symbols, not only used ones, to the dynamic symbol table]" "-fwhole-archive-hs-libs[Inserts the flag '-Wl,--whole-archive' before any -l flags]" "-pie[Instruct the linker to produce a position-independent executable]" "-no-pie[Don't instruct the linker to produce a position-independent executable]" "-fkeep-cafs[Do not garbage-collect CAFs (top-level expressions) at runtime]" "-fcompact-unwind[Instruct the linker to produce a __compact_unwind section.]" ) local -a profiling_flags=( "-prof[Turn on profiling]" "-fno-prof-count-entries[Do not collect entry counts]" "-fprof-callers=[Auto-add SCCs to all call-sites of the named function]:name" "-fprof-auto[Auto-add SCCs to all bindings not marked INLINE]" "-fprof-auto-top[Auto-add SCCs to all top-level bindings not marked INLINE]" "-fprof-auto-exported[Auto-add SCCs to all exported bindings not marked INLINE]" "-fprof-auto-calls[Auto-add SCCs to all call sites]" "-fprof-late[Auto-add SCCs to all top level bindings *after* the core pipeline has run]" "-fprof-late-inline[Auto-add SCCs to all top level bindings *after* the optimizer has run and retain them when inlining]" "-fprof-late-overloaded[Auto-add SCCs to all top level overloaded bindings *after* the core pipeline has run]" "-fprof-late-overloaded-calls[Auto-add SCCs to all call sites that include dictionary arguments *after* the core pipeline has run]" "-fprof-cafs[Auto-add SCCs to all CAFs]" "-fprof-manual[Process manual 'SCC' annotations]" "-fhpc[Turn on Haskell program coverage instrumentation]" "-hpcdir=[Set the directory where GHC places '.mix' files]:dir:_files -/" "-ticky[Turn on ticky-ticky profiling]" "-ticky-allocd[Track the number of times each closure type is allocated]" "-ticky-dyn-thunk[Track allocations of dynamic thunks]" "-ticky-LNE[Treat join point binders similar to thunks/functions]" "-ticky-tag-checks[Emit dummy ticky counters to record how many tag-inference checks tag inference avoided]" "-ticky-ap-thunk[Don't use standard AP thunks on order to get more reliable entry counters]" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/separate_compilation.rst.txt local -a separate_compilation_flags=( "*-i-[import path directories]:dir:->ghc_include_directory" "-o[set output filename]:file:_files" "-dyno[set dynamic output filename]:file:_files" "-odir[set directory for object files]:dir:_files -/" "-ohi[set the filename in which to put the interface]:file:_files" "-dynohi[set the filename in which to put the dynamic interface]:file:_files" "-hidir[set directory for interface files]:dir:_files -/" "-hiedir[set directory for extended interface files]:dir:_files -/" "-stubdir[redirect FFI stub files]:dir:_files -/" "-dumpdir[redirect dump files]:dir:_files -/" "-outputdir[set output directory]:dir:_files -/" "-osuf[set the output file suffix]:suffix" "-dynosuf[set the dynamic output file suffix]:suffix" "-hisuf[set the suffix to use for interface files]:suffix" "-dynhisuf[set the suffix to use for dynamic interface files]:suffix" "-hiesuf[set the suffix to use for extended interface files]:suffix" "-hcsuf[set the suffix to use for intermediate C files]:suffix" "-keep-hc-file[Retain intermediate .hc files]" "-keep-hi-files[Retain intermediate .hi files]" "-keep-hscpp-file[Retain intermediate .hscpp files]" "-keep-llvm-file[Retain intermediate LLVM .ll files]" "-keep-o-files[Retain intermediate .o files]" "-keep-s-file[Retain intermediate .s files]" "-keep-tmp-files[Retain all intermediate temporary files]" "-tmpdir[set the directory for temporary files]:dir:_files -/" "-ddump-hi[Dump the new interface to stdout]" "-ddump-hi-diffs[Show the differences vs. the old interface]" "-ddump-minimal-imports[Dump a minimal set of imports]" "--show-iface[interface file]:file:_files" "-fwrite-ide-info[Write out extended interface files]" "-fvalidate-ide-info[Perform some sanity checks on the extended interface files]" "-fforce-recomp[Turn off recompilation checking]" "-fignore-optim-changes[Do not recompile modules just to match changes to optimisation flags]" "-fignore-hpc-changes[Do not recompile modules just to match changes to HPC flags]" "-ddump-mod-cycles[Dump module cycles]" "-dep-makefile[Makefile path]:file:_files" "-dep-suffix[Make dependencies that declare that files with suffix]:suffix" "-exclude-module=[exclude module]:file:_files" "-include-pkg-deps[Regard modules imported from packages as unstable]" "-include-cpp-deps[Include preprocessor dependencies]" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/using-concurrent.rst.txt local -a concurrent_flags=( "-feager-blackholing[Turn on eager blackholing]" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/using-optimisation.rst.txt local -a optimization_flags=( "-O-[Set optimization level]:num:(0 1 2)" "-fcore-constant-folding[Enable constant folding in Core]" "-fcase-merge[Enable case-merging]" "-fcase-folding[Enable constant folding in case expressions]" "-fcall-arity[Enable call-arity optimisation]" "-fexitification[Enables exitification optimisation]" "-fcmm-elim-common-blocks[Enable Cmm common block elimination]" "-fcmm-sink[Enable Cmm sinking]" "-fcmm-static-pred[Enable static control flow prediction]" "-fcmm-control-flow[Enable control flow optimisation in the Cmm backend]" "-fasm-shortcutting[Enable shortcutting on assembly]" "-fblock-layout-cfg[Use the new cfg based block layout algorithm]" "-fblock-layout-weights[Sets edge weights used by the new code layout algorithm]" "-fblock-layout-weightless[Ignore cfg weights for code layout]" "-fcpr-anal[Turn on Constructed Product Result analysis]" "-fcse[Enable common sub-expression elimination]" "-fstg-cse[Enable common sub-expression elimination on the STG]" "-fspec-eval[Enables speculative evaluation]" "-fspec-eval-dictfun[Enables speculative evaluation of dictionary functions]" "-fdicts-cheap[Make dictionary-valued expressions seem cheap to the optimiser]" "-fdicts-strict[Make dictionaries strict]" "-fdo-eta-reduction[Enable eta-reduction]" "-fdo-lambda-eta-expansion[Enable lambda eta-expansion]" "-fdo-clever-arg-eta-expansion[Enable sophisticated argument eta-expansion]" "-feager-blackholing[Turn on eager blackholing]" "-fexcess-precision[Enable excess intermediate precision]" "-fexpose-all-unfoldings[Expose all unfoldings, even for very large or recursive functions]" "-ffloat-in[Turn on the float-in transformation]" "-ffull-laziness[Turn on full laziness (floating bindings outwards)]" "-fignore-asserts[Ignore assertions in the source]" "-fignore-interface-pragmas[Ignore pragmas in interface files]" "-fkeep-auto-rules[Keep all 'auto' rules, generated by specialisation]" "-flate-dmd-anal[Run demand analysis again]" "-fliberate-case[Turn on the liberate-case transformation]" "-fliberate-case-threshold=[Set the size threshold for the liberate-case]:threshold" "-floopification[Turn saturated self-recursive tail-calls into local jumps in the generated assmbly]" "-fmax-inline-alloc-size=[Set the maximum size of inline array allocations]:size" "-fmax-inline-memcpy-insns=[Inline 'memcpy' calls if they would generate no more than 'n' insns]:insns" "-fmax-inline-memset-insns=[Inline 'memset' calls if they would generate no more than 'n' insns]:insns" "-fmax-relevant-binds=[Set the maximum number of bindings to display in type error messages]:num" "-fmax-uncovered-patterns=[Set the maximum number of patterns to display in warnings about non-exhaustive ones]:nums" "-fmax-simplifier-iterations=[Set the max iterations for the simplifier]:num" "-flocal-float-out[Enable local floating definitions out of let-binds]" "-flocal-float-out-top-level[Enable local floating to float top-level bindings]" "-fmax-worker-args=[Maximum number of value arguments for a worker]:workers" "-fno-opt-coercion[Turn off the coercion optimiser]" "-fno-pre-inlining[Turn off pre-inlining]" "-fno-state-hack[Turn off the 'state hack' whereby any lambda with a real-world]" "-fomit-interface-pragmas[Don't generate interface pragmas]" "-fomit-yields[Omit heap checks when no allocation is being performed]" "-fpedantic-bottoms[Make GHC be more precise about its treatment of bottom]" "-fregs-graph[Use the graph colouring register allocator for register]" "-fregs-iterative[Use the iterative coalescing graph colouring register allocator]" "-fsimplifier-phases=[Set the number of phases for the simplifier]:phases" "-fsimpl-tick-factor=[Set the percentage factor for simplifier ticks]:factor" "-fdmd-unbox-width=[Boxity analysis pretends that returned records with this many fields can be unboxed]:width" "-fspec-constr[Turn on the SpecConstr transformation]" "-fspec-constr-keen[Specialize a call with an explicit constructor argument]" "-fspec-constr-count=[Set to ⟨n⟩ the maximum number of specialisations created by the SpecConstr transformation]:count" "-fspec-constr-threshold=[Set the size threshold for the SpecConstr]:threshold" "-fspecialise[Turn on specialisation of overloaded functions]" "-fspecialise-aggressively[Turn on specialisation of overloaded functions regardless of size]" "-fcross-module-specialise[Turn on specialisation of overloaded functions imported from other modules]" "-fpolymorphic-specialisation[Allow specialisation to abstract over free type variables]" "-flate-specialise[Run a late specialisation pass]" "-fspecialise-incoherents[Enable specialisation on incoherent instances]" "-finline-generics[Annotate methods of derived Generic and Generic1 instances with inline pragmas]" "-finline-generics-aggressively[Annotate methods of all derived Generic and Generic1 instances with inline pragmas]" "-fsolve-constant-dicts[When solving constraints, try to eagerly solve super classes]" "-fstatic-argument-transformation[Turn on the static argument transformation]" "-fstg-lift-lams[Enable late lambda lifting on the STG intermediate]" "-fstg-lift-lams-known[Allow turning known into unknown calls while performing]" "-fstg-lift-lams-non-rec-args=[Create top-level non-recursive functions with at most parameters]:num" "-fstg-lift-lams-rec-args=[Create top-level recursive functions with at most parameters]:num" "-fstrictness[Turn on demand analysis]" "-fstrictness-before=[Run an additional demand analysis before simplifier phase ⟨n⟩ parameters]" "-funbox-small-strict-fields[Flatten strict constructor fields with a pointer-sized]" "-funbox-strict-fields[Flatten strict constructor fields]" "-funfolding-creation-threshold=[Tweak unfolding settings]:threshold" "-funfolding-dict-discount=[Tweak unfolding settings]:num" "-funfolding-fun-discount=[Tweak unfolding settings]:num" "-funfolding-use-threshold=[Tweak unfolding settings]:threshold" "-funfolding-case-threshold=[Reduce inlining for cases nested deeper than n]:threshold" "-funfolding-case-scaling=[Apply a penalty of (inlining_cost * '1/n') for each level of case nesting]:penalty" "-fworker-wrapper[Enable the worker/wrapper transformation]" "-fworker-wrapper-cbv[Enable w/w splits for wrappers whos sole purpose is evaluating arguments]" "-fbinary-blob-threshold=[Tweak assembly generator for binary blobs]:size" ) # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/packages-warnings.rst.txt local -a warnings_flags=( "-Wdefault[enable default flags]" "-W[enable normal warnings]" "-Wall[enable almost all warnings]" "-Weverything[enable all warnings supported by GHC]" "-Wcompat[enable future compatibility warnings]" "-w[disable all warnings]" "-fshow-warning-groups[show which group an emitted warning belongs to]" "*-Werror=-[make warnings fatal]:flag" "*-Wwarn=-[make warnings non-fatal]:flag" "*-Wno-error=[make a specific warning non-fatal]:flag" "-Wunrecognised-warning-flags[throw a warning when an unrecognised -W... flag]" "-Wcompat-unqualified-imports[Report unqualified imports of core libraries]" "-Wprepositive-qualified-module[Report imports with a leading/prepositive 'qualified']" "-Wtyped-holes[Report warnings when errors are]" "-Wdeferred-type-errors[Report warnings when deferred type errors are enabled]" "-Wdeferred-out-of-scope-variables[Report warnings when variable out-of-scope errors are]" "-Wpartial-type-signatures[warn about holes in partial type signatures when]" "-fhelpful-errors[Make suggestions for mis-spelled names.]" "-Wunrecognised-pragmas[warn about uses of pragmas that GHC doesn't recognise]" "-Wmisplaced-pragmas[warn about uses of file header pragmas in the module body]" "-Wmissed-specialisations[warn when specialisation of an imported, overloaded function fails.]" "-Wall-missed-specialisations[warn when specialisation of any overloaded function fails.]" "-Wextended-warnings[warn about uses of functions & types that have WARNING or DEPRECATED pragmas]" ## TODO # "-Wx-[warn about uses of functions & types that have WARNING pragmas with the given category]:category" "-Wdeprecations[warn about uses of functions & types that have DEPRECATED pragmas]" "-Wwarnings-deprecations[warn about uses of functions & types that have DEPRECATED pragmas]" "-Wnoncanonical-monad-instances[warn when Applicative or Monad instances have noncanonical definitions]" "-Wnoncanonical-monoid-instances[warn when Semigroup or Monfoid instances have noncanonical definitions]" "-Wdeprecated-flags[warn about uses of commandline flags that are deprecated]" "-Wunsupported-calling-conventions[warn about use of an unsupported calling convention]" "-Wdodgy-foreign-imports[warn about dodgy foreign imports]" "-Wdodgy-exports[warn about dodgy exports]" "-Wdodgy-imports[warn about dodgy imports]" "-Woverflowed-literals[warn about literals that will overflow their type]" "-Wempty-enumerations[warn about enumerations that are empty]" "-Wderiving-defaults[warn about default deriving when using both]" "-Wduplicate-constraints[warn when a constraint appears duplicated in a type signature]" "-Wredundant-constraints[Have the compiler warn about redundant constraints in type signatures.]" "-Wduplicate-exports[warn when an entity is exported multiple times]" "-Widentities[warn about uses of Prelude numeric conversions that are probably the identity (and hence could be omitted)]" "-Wimplicit-lift[warn about implicit lift in Template Haskell quotes]" "-Wimplicit-prelude[warn when the Prelude is implicitly imported]" "-Wincomplete-patterns[warn when a pattern match could fail]" "-Wincomplete-uni-patterns[warn when a pattern match in a lambda expression]" "-fmax-pmcheck-models=[soft limit on the number of parallel models]:models" "-Wincomplete-record-updates[warn when a record update could fail]" "-Wincomplete-record-selectors[warn when a record selector application could fail]" "-Wmissing-deriving-strategies[warn when a deriving clause is missing a deriving strategy]" "-Wmissing-fields[warn when fields of a record are uninitialised]" "-Wmissing-export-lists[warn when a module declaration does not explicitly list all exports]" "-Wmissing-import-lists[warn when an import declaration does not explicitly list all the names brought into scope]" "-Wmissing-methods[warn when class methods are undefined]" "-Wmissing-signatures[warn about top-level functions without signatures]" "-Wmissing-exported-signatures[warn about top-level functions without signatures]" "-Wmissing-local-signatures[warn about polymorphic local bindings without signatures]" "-Wmissing-pattern-synonym-signatures[warn when pattern synonyms do not have type signatures]" "-Wmissing-kind-signatures[warn when type declarations don't have kind signatures nor CUSKs]" "-Wmissing-poly-kind-signatures[warn when inferred polykinded type or class declaration don't have kind signatures nor CUSKs]" "-Wmissing-exported-pattern-synonym-signatures[warn about pattern synonyms without signatures, only if they are exported]" "-Wname-shadowing[warn when names are shadowed]" "-Worphans[warn when the module contains orphan instance declarations or rewrite rules]" "-Woverlapping-patterns[warn about overlapping patterns]" "-Winaccessible-code[warn about inaccessible code]" "-Wstar-is-type[warn when * is used to mean Data.Kind.Type]" "-Wstar-binder[warn about binding the (*) type operator despite]" "-Wsimplifiable-class-constraints[Warn about class constraints in a type signature that can be simplified using a top-level instance declaration]" "-Wtabs[warn if there are tabs in the source file]" "-Wtype-defaults[warn when defaulting happens]" "-Wmonomorphism-restriction[warn when the Monomorphism Restriction is applied]" "-Wunsupported-llvm-version[Warn when using -fllvm with an unsupported version of LLVM]" "-Wmissed-extra-shared-lib[Warn when GHCi can't load a shared li.]" "-Wunticked-promoted-constructors[warn if promoted constructors are not ticked]" "-Wunused-binds[warn about bindings that are unused. Alias for]" "-Wunused-top-binds[warn about top-level bindings that are unused]" "-Wunused-local-binds[warn about local bindings that are unused]" "-Wunused-pattern-binds[warn about pattern match bindings that are unused]" "-Wunused-imports[warn about unnecessary imports]" "-Wunused-matches[warn about variables in patterns that aren't used]" "-Wunused-do-bind[warn about do bindings that appear to throw away values of types other than ()]" "-Wunused-type-patterns[warn about unused type variables which arise from patterns in in type family and data family instances]" "-Wunused-foralls[warn about type variables in user-written forall that are unused]" "-Wunused-record-wildcards[Warn about record wildcard matches when none of the bound variables are used.]" "-Wredundant-bang-patterns[Warn about redundant bang patterns]" "-Wredundant-record-wildcards[Warn about record wildcard matches when the wildcard binds no patterns]" "-Wredundant-strictness-flags[Warn about redundant strictness flags]" "-Wwrong-do-bind[warn about do bindings that appear to throw away monadic values]" "-Winline-rule-shadowing[Warn if a rewrite RULE might fail to fire]" "-Wcpp-undef[warn on uses of the #if directive on undefined identifiers]" "-Wunbanged-strict-patterns[warn on pattern bind of unlifted variable]" "-Wmissing-home-modules[warn when encountering a home module imported]" "-Wpartial-fields[warn when defining a partial record field]" "-Wunused-packages[warn when package is requested on command line, but not needed]" "-Winvalid-haddock[warn when a Haddock comment occurs in an invalid position]" "-Woperator-whitespace-ext-conflict[warn on uses of infix operators that would be parsed differently]" "-Woperator-whitespace[warn on prefix, suffix, and tight infix uses of infix operators]" "-Wderiving-typeable[warn when Typeable is derived]" "-Wambiguous-fields[warn about ambiguous field selectors or updates]" "-Wunicode-bidirectional-format-characters[warn about the usage of unicode bidirectional layout override characters]" "-Wgadt-mono-local-binds[warn when pattern matching on a GADT without MonoLocalBinds]" "-Wtype-equality-out-of-scope[warn when type equality a ~ b is used despite being out of scope]" "-Wtype-equality-requires-operators[warn when type equality a ~ b is used despite being out of scope]" "-Wloopy-superclass-solve[*(deprecated)* warn when creating potentially-loopy superclass constraint evidence]" "-Wterm-variable-capture[warn when an implicitly quantified type variable captures a term's name]" "-Wmissing-role-annotations[warn when type declarations don't have role annotations]" "-Wimplicit-rhs-quantification[warn when type variables on the RHS of a type synonym are implicitly quantified]" "-Wdeprecated-type-abstractions[warn when type abstractions in constructor patterns are used without enabling TypeApplications]" "-Wincomplete-export-warnings[warn when some but not all of exports for a name are warned about]" "-Wbadly-staged-types[warn when type binding is used at the wrong TH stage.]" "-Winconsistent-flags[warn when command line options are inconsistent in some way.]" "-Wdata-kinds-tc[warn when an illegal use of a type or kind without]" "-Wdefaulted-exception-context[warn when an Control.Exception.Context.ExceptionContext implicit parameter is defaulted to]" ) local -a extension_flags=( "-XCPP[Enable the C Preprocessor]" "-XAllowAmbiguousTypes[Allow the user to write ambiguous types]" "-XApplicativeDo[Enable Applicative do-notation desugaring]" "-XArrows[Enable arrow notation extension]" "-XBinaryLiterals[Enable support for binary literals]" "-XBlockArguments[Allow do blocks and other constructs as function arguments.]" "-XConstrainedClassMethods[Enable constrained class methods]" "-XConstraintKinds[Enable a kind of constraints]" "-XGHC2024[Use GHC's set of default language extensions from 2024]" "-XGHC2021[Use GHC's set of default language extensions from 2021]" "-XHaskell2010[Use the Haskell 2010 language edition]" "-XDataKinds[Enable datatype promotion]" "-XListTuplePuns[Enable punning for list, tuple and sum types]" "-XDatatypeContexts[Allow contexts on data types]" "-XDefaultSignatures[Enable default signatures.]" "-XDeriveAnyClass[Enable deriving for any class.]" "-XDeriveFunctor[Enable deriving for the Functor class]" "-XDeriveFoldable[Enable deriving for the Foldable class]" "-XDeriveTraversable[Enable deriving for the Traversable class]" "-XDeriveDataTypeable[Enable deriving for the Data class]" "-XDeriveLift[Enable deriving for the Lift class]" "-XDerivingStrategies[Enables deriving strategies.]" "-XDerivingVia[Enable deriving instances via types of the same runtime representation]" "-XDisambiguateRecordFields[Enable record field disambiguation]" "-XDuplicateRecordFields[Allow definition of record types with identically-named fields]" "-XEmptyCase[Allow empty case alternatives]" "-XEmptyDataDeriving[Allow deriving instances of standard type classes for empty data types]" "-XExistentialQuantification[Enable liberalised type synonyms]" "-XExplicitForAll[Enable explicit universal quantification]" "-XExplicitNamespaces[Enable using the keyword type to specify the namespace of entries in imports and exports]" "-XExtendedLiterals[Enable numeric literal postfix syntax for unboxed integers]" "-XForeignFunctionInterface[Enable foreign function interface]" "-XUnliftedFFITypes[Enable unlifted FFI types]" "-XGHCForeignImportPrim[Enable prim calling convention. Intended for internal use only]" "-XInterruptibleFFI[Enable interruptible FFI]" "-XCApiFFI[Enable the CAPI calling convention]" "-XFieldSelectors[Control visibility of field selector functions]" "-XFlexibleContexts[Remove some restrictions on class contexts]" "-XFunctionalDependencies[Enable functional dependencies]" "-XGADTs[Enable generalised algebraic data types]" "-XGADTSyntax[Enable generalised algebraic data type syntax]" "-XTransformListComp[Enable generalised list comprehensions]" "-XDeriveGeneric[Enable deriving for the Generic class]" "-XHexFloatLiterals[Enable support for hexadecimal floating point literals]" "-XImplicitParams[Enable Implicit Parameters]" "-XImportQualifiedPost[ImportQualifiedPost allows the syntax import M qualified]" "-XImpredicativeTypes[Enable impredicative types]" "-XTypeSynonymInstances[Enable type synonyms in instance heads]" "-XFlexibleInstances[Enable flexible instances]" "-XUndecidableInstances[Enable undecidable instances]" "-XOverlappingInstances[Enable overlapping instances]" "-XIncoherentInstances[Enable incoherent instances]" "-XInstanceSigs[Enable instance signatures]" "-XKindSignatures[Enable kind signatures]" "-XLambdaCase[Enable lambda-case expressions]" "-XMonoLocalBinds[Enable do not generalise local bindings]" "-XLexicalNegation[Use whitespace to determine whether the minus sign stands for negation or subtraction]" "-XLiberalTypeSynonyms[Enable liberalised type synonyms]" "-XLinearTypes[Enable linear types]" "-XMagicHash[Allow '#' as a postfix modifier on identifiers]" "-XMonadComprehensions[Enable monad comprehensions]" "-XNoMonomorphismRestriction[Disable the monomorphism restriction]" "-XMultiParamTypeClasses[Enable multi parameter type classes]" "-XMultiWayIf[Enable multi-way if-expressions]" "-XNegativeLiterals[Enable support for negative literals]" "-XGeneralisedNewtypeDeriving[Enable newtype deriving]" "-XNPlusKPatterns[Enable support for n+k patterns]" "-XEmptyDataDecls[Allow definition of empty data types]" "-XNumDecimals[Enable support for 'fractional' integer literals]" "-XNumericUnderscores[Enable support for numeric underscores]" "-XOverloadedLabels[Enable overloaded labels]" "-XOverloadedLists[Enable overloaded lists]" "-XOverloadedRecordDot[Record '.' syntax]" "-XOverloadedRecordUpdate[Record '.' syntax record updates]" "-XOverloadedStrings[Enable overloaded string literals]" "-XPackageImports[Enable package-qualified imports]" "-XParallelListComp[Enable parallel list comprehensions]" "-XPartialTypeSignatures[Enable partial type signatures]" "-XNamedWildCards[Enable named wildcards.]" "-XNoPatternGuards[Disable pattern guards]" "-XPatternSynonyms[Enable pattern synonyms]" "-XTypeInType[Deprecated. Enable kind polymorphism and datatype promotion]" "-XPolyKinds[Enable kind polymorphism]" "-XCUSKs[Enable detection of complete user-supplied kind signatures]" "-XStandaloneKindSignatures[Allow the use of standalone kind signatures]" "-XStarIsType[Treat '*' as Data.Kind.Type]" "-XUnboxedTuples[Enable the use of unboxed tuple syntax]" "-XUnboxedSums[Enable unboxed sums]" "-XUnliftedNewtypes[Enable unlifted newtypes]" "-XUnliftedDatatypes[Enable unlifted data types]" "-XQualifiedDo[Enable qualified do-notation desugaring]" "-XQuantifiedConstraints[Allow forall quantifiers in constraints]" "-XRankNTypes[Enable rank-N types]" "-XRank2Types[Enable rank-2 types]" "-XDeepSubsumption[Enable deep subsumption]" "-XNoImplicitPrelude[Don't implicitly import Prelude]" "-XRebindableSyntax[Employ rebindable syntax]" "-XPostfixOperators[Enable postfix operators]" "-XNamedFieldPuns[Enable record puns]" "-XRecordWildCards[Enable record wildcards]" "-XRecursiveDo[Enable recursive do (mdo) notation]" "-XRequiredTypeArguments[Enable required type arguments in terms]" "-XRoleAnnotations[Enable role annotations]" "-XSafe[Enable the Safe mode]" "-XTrustworthy[Enable the Trustworthy mode]" "-XUnsafe[Enable Unsafe mode.]" "-XScopedTypeVariables[Enable lexically-scoped type variables]" "-XStandaloneDeriving[Enable standalone deriving]" "-XStaticPointers[Enable static pointers]" "-XBangPatterns[Enable bang patterns]" "-XStrictData[Enable default strict datatype fields]" "-XStrict[Make bindings in the current module strict by default]" "-XTemplateHaskell[Enable Template Haskell]" "-XTemplateHaskellQuotes[Enable quotation subset of Template Haskell]" "-XQuasiQuotes[Enable quasiquotation]" "-XNoTraditionalRecordSyntax[Disable support for traditional record syntax]" "-XTupleSections[Enable tuple sections]" "-XTypeAbstractions[Enable type abstraction syntax in patterns and type variable binders]" "-XTypeApplications[Enable type application syntax in terms and types]" "-XTypeData[Enable type data declarations]" "-XTypeFamilies[Enable type families]" "-XTypeFamilyDependencies[Enable injective type families]" "-XTypeOperators[Enable type operators]" "-XUndecidableSuperClasses[Allow all superclass constraints]" "-XUnicodeSyntax[Enable unicode syntax]" "-XViewPatterns[Enable view patterns]" ) _arguments \ $using_flags[@] \ $debug_info_flags[@] \ $debugging_flags[@] \ $package_flags[@] \ $phases_flags[@] \ $profiling_flags[@] \ $separate_compilation_flags[@] \ $concurrent_flags[@] \ $optimization_flags[@] \ $warnings_flags[@] \ $extension_flags[@] \ "*:: :_files" \ && ret=0 case $state in (ghc_include_directory) _ghc_include_directory && ret=0 ;; (library) _wanted libraries expl library \ compadd - \ ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) \ && ret=0 ;; esac return ret } _ghc_include_directory() { compset -P '*:' compset -S ':*' _path_files -r': ' -/ } # # ghc-pkg # _ghc_pkg() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '(- *)'{-h,--help}'[Print this usage information]' \ '1: :_ghc_pkg_subcommands' \ '*:: :->arg' \ && ret=0 case $state in (arg) local -a options=( "--user[use current user's package database]" '--global[user the global package database]' {-f,--package-db=}'[use the specified package database]:database:_files' '--global-package-db[location of the global package database]:dir:_files -/' '(--no-user-package-db --user-package-db)--no-user-package-db[never read the user package database]' '(--no-user-package-db --user-package-db)--user-package-db=[location of the user package database]:database:_files' '--force[ignore missing dependencies, directories and libraries]' '--force-files[ignore missing directories and libraries only]' '--enable-multi-instance[allow registering multiple instances of the same package version]' '--expand-env-vars[expand environment variables in input package descriptions]' '(--expand-pkgroot --no-expand-pkgroot)--expand-pkgroot[expand pkgroot-relative paths in output package descriptions]' '(--expand-pkgroot --no-expand-pkgroot)--no-expand-pkgroot[preserve pkgroot-relative paths in output package descriptions]' '(- *)'{-?,--help}'[display this help and exit]' '(- *)'{-V,--version}'[output version information and exit]' '--simple-output[print output in easy-to-parse format for some commands]' '--show-unit-ids[print unit-ids instead of package identifiers]' '--names-only[only print package names, not versions]' '--ignore-case[ignore case for substring matching]' {--ipid,--unit-id}'[interpret package arguments as unit IDs]' {-V,--verbose=-}'[verbosity level]:level:(0 1 2)' ) case $words[1] in (init|register|update) options+=('*: :_files') ;; (unregister|expose|hide|trust|distrust|list|latest|describe) options+=('*: :_ghc_pkg_list_packages') ;; (field) options+=('*: :_ghc_pkg_field') ;; (find-module) options+=('*: :_ghc_pkg_find-module') ;; esac _arguments $options && ret=0 ;; esac return ret } _ghc_pkg_subcommands() { local -a subcommands=( "init:Create and initialize a package database at the given location" "register:Register the package using package description" "update:Register the package (overwriting existing package)" "unregister:Unregister the specified package" "check:Check consistency of dependencies in the package database" "expose:Expose the specified package" "hide:Hide the specified package" "trust:Trust the specified package" "distrust:Distruct the specified package" "list:List registered packages" "find-module:List registered packages exposing module" "latest:Prints the highest registered version of a package" "describe:Give the registered description for the specified package" "field:Extract the specified field of the package description" "dot:Generate a graph of the package dependencies in a form suitable" "dump:Dump the registered description for every package" "recache:Regenerate the package database cache" ) _describe -t subcommands 'subcommand' subcommands "$@" } _ghc_pkg_field() { _ghc_pkg_available_packages _arguments \ '1:package:_values $_ghc_pkg_packages' \ '2:field:_ghc_pkg_field_fields' } _ghc_pkg_field_fields() { # https://ghc.gitlab.haskell.org/ghc/doc/users_guide/_sources/packages.rst.txt local -a fields=( name id version license license-file copyright maintainer stability homepage package-url description category author exposed exposed-modules hidden-modules reexposed-modules trusted import-dirs library-dirs hs-libraries extra-libraries include-dirs includes depends hugs-options cc-options ld-options framework-dirs frameworks haddock-interfaces haddock-html ) _values -s ',' $fields } _ghc_pkg_find-module() { if ( [[ ${+_ghc_modules} -eq 0 ]] || _cache_invalid GHC_MODULES ) && ! _retrieve_cache GHC_MODULES; then if (( $+commands[perl] )); then _ghc_modules=( $(ghc-pkg dump \ | perl -wln -00 -e 'm/^exposed-modules:(.*)/ms and print $1' 2>/dev/null \ | perl -wln -e 'm{^\s+([A-Z].*)$} and $a = $1 and $a =~ s/,/ /g; $a =~ s/ /\n/g and (($a =~ m/^(.*)\s+from\s+/ and print $1) or print $a)' 2>/dev/null )) else _ghc_modules=( $(ghc-pkg dump | sed -n '/^exposed-modules:/{s/^exposed-modules:[ ]\+\(.*\)$/\1/;s/ /\n/;p;be};b;:e;n;/^ /{s/^[ ]\+\(.*\)$/\1/;s/ /\n/;p;be}') ) fi _store_cache GHC_MODULES _ghc_modules fi compadd "$@" -a -- _ghc_modules } _ghc_pkg_available_packages() { if ( [[ ${+_ghc_pkg_packages} -eq 0 ]] || _cache_invalid GHC_PACKAGES ) && ! _retrieve_cache GHC_PACKAGES; then _ghc_pkg_packages=( $(ghc-pkg list --simple-output --names-only) ) _store_cache GHC_PACKAGES _ghc_pkg_packages fi } _ghc_pkg_list_packages() { _ghc_pkg_available_packages compadd "$@" -a -- _ghc_pkg_packages } # # dispatcher # case $service in (ghc) _ghc_compiler ;; (ghci) _ghc_ghci ;; (ghc-pkg) _ghc_pkg ;; esac # 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 ================================================ FILE: src/_gio ================================================ #compdef gio # ------------------------------------------------------------------------------ # Copyright (c) 2025 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 gio 2.86.3 (https://docs.gtk.org/gio/). # # Status: Basic (subcommands and common options). # Origin: Original script. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Magniquick (https://github.com/Magniquick) # # ------------------------------------------------------------------------------ _gio() { local context state line typeset -A opt_args local ret=1 _arguments -C \ '(- : *)'{-h,--help}'[show help information]' \ '(- : *)--version[display version information]' \ '1:command:->command' \ '*::arg:->args' \ && ret=0 case $state in (command) _gio_commands ;; (args) local subcmd=$words[1] if [[ $subcmd == gio ]]; then subcmd=$words[2] fi case $subcmd in (help) _arguments \ '1:command:_gio_commands' \ && ret=0 ;; (version) _arguments && ret=0 ;; (cat) _arguments \ '*:location:_gio_location' \ && ret=0 ;; (copy) _arguments \ '(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \ '(-p --progress)'{-p,--progress}'[show progress]' \ '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \ '--preserve[preserve all attributes]' \ '(-b --backup)'{-b,--backup}'[backup existing destination files]' \ '(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \ '--default-permissions[use default permissions for the destination]' \ '--default-modified-time[use default file modification timestamps for the destination]' \ '*:location:_gio_location' \ && ret=0 ;; (info) _arguments \ '(-w --query-writable)'{-w,--query-writable}'[list writable attributes]' \ '(-f --filesystem)'{-f,--filesystem}'[get file system info]' \ '(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \ '(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \ '*:location:_gio_location' \ && ret=0 ;; (launch) _arguments \ '1:desktop file:_gio_desktop_files' \ '*::file argument:_gio_location' \ && ret=0 ;; (list) _arguments \ '(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \ '(-h --hidden)'{-h,--hidden}'[show hidden files]' \ '(-l --long)'{-l,--long}'[use a long listing format]' \ '(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \ '(-d --print-display-names)'{-d,--print-display-names}'[print display names]' \ '(-u --print-uris)'{-u,--print-uris}'[print full URIs]' \ '*:location:_gio_location' \ && ret=0 ;; (mime) _arguments \ '1:mimetype:_gio_mime_types' \ '2:handler' \ && ret=0 ;; (mkdir) _arguments \ '(-p --parent)'{-p,--parent}'[create parent directories]' \ '*:location:_gio_location' \ && ret=0 ;; (monitor) _arguments \ '(-d --dir)'{-d,--dir}'[monitor a directory]:location:_gio_location' \ '(-f --file)'{-f,--file}'[monitor a file]:location:_gio_location' \ '(-D --direct)'{-D,--direct}'[monitor a file directly]:location:_gio_location' \ '(-s --silent)'{-s,--silent}'[monitor a file directly without reporting changes]:location:_gio_location' \ '(-n --no-moves)'{-n,--no-moves}'[report moves and renames as simple deleted/created events]' \ '(-m --mounts)'{-m,--mounts}'[watch for mount events]' \ '*:location:_gio_location' \ && ret=0 ;; (mount) _arguments \ '(-m --mountable)'{-m,--mountable}'[mount as mountable]' \ '(-d --device)'{-d,--device}'[mount volume with device file or identifier]:device' \ '(-u --unmount)'{-u,--unmount}'[unmount]' \ '(-e --eject)'{-e,--eject}'[eject]' \ '(-t --stop)'{-t,--stop}'[stop drive with device file]:device' \ '(-s --unmount-scheme)'{-s,--unmount-scheme}'[unmount all mounts with scheme]:scheme' \ '(-f --force)'{-f,--force}'[ignore outstanding file operations when unmounting or ejecting]' \ '(-a --anonymous)'{-a,--anonymous}'[use an anonymous user when authenticating]' \ '(-l --list)'{-l,--list}'[list volumes, drives and mounts]' \ '(-o --monitor)'{-o,--monitor}'[monitor volume, drive and mount events]' \ '(-i --detail)'{-i,--detail}'[show extra information]' \ '--tcrypt-pim[unlock VeraCrypt volume with PIM]:pim' \ '--tcrypt-hidden[mount a TCRYPT hidden volume]' \ '--tcrypt-system[mount a TCRYPT system volume]' \ '*:location:_gio_location' \ && ret=0 ;; (move) _arguments \ '(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \ '(-p --progress)'{-p,--progress}'[show progress]' \ '(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \ '(-b --backup)'{-b,--backup}'[backup existing destination files]' \ '(-C --no-copy-fallback)'{-C,--no-copy-fallback}'[do not use copy and delete fallback]' \ '*:location:_gio_location' \ && ret=0 ;; (open) _arguments \ '*:location:_gio_location' \ && ret=0 ;; (rename) _arguments \ '1:location:_gio_location' \ '2:new name' \ && ret=0 ;; (remove) _arguments \ '(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \ '*:location:_gio_location' \ && ret=0 ;; (save) _arguments \ '(-b --backup)'{-b,--backup}'[backup existing destination files]' \ '(-c --create)'{-c,--create}'[only create if not existing]' \ '(-a --append)'{-a,--append}'[append to end of file]' \ '(-p --private)'{-p,--private}'[restrict access to current user]' \ '(-u --unlink)'{-u,--unlink}'[replace as if the destination did not exist]' \ '(-v --print-etag)'{-v,--print-etag}'[print new etag at end]' \ '(-e --etag)'{-e,--etag}'[etag of the file being overwritten]:etag' \ '1:destination:_gio_location' \ && ret=0 ;; (set) _arguments \ '(-t --type)'{-t,--type}'[type of the attribute]:type' \ '(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \ '(-d --delete)'{-d,--delete}'[unset given attribute]' \ '1:location:_gio_location' \ '2:attribute' \ '*::value' \ && ret=0 ;; (trash) _arguments \ '(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \ '--empty[empty the trash]' \ '--list[list files in the trash with their original locations]' \ '--restore[restore a file from trash to its original location]' \ '*:location:_gio_location' \ && ret=0 ;; (tree) _arguments \ '(-h --hidden)'{-h,--hidden}'[show hidden files]' \ '(-l --follow-symlinks)'{-l,--follow-symlinks}'[follow symbolic links, mounts and shortcuts]' \ '*:location:_gio_location' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_gio_commands] )) || _gio_commands() { local -a commands=( 'help:print help' 'version:print version' 'cat:concatenate files to standard output' 'copy:copy one or more files' 'info:show information about locations' 'launch:launch an application from a desktop file' 'list:list the contents of locations' 'mime:get or set the handler for a mimetype' 'mkdir:create directories' 'monitor:monitor files and directories for changes' 'mount:mount or unmount the locations' 'move:move one or more files' 'open:open files with the default application' 'rename:rename a file' 'remove:delete one or more files' 'save:read from standard input and save' 'set:set a file attribute' 'trash:move or restore files to the trash' 'tree:list the contents of locations in a tree' ) _describe -t commands 'gio commands' commands } (( $+functions[_gio_location] )) || _gio_location() { if (( $+functions[_urls] )); then _alternative \ 'files:files:_files' \ 'urls:URL:_urls' else _files fi } (( $+functions[_gio_desktop_files] )) || _gio_desktop_files() { local -a search_path data_dirs desktop_files data_dirs=(${(@s/:/)XDG_DATA_DIRS:-/usr/local/share:/usr/share}) search_path=( "${XDG_DATA_HOME:-$HOME/.local/share}/applications" ${data_dirs[@]/%/\/applications} ) desktop_files=() local dir for dir in $search_path; do [[ -d $dir ]] || continue desktop_files+=($dir/*.desktop(N)) done compadd -a -- desktop_files } (( $+functions[_gio_mime_types] )) || _gio_mime_types() { if (( $+functions[_mime_types] )); then _mime_types else _message 'mime type' fi } _gio "$@" # 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 ================================================ FILE: src/_gist ================================================ #compdef gist # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 gist (https://github.com/defunkt/gist) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Akira Maeda # * Patrick Ziegler # * Shivam Mehta # # ------------------------------------------------------------------------------ _gist() { local ret=1 _arguments \ '(--login)--login[Authenticate gist on this computer.]' \ '(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \ '(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \ '(-p --private --no-private)'{-p,--private}'[Makes your gist private.]' \ '(--no-private -p --private)--no-private[Makes your gist no private.]' \ '(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \ '(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \ '(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:_gist_ids' \ '(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \ '(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \ '(-o --open --no-open)'{-o,--open}'[Open the resulting URL in a browser]' \ '(--no-open -o --open)--no-open[No open the resulting URL in a browser]' \ '--skip-empty[Skip gisting empty files]' \ '(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \ '(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \ '(-l --list)'{-l,--list}'[List all gists for user ]::user' \ '--delete[Delete a gist]:id:_gist_ids' \ '(- *)'{-h,--help}'[print options help]' \ '(-v --version)'{-v,--version}'[print version]' \ '(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:_gist_ids' \ '*: :_files' && ret=0 return ret } _gist_cache_policy() { # rebuild if cache is more than a day old local -a oldp oldp=( "$1"(mh+1) ) (( $#oldp )) } _gist_ids() { local update_policy ret=1 zstyle -s ":completion:${curcontext}:" cache-policy update_policy if [[ -z "$update_policy" ]]; then zstyle ":completion:${curcontext}:" cache-policy _gist_cache_policy fi # stores the gists of the logged in user in the format ID[Description] local -a gist_list # retrieve/Write gists from/to cache if _cache_invalid gist_cached_list || ! _retrieve_cache gist_cached_list; then if (( $+commands[ruby] )); then gist_list=(${(f)"$(gist -l | ruby -ne 'puts "#{$1}:#{$2}" if $_ =~ %r{/([^/ ]+)\s+(.+)}')"}) elif (( $+commands[perl])); then gist_list=(${(f)"$(gist -l | perl -wln -e 'm{/([^/ ]+)\s+(.+)} and print qq($1:$2)')"}) fi if [[ $? -eq 0 ]]; then _store_cache gist_cached_list gist_list else # some error occurred, the user is probably not logged in # set _gists to an empty string so that no completion is attempted gist_list=() fi fi if [[ $#gist_list ]]; then _describe -t gist_ids 'gist_ids' gist_list fi return ret } _gist "$@" # 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 ================================================ FILE: src/_git-flow ================================================ #compdef git-flow #description Git Flow branching model # ------------------------------------------------------------------------------ # Copyright (c) 2010-2015 Justin Hileman # # 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 git-flow (https://github.com/nvie/gitflow). # # Source: https://github.com/bobthecow/git-flow-completion # # ------------------------------------------------------------------------------ # Authors # ------- # # * Justin Hileman (https://github.com/bobthecow) # * Yusuke Muraoka (https://github.com/jbking) # * Vincent Driessen (https://github.com/nvie) # * Zifei Tong (https://github.com/chevalun) # * Ben O'Hara (https://github.com/benohara) # # ------------------------------------------------------------------------------ _git-flow () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands subcommands=( 'init:Initialize a new git repo with support for the branching model.' 'feature:Manage your feature branches.' 'release:Manage your release branches.' 'hotfix:Manage your hotfix branches.' 'support:Manage your support branches.' 'version:Shows version information.' ) _describe -t commands 'git flow' subcommands ;; (options) case $line[1] in (init) _arguments \ -f'[Force setting of gitflow branches, even if already configured]' \ -d'[Use default branch naming conventions and prefixes]' ;; (version) ;; (hotfix) __git-flow-hotfix ;; (release) __git-flow-release ;; (feature) __git-flow-feature ;; (support) __git-flow-support ;; esac ;; esac } __git-flow-release () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands subcommands=( 'start:Start a new release branch.' 'finish:Finish a release branch.' 'list:List all your release branches. (Alias to `git flow release`)' 'publish:Publish this release branch to origin.`)' 'track:Track a release branch from origin.`)' ) _describe -t commands 'git flow release' subcommands _arguments \ -v'[Verbose (more) output]' ;; (options) case $line[1] in (start) _arguments \ -F'[Fetch from origin before performing finish]'\ ':version:__git_flow_version_list' ;; (finish) _arguments \ -F'[Fetch from origin before performing finish]' \ -s'[Sign the release tag cryptographically]'\ -u'[Use the given GPG-key for the digital signature (implies -s)]'\ -m'[Use the given tag message]'\ -n'[Don'\''t tag this release]'\ -p'[Push to $ORIGIN after performing finish]'\ -k'[Keep branch after performing finish]'\ ':version:__git_flow_version_list' ;; (publish) _arguments \ ':version:__git_flow_version_list' ;; (track) _arguments \ ':version:__git_flow_version_list' ;; *) _arguments \ -v'[Verbose (more) output]' ;; esac ;; esac } __git-flow-hotfix () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands subcommands=( 'start:Start a new hotfix branch.' 'finish:Finish a hotfix branch.' 'list:List all your hotfix branches. (Alias to `git flow hotfix`)' 'publish:Publish this hotfix branch to origin`)' ) _describe -t commands 'git flow hotfix' subcommands _arguments \ -v'[Verbose (more) output]' ;; (options) case $line[1] in (start) _arguments \ -F'[Fetch from origin before performing finish]'\ ':hotfix:__git_flow_version_list'\ ':branch-name:__git_flow_branch_names' ;; (finish) _arguments \ -F'[Fetch from origin before performing finish]' \ -s'[Sign the release tag cryptographically]'\ -u'[Use the given GPG-key for the digital signature (implies -s)]'\ -m'[Use the given tag message]'\ -p'[Push to $ORIGIN after performing finish]'\ ':hotfix:__git_flow_hotfix_list' ;; (publish) _arguments \ ':hotfix:__git_flow_hotfix_list' ;; *) _arguments \ -v'[Verbose (more) output]' ;; esac ;; esac } __git-flow-feature () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands subcommands=( 'start:Start a new feature branch.' 'finish:Finish a feature branch.' 'list:List all your feature branches. (Alias to `git flow feature`)' 'publish:Publish this feature branch to origin.' 'track:Track a feature branch from origin.' 'diff:Show a diff of changes since this feature branched off.' 'rebase:Rebase a feature branch on top of develop.' 'checkout:Check out (switch to) the given feature branch.' 'pull:Pull a feature branch from a remote peer.' ) _describe -t commands 'git flow feature' subcommands _arguments \ -v'[Verbose (more) output]' ;; (options) case $line[1] in (start) _arguments \ -F'[Fetch from origin before performing finish]'\ ':feature:__git_flow_feature_list'\ ':branch-name:__git_flow_branch_names' ;; (finish) _arguments \ -F'[Fetch from origin before performing finish]' \ -r'[Finish branch by rebasing first]'\ -k'[Keep branch after performing finish]'\ -D'[Force delete feature branch after finish]'\ ':feature:__git_flow_feature_list' ;; (publish) _arguments \ ':feature:__git_flow_feature_list'\ ;; (track) _arguments \ ':feature:__git_flow_feature_list'\ ;; (diff) _arguments \ ':branch:__git_flow_branch_names'\ ;; (rebase) _arguments \ -i'[Do an interactive rebase]' \ ':branch:__git_flow_branch_names' ;; (checkout) _arguments \ ':branch:__git_flow_feature_list'\ ;; (pull) _arguments \ ':remote:__git_flow_remote'\ ':branch:__git_flow_branch_names' ;; *) _arguments \ -v'[Verbose (more) output]' ;; esac ;; esac } __git-flow-support() { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands subcommands=( 'start:Start a new support branch.' 'list:List all your support branches. (Alias to `git flow support`)' ) _describe -t commands 'git flow support' subcommands _arguments \ -v'[Verbose (more) output]' ;; (options) case $line[1] in (start) _arguments \ -F'[Fetch from origin before performing finish]'\ ':feature:__git_flow_support_list'\ ':branch-name:__git_flow_branch_names' ;; *) _arguments \ -v'[Verbose (more) output]' ;; esac ;; esac } __git_flow_version_list() { local expl local -a versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}}) __git_flow_command_successful || return _wanted versions expl 'version' compadd $versions } __git_flow_feature_list() { local expl local -a features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}}) __git_flow_command_successful || return _wanted features expl 'feature' compadd $features } __git_flow_remote() { local expl gitdir remotes gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null) __git_flow_command_successful || return remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]}) __git_flow_command_successful || return # TODO: Should combine the two instead of either or. if (( $#remotes > 0 )); then _wanted remotes expl remote compadd $* - $remotes else _wanted remotes expl remote _files $* - -W "($gitdir/remotes)" -g "$gitdir/remotes/*" fi } __git_flow_hotfix_list() { local expl local -a hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}}) __git_flow_command_successful || return _wanted hotfixes expl 'hotfix' compadd $hotfixes } __git_flow_support_list() { local expl local -a support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}}) __git_flow_command_successful || return _wanted hotfixes expl 'support' compadd $support } __git_flow_branch_names() { local expl local -a branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/}) __git_flow_command_successful || return _wanted branch-names expl branch-name compadd $* - $branch_names } __git_flow_command_successful() { if (( ${#pipestatus:#0} > 0 )); then _message 'not a git repository' return 1 fi return 0 } _git-flow "$@" # 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 ================================================ FILE: src/_git-pulls ================================================ #compdef git-pulls # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for git-pulls 0.3.1 (https://github.com/schacon/git-pulls). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud (https://github.com/nicoulaj) # # ------------------------------------------------------------------------------ _git-pulls() { typeset -A opt_args local context state line curcontext="$curcontext" local ret=1 _arguments -C \ '(- 1 *)--help[show usage]' \ '1:cmd:->cmds' \ '*::arg:->args' \ && ret=0 case "$state" in (cmds) local commands; commands=( 'update:update pull requests list' 'list:list pull requests' 'show:show pull request' 'browse:open pull request in a web browser' 'merge:merge pull request' ) _describe -t commands 'command' commands && ret=0 ;; (args) curcontext="${curcontext%:*:*}:git-pulls-cmd-$words[1]:" case $words[1] in (update) _message 'no more arguments' && ret=0 ;; (list) _arguments \ '--reverse[list in reverse order]' \ && ret=0 ;; (show) _arguments \ '1: :_git-pulls_pull_requests_numbers' \ '--full[use verbose output]' \ && ret=0 ;; (browse|merge) _arguments \ '1: :_git-pulls_pull_requests_numbers' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_git-pulls_pull_requests_numbers] )) || _git-pulls_pull_requests_numbers() { local pull_requests; pull_requests=(${${${(M)${(f)"$(_call_program users $service list)"}:#[[:digit:]]##[[:space:]]*}//:/\\:}/[[:space:]]##/:}) _describe -t pull-request-numbers 'pull request number' pull_requests "$@" } _git-pulls "$@" # 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 ================================================ FILE: src/_git-revise ================================================ #compdef git-revise #description update, split and rearrange commits # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for git-revise 0.7.0 # (https://github.com/mystor/git-revise/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hannu Hartikainen (https://github.com/dancek) # # ------------------------------------------------------------------------------ __git-revise_commits() { local -a commits if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then commits=(${(f)"$(git log -20 --pretty=format:'%h:%d %s' | sed 's/: /:/')"}) _describe -V 'commit' commits else _message 'not a git repository' fi } __git-revise_branches() { local -a branches if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) _describe 'branch' branches else _message 'not a git repository' fi } _git-revise() { local curcontext="$curcontext" ret=1 _arguments -s \ '(- :)'{-h,--help}'[show help message and exit]' \ '--root[revise starting at the root commit]' \ '--ref=[reference to update]: :__git-revise_branches' \ '--reauthor[reset the author of the targeted commit]' \ '(- :)--version[show version number and exit]' \ '(--edit -e)'{--edit,-e}'[edit commit message of targeted commit(s)]' \ '(--no-autosquash)--autosquash[automatically apply fixup! and squash! commits to their targets]' \ '(--autosquash)--no-autosquash[force disable revise.autoSquash behaviour]' \ '(--all -a)--no-index[ignore the index while rewriting history]' \ '(--no-index --all -a)'{--all,-a}'[stage all tracked files before running]' \ '(--interactive -i --message -m --cut -c --patch -p)'{--patch,-p}'[interactively stage hunks before running]' \ '(--interactive -i --message -m --cut -c --patch -p)'{--interactive,-i}'[interactively edit commit stack]' \ '(--interactive -i --message -m --cut -c --patch -p)'{--message,-m}'[specify commit message on command line]:MESSAGE:()' \ '(--interactive -i --message -m --cut -c --patch -p)'{--cut,-c}'[interactively cut a commit into two smaller commits]' \ '(--gpg-sign -S --no-gpg-sign)'{--gpg-sign,-S}'[GPG sign commits]' \ '(--gpg-sign -S --no-gpg-sign)--no-gpg-sign[do not GPG sign commits]' \ '1: :__git-revise_commits' && ret=0 return $ret } _git-revise "$@" # 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 ================================================ FILE: src/_git-wtf ================================================ #compdef git-wtf # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 git-wtf, authored by # William Morgan (http://git-wt-commit.rubyforge.org/git-wtf) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Mario Fernandez (https://github.com/sirech) # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ __git_wtf_branches() { local -a branches branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) _describe 'branch' branches } _arguments -w -C -s \ '(--long --short)'{-l,--long}'[include author info and date for each commit]' \ '(--long --short)'{-s,--short}'[do not show commits]' \ '(--all)'{-a,--all}'[show all branches across all remote repos, not just those from origin]' \ '(--all-commits)'{-A,--all-commits}'[show all commits, not just the first 5]' \ '(--key)'{-k,--key}'[show key]' \ '(--relations)'{-r,--relations}'[show relation to features / integration branches]' \ '(--dump-config)--dump-config[print out current configuration and exit]' \ '*: :__git_wtf_branches' # 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 ================================================ FILE: src/_glances ================================================ #compdef glances # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 glances 4.3.3 (https://nicolargo.github.io/glances/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * loranger (https://github.com/loranger) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _glances() { _arguments \ '(- *)'{-h,--help}'[show this help message and exit]' \ '--print-completion[print shell completion script]:shell:(bash zsh tcsh)' \ '(- *)'{-V,--version}"[show program's version number and exit]" \ '(-d --debug)'{-d,--debug}'[enable debug mode]' \ '(-C --config)'{-C,--config}'[path to the configuration file]: :_files' \ '(--modules-list --module-list)'{--modules-list,--module-list}'[display modules list and exit]' \ '(--disable-plugin --disable-plugins)'{--disable-plugin,--disable-plugins}'[disable plugin(comma separated list or all)]:plugin' \ '(--enable-plugin --enable-plugins)'{--enable-plugin,--enable-plugins}'[enable plugin(comma separated list)]:plugin' \ '--disable-process[disable process module]' \ '--disable-webui[disable the Web Interface]' \ '(--light --enable-light)'{--light,--enable-light}'[light mode for Curses UI]' \ '(-0 --disable-irix)'{-0,--disable-irix}"[task's cpu usage will be divided by the total number of CPUs]" \ '(-1 --percpu)'{-1,--percpu}'[start Glances in per CPU mode]' \ '(-2 --disable-left-sidebar)'{-2,--disable-left-sidebar}'[disable network, disk I/O, FS and sensors modules]' \ '(-3 --disable-quicklook)'{-3,--disable-quicklook}'[disable quick look module]' \ '(-4 --full-quicklook)'{-4,--full-quicklook}'[disable all but quick look and load]' \ '(-5 --disable-top)'{-5,--disable-top}'[disable top menu(QL, CPU, MEM, SWAP and LOAD)]' \ '(-6 --menugpu)'{-6,--menugpu}'[start Glances in mean GPU mode]' \ '--disable-history[disable stats history]' \ '--disable-bold[disable bold mode in the terminal]' \ '--disable-bg[disable background colors in the terminal]' \ '--enable-irq[enable IRQ mode]' \ '--enable-process-extended[enable extended stats on top process]' \ '--disable-separator[disable separator in the UI]' \ '--disable-cursor[disable cursor in the UI]' \ '--sort-process[sort processes]: :(cpu_percent memory_percent username cpu_times io_counters name)' \ '(--programs --program)'{--programs,--program}'[Accumulate processes by program]' \ '--export[enable export module]:module' \ '--export-csv-file[file path for CSV exporter]: :_files' \ '--export-csv-overwrite[overwrite existing CSV file]' \ '--export-json-file[file path for JSON exporter]: :_files' \ '--export-graph-path[Folder for Graph exporter]: :_files -/' \ '--export-process-filter[set the export process filter]:filters' \ '(-c --client)'{-c,--client}'[connect to a Glances server]:host:_hosts' \ '(-s --server)'{-s,--server}'[run Glances in server mode]' \ '--browser[start the client browser]' \ '--disable-autodiscover[disable autodiscover feature]' \ '(-p --port)'{-p,--port}'[define the client/server TCP port]:port' \ '(-B --bind)'{-B,--bind}'[bind server to the given IPv4/IPv6 address or hostname]:host:_hosts' \ '--username[define a client/server username]' \ '--password[define a client/server password]' \ '-u[use the given client/server username]:user_name' \ '--snmp-community[SNMP community]:community' \ '--snmp-port[SNMP community]:port' \ '--snmp-version[SNMP version]:version:(1 2c 3)' \ '--snmp-user[SNMP user]:user' \ '--snmp-auth[SNMP auth]:auth' \ '--snmp-force[force SNMP mode]' \ '(-t --time)'{-t,--time}'[set minimum refresh rate in seconds(default: 2 sec)]:seconds' \ '(-w --webserver)'{-w,--webserver}'[run Glances in web server mode]' \ '--cached-time[set the server cache time(default: 1 sec)]:seconds' \ '--stop-after[stop Glances after n fresh]:times' \ '--open-web-browser[try to open the Web UI in the default browser]' \ '(-q --quiet)'{-q,--quiet}'[do not display the curses interface]' \ '(-f --process-filter)'{-f,--process-filter}'[set the process filter pattern]:regexp' \ '--process-short-name[force short name for processes name]' \ '--process-long-name[force long name for processes name]' \ '--stdout[display stats to stdout one stat per line]:stats' \ '--stdout-json[display stats to stdout, JSON format]:stats' \ '--stdout-csv[display stats to CSV, JSON format]:stats' \ '--issue[test all plugins and exit]' \ '--trace-malloc[trace memory allocation and display it at the end of the process]' \ '--memory-leak[test memory leak]' \ '--api-doc[display fields descriptions]'\ '--hide-kernel-threads[hide kernel threads in process list]' \ '(-b --byte)'{-b,--byte}'[display network rate in byte per second]' \ '--diskio-show-ramfs[show RAM Fs in the DiskIO plugin]' \ '--diskio-iops[show IO per second in the DiskIO plugin]' \ '--fahrenheit[display temperature in Fahrenheit]' \ '--fs-free-space[display FS free space instead of used]' \ '--sparkline[display sparklines instead of bar in the curses interface]' \ '--disable-unicode[disable unicode characters in the curses interface]' \ '--theme-white[optimize display colors for white background ]' \ '--disable-check-update[disable online Glances version check]' \ '--strftime[strftime format string for displaying current date in standalone mode]' \ } _glances "$@" # 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 ================================================ FILE: src/_golang ================================================ #compdef go -P -value-,GO*,-default- -P -value-,CGO*,-default- # ------------------------------------------------------------------------------ # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users # Copyright (c) 2013-2015 Robby Russell and contributors (see # https://github.com/ohmyzsh/ohmyzsh/graphs/contributors) # Copyright (c) 2010-2014 Go authors # # 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 go 1.26.0 (https://go.dev/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Mikkel Oscar Lyderik Larsen # * Paul Seyfert # * oh-my-zsh authors: # https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/golang/golang.plugin.zsh # * Go authors # # ------------------------------------------------------------------------------ __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]' 'c-shared[main package, plus all packages it imports, into a C shared library]' 'default[main packages are built into executables and listed non-main packages are built into .a files]' 'shared[non-main packages into a single shared library that will be used when building with the -linkshared option]' 'exe[main packages into executables]' 'pie[main packages and everything they import into position independent executables (PIE)]' 'plugin[main packages, plus all packages that they import, into a Go plugin]' ) _values 'mode' $buildmodes } __go_runtimedebug() { local -a vars=( 'allocfreetrace[profile allocations]:boolean:(1 0)' 'clobberfree[clobber memory after free]:boolean:(1 0)' 'cgocheck[check passing go pointers to non-go]: :((0\:"no checks" 1\:"check checks" 2\:"expensive checks"))' 'efence[allocate on unique pages]:boolean:(1 0)' "gccheckmark[verify garbage collector's concurrent mark phase]:boolean:(1 0)" 'gcpacertrace[print state of the concurrent pacer from garbage collector]:boolean:(1 0)' 'gcshrinkstackoff[disable moving goroutines to smaller stacks]:boolean:(1 0)' 'gcstoptheworld[disable concurrent garbage collection]: :((0\:default 1\:"disable concurrent garbage collection" 2\:"disable concurrent gc and sweeping"))' 'gctrace[emit memory collection and pause information from the garbage collector]:boolean:(1 0)' 'madvdontneed[use MADV_DONTNEED instead of MADV_FREE]:boolean:(1 0)' 'memprofilerate[every N-th allocation should be profiled]:int:' 'invalidptr[crash on invalid integers in pointer-type variables]:boolean:(1 0)' 'sbrk[replace memory allocator and garbage collector by trivial allocator]:boolean:(1 0)' 'scavenge[enable debugging mode of heap scavenger]:boolean:(1 0)' 'scavtrace[emit scavenger work information (memory returned and memory utilization)]:boolean:(1 0)' 'scheddetail[emit detailed states of scheduler, processors, threads, goroutines]:boolean:(1 0)' 'schedtrace[emit scheduler state every N ms to stderr]:int' 'tracebackancestors[set ancestor goroutines to be printed in goroutine creation stacks]:int' 'asyncpreemptoff[disable signal-based asynchronous goroutine preemption.]:boolean:(1 0)' ) _values -s ',' -S '=' "runtime debug behavior" $vars[@] } __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"))' \ 'closure[print information about closure compilation]' \ 'compilelater[compile functions as late as possible]' \ 'disablenil[disable nil checks]' \ 'dclstack[run internal dclstack check]' \ 'gcprog[print dump of GC programs]' \ 'libfuzzer[coverage instrumentation for libfuzzer]' \ 'nil[print information about nil checks]' \ 'panic[do not hide any compiler panic]' \ 'slice[print information about slice compilation]' \ 'typeassert[print information about type assertion inlining]' \ 'wb[print information about write barriers]' \ 'export[print export data]' \ 'pctab[print named pc-value table]:pc-value:(pctospadj pctofile pctoline pctoinline pctopcdata)' \ 'locationlists[print information about DWARF location list creation]' \ 'typecheckinl[eager type-checking of inline function bodies]' \ 'dwarfinl[print information about DWARF inlined function creation]' \ 'softfloat[force compiler to emit soft-float code]' \ 'defer[print information about defer compilation]' \ 'ssa/help[print help about SSA debugging]' } __go_gcflags() { _arguments \ '-%[debug non-static initializers]' \ '-c=[concurrency during compilation]:int' \ '-+[compiling runtime]' \ '-B[disable bounds checking]' \ '-C[disable printing of columns in error messages]' \ '-D=[set relative path for local imports]:path: _path_files -/' \ '-E[debug symbol export]' \ '-I=[add directory to import search path]:directory: _path_files -/' \ '-K[debug missing line numbers]' \ '-L[show full file names in error messages]' \ '-N[disable optimizations]' \ '-S[print assembly listing]' \ '-V[print version and exit]' \ '-W[debug parse tree after type checking]' \ '-asmhdr=[write assembly header to file]:file' \ '-bench=[append benchmark times to file]:file' \ '-blockprofile=[write block profile to file]:file' \ '-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: __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)]' \ '-dynlink[support references to Go symbols defined in other shared libraries]' \ '-e[no limit on number of errors reported]' \ '-gendwarfinl=[generate DWARF inline info records (default 2)]:int' \ '-goversion=[required version of the runtime]:string' \ '-h[halt on error]' \ '-importcfg=[read import configuration from file]:file' \ '-installsuffix=[set pkg directory suffix]:suffix' \ '-j[debug runtime-initialized variables]' \ '-json=[version,destination for JSON compiler/optimizer logging]:string' \ '-l[disable inlining]' \ '-lang=[release to compile for]:string' \ '-linkobj=[write linker-specific object to file]:file' \ '-linkshared[generate code that will be linked against Go shared libraries]' \ '-live[debug liveness analysis]' \ '-m[print optimization decisions]' \ '-memprofile=[write memory profile to file]:file' \ '-memprofilerate=[set runtime.MemProfileRate to rate]:rate' \ '-msan[build code compatible with C/C++ memory sanitizer]' \ '-mutexprofile=[write mutex profile to file]:file' \ '-newobj[use new object file format]' \ '-nolocalimports[reject local (relative) imports]' \ '-o=[write output to file]:file' \ '-p=[set expected package import path]:path: _path_files -/' \ '-pack[write to file.a instead of file.o]' \ '-r[debug generated wrappers]' \ '-race[enable race detector]' \ '-shared[generate code that can be linked into a shared library]' \ '-smallframes[reduce the size limit for stack allocated objects]' \ '-spectre=[enable spectre mitigations]:mitigations:(all index ret)' \ '-std[compiling standard library]' \ '-symabis=[read symbol ABIs from file]:file' \ '-traceprofile=[write an execution trace to file]:file' \ '-trimpath=[remove prefix from recorded source file paths]:prefix' \ '-v[increase debug verbosity]' \ '-w[debug type checking]' \ '-wb[enable write barrier (default true)]' } __go_pgo() { _alternative \ "name:name:(auto off)" \ "file:file:_files" } local -a build_flags local -a commands=( 'bug:start a bug report' 'build:compile packages and dependencies' 'clean:remove object files and cached files' 'doc:show documentation for package or symbol' 'env:print Go environment information' 'fix:update packages to use new APIs' 'fmt:gofmt (reformat) package sources' 'generate:generate Go files by processing source' 'get:download and install packages and dependencies' 'install:compile and install packages and dependencies' 'list:list packages or modules' 'mod:module maintenance' 'work:workspace maintenance' 'run:compile and run Go program' 'telemetry:manage Go telemetry data and settings' 'test:test packages' 'tool:run specified go tool' 'version:print Go version' 'vet:report likely mistakes in packages' 'help:get more information about a command' ) __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]%%=*}} case $env_variable in (GO111MODULE) _values "module mode" off on auto ;; # commands (AR|CC|CXX|FC|GCCGO|GOAUTH|GOCACHEPROG) _command_names -e ;; # directories (GOBIN|GOCACHE|GOTMPDIR|GOTOOLDIR|GOROOT|GOROOT_FINAL|GCCGOTOOLDIR|GOPATH|GOMODCACHE|GOCOVERDIR) _files -/ ;; # regular files (GOMOD|PKG_CONFIG|GOENV) _files ;; # special (GOHOSTOS|GOOS) # from https://golang.org/doc/install/source#environment local -a supported_os=( aix android darwin dragonfly freebsd illumos ios js linux netbsd openbsd plan9 solaris wasip1 windows ) _values 'operating system' $supported_os ;; (GOHOSTARCH|GOARCH) local -a supported_arch=( amd64 386 arm arm64 ppc64le ppc64 mips64le mips64 mipsle mips s390x riscv64 wasm ) _values 'architecture' $supported_arch ;; (CGO_ENABLED) _values 'enable/disable cgo' 0 1 ;; (GO_EXTLINK_ENABLED) _values 'enable/disable external linkage' 0 1 ;; (GOARM) _values 'target arm architecture' 5 6 7 ;; (GO386) _values 'x86 floating point instruction set' sse2 softfloat ;; (GOAMD64) _values 'amd64 instruction set' v1 v2 v3 v4 ;; (GOMIPS*) _values 'mips floating point instructions' hardfloat softfloat ;; (GOPPC64) _values 'powerpc64 instruction set' power8 power9 power10 ;; (GOWASM) _values 'web assembly features' -s ',' satconv signext ;; (GOPROXY) _urls ;; (GOEXE) _message "suffix for executables" ;; (CGO_*FLAGS_*ALLOW) _message "regexp" ;; (CGO_*FLAGS) _dispatch $service -value-,${variable#CGO_},-default- ;; (GODEBUG) __go_runtimedebug ;; (GOFLAGS) # not implemented, sorry ;; (GOINSECURE|GOPRIVATE|GONOPROXY|GONOSUMDB) # comma separated glob patterns (in the syntax of Go's path.Match) _message "comma separated glob pattern" ;; (GOSUMDB) _message "e.g. sum.golang.org+ https://sum.golang.org" ;; (GOFIPS140) _values 'FIPS version' off latest ;; esac } __go_packages() { local -a gopaths=("${(s/:/)$(go env GOPATH)}") gopaths+=("$(go env GOROOT)") for p in $gopaths; do _path_files $@ -W "$p/src" -/ done # no special treatment for # - relative paths starting with .. # - absolute path starting with / # - variables, substitutions, subshells if [[ $words[$CURRENT] = ..* || $words[$CURRENT] = \$* || $words[$CURRENT] = /* ]]; then _path_files $@ -/ -g '*.go' else # go build accepts paths relative to the cwd but they must start with './', so prefix them _path_files $@ -P './' -/ -g '*.go' fi } __go_fix_analyzers() { local -a fix_analyzers=( "any[replace interface{} with any]" "buildtag[check //go:build and // +build directives]" "fmtappendf[replace \[\]byte(fmt.Sprintf) with fmt.Appendf]" "forvar[remove redundant re-declaration of loop variables]" "hostport[check format of addresses passed to net.Dial]" "inline[apply fixes based on 'go:fix inline' comment directives]" "mapsloop[replace explicit loops over maps with calls to maps package]" "minmax[replace if/else statements with calls to min or max]" "newexpr[simplify code by using go1.26's new(expr)]" "omitzero[suggest replacing omitempty with omitzero for struct fields]" "plusbuild[remove obsolete //+build comments]" "rangeint[replace 3-clause for loops with for-range over integers]" "reflecttypefor[replace reflect.TypeOf(x) with TypeFor\[T\]()]" "slicescontains[replace loops with slices.Contains or slices.ContainsFunc]" "slicessort[replace sort.Slice with slices.Sort for basic types]" "stditerators[use iterators instead of Len/At-style APIs]" "stringsbuilder[replace += with strings.Builder]" "stringscut[replace strings.Index etc. with strings.Cut]" "stringscutprefix[replace HasPrefix/TrimPrefix with CutPrefix]" "stringsseq[replace ranging over Split/Fields with SplitSeq/FieldsSeq]" "testingcontext[replace context.WithCancel with t.Context in tests]" "waitgroup[replace wg.Add(1)/go/wg.Done() with wg.Go]" ) _values 'analyzer' $fix_analyzers } __go_pprof_symbolize_types() { local -a symbolize_types=( "none[Do not attempt symbolization]" "local[Examine only local binaries]" "fastlocal[Only get function names from local binaries]" "remote[Do not examine local binaries]" "force[Force re-symbolization]" ) _values 'symbolize_type' $symbolize_types } if [[ "$service" = -value-* ]]; then local env_variable=${${service%,-default-}#-value-,} # some special variables are not read from the environment local -a blacklist=('GOEXE' 'GOGCCFLAGS' 'GOHOSTARCH' 'GOHOSTOS' 'GOMOD' 'GOTOOLDIR') if (($blacklist[(I)$env_variable])); then return fi __go_envvarvals $env_variable return fi _arguments \ "1: :{_describe 'command' commands}" \ '*:: :->args' case $state in args) build_flags=( '-C[change to directory before running the command]: :_files -/' '-a[force rebuilding of packages that are already up-to-date]' '-n[print the commands but do not run them]' '-p[number of builds that can be run in parallel]:number' '-race[enable data race detection]' '-msan[enable interoperation with memory sanitizer]' '-asan[enable interoperation with address sanitizer]' '-v[print the names of packages as they are compiled]' '-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:__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:__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:__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]' '-toolexec[program to use to invoke toolchain programs]:args' ) local -a mod_flags=( '-mod=[module download mode to use]:download mode:(readonly vendor mod)' '-modcacherw[leave newly-created directories in the module cache read-write]' '-modfile=[read an alternate go.mod file]:modfile: _files -g "*.mod"' ) local -a edit_flags=( '-fmt[reformats the go.mod/work file without making other changes]' '*-require=[add a requirement on the given module path and version]:require' '*-droprequire=[drop a requirement on the given module path and version]:droprequire' '-go[sets the expected Go language version]:goversion' '*-replace=[add a replacement of the given module path and version]:replace' '*-dropreplace=[drop a replacement of the given module path and version]:dropreplace' '-toolchain=[set the Go toolchain to use]:name' '-json[prints the final go.mod/work file in JSON format]' '-print[prints the final go.mod/work in its text format]' ) local -a mod_commands=( 'download:download modules to local cache' 'edit:edit go.mod from tools or scripts' 'graph:print module requirement graph' 'init:initialize new module in current directory' 'tidy:add missing and remove unused modules' 'vendor:make vendored copy of dependencies' 'verify:verify dependencies have expected content' 'why:explain why packages or modules are needed' 'help:get more information about a command' ) local -a fix_flags=( '-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]' '-any[enable any analysis]' '-buildtag[enable buildtag analysis]' '-c[display offending line with this many lines of content(default: -1)]:num' '-fix[apply all suggested fixes]' '-flags[print analyzer flags in JSON]' '-fmtappendf[enable fmtappendf analysis]' '-forvar[enable forvar analysis]' '-hostport[enable hostport analysis]' '-inline[enable inline analysis]' '-json[emit JSON output]' '-mapsloop[enable mapsloop analysis]' '-minmax[enable minmax analysis]' '-newexpr[enable newexpr analysis]' '-omitzero[enable omitzero analysis]' '-plusbuild[enable plusbuild analysis]' '-rangeint[enable rangeint analysis]' '-reflecttypefor[enable reflecttypefor analysis]' '-slicescontains[enable slicescontains analysis]' '-slicessort[enable slicessort analysis]' '-stditerators[enable stditerators analysis]' '-stringsbuilder[enable stringsbuilder analysis]' '-stringscut[enable stringscut analysis]' '-stringscutprefix[enable stringscutprefix analysis]' '-stringsseq[enable stringsseq analysis]' '-testingcontext[enable testingcontext analysis]' '-waitgroup[enable waitgroup analysis]' ) case $words[1] in (build) _arguments \ '-o[force build to write to named output file or directory]:file or directory:_files' \ '-json[emit build output in JSON suitable for automated processing]' \ ${build_flags[@]} \ ${mod_flags[@]} \ '*:importpaths:__go_packages' ;; (clean) _arguments \ '-i[remove corresponding installed archive or binary]' \ '-r[apply clean recursively on all dependencies]' \ '-cache[remove the entire go build cache]' \ '-testcache[expire all test results in the go build cache]' \ '-modcache[clean to remove the entire module download cache]' \ '-fuzzcache[remove files stored in the Go build cache for fuzz testing]' \ ${build_flags[@]} \ ${mod_flags[@]} \ '*:importpaths:__go_packages' ;; (doc) _arguments \ '-all[show all the documentation for the package]' \ '-c[respect case when matching symbols]' \ '-cmd[treat a command (package main) like a regular package]' \ '-http[serve HTML docs over HTTP]' \ '-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:__go_packages' ;; (env) local -a goenvvars=( # General-purpose environment variables "GO111MODULE[controls whether the go command runs in module-aware mode]:value" "GCCGO[gccgo command to run.]:gccgo command" "GOARCH[architecture, or processor, for which to compile code.]:architecture" "GOAUTH[controls authentication for go-import and HTTPS module mirror interactions]:command" "GOBIN[directory where 'go install' installs to]:go install target dir" "GOCACHE[directory to store cached information]:go build cache dir" "GOCACHEPROG[a command that implements an external go build cache]:command" "GOMODCACHE[module cache directory]:path" "GODEBUG[enable runtime debug facilities]:runtime debug settings" "GOENV[location of the go environment configuration file]:configuration file" "GOFIPS140[the FIPS-140 cryptography mode to use when building binaries]" "GOFLAGS[default go command line flags]:space separated default command line flags" "GOINSECURE[module prefixes that are fetched insecurely]:comma separated module prefixes" "GOOS[target operating system]:operating system" "GOPATH[path to resolve import statements]:import path" "GOPROXY[URL of go module proxy]:proxy url" "GOPRIVATE[modules that should always be fetched directly]:comma separated glob patterns" "GONOPROXY[modules that should always be fetched directly]:comma separated glob patterns" "GONOSUMDB[modules that should not be compared against the checksum db]:comma separated glob patterns" "GOROOT[root of the go tree]:go root directory" "GOSUMDB[checksum database]:name(+publickey( url))" "GOTOOLCHAIN[control which Go tool chain is used]:toolchain" "GOTMPDIR[directory for temporary sources, packages, and binaries]:tmp directory" "GOVCS[lists version control commands that may be used with matching servers]:commands" "GOWORK[use the given go.work file as a workspace file]:workspace_file" # Environment variables for use with cgo "AR[command for manipulating library archives (for gccgo)]:archive manipulation program" "CC[command to compile C code]:C compiler" "CGO_ENABLED[enable/disable cgo]:boolean" "CGO_CFLAGS[flags passed to the compiler for C code]:C compilation flags" "CGO_CFLAGS_ALLOW[additional flags to allow to appear in #cgo CFLAGS]:regular expression" "CGO_CFLAGS_DISALLOW[flags that must be disallowed from appearing in #cgo CFLAGS]" "CGO_CPPFLAGS[flags passed to the C preprocessor]:C preprocessor flags" "CGO_CPPFLAGS_ALLOW[additional flags to allow to appear in #cgo CPPFLAGS]:regular expression" "CGO_CPPFLAGS_DISALLOW[flags that must be disallowed from appearing in #cgo CPPFLAGS]" "CGO_CXXFLAGS[flags passed to the compiler for C++ code]:C++ compilation flags" "CGO_CXXFLAGS_ALLOW[additional flags to allow to appear in #cgo CXXFLAGS]:regular expression" "CGO_CXXFLAGS_DISALLOW[flags that must be disallowed from appearing in #cgo CXXFLAGS]" "CGO_FFLAGS[flags passed to the compiler for Fortran code]:Fortran compilation flags" "CGO_FFLAGS_ALLOW[additional flags to allow to appear in #cgo FFLAGS]:regular expression" "CGO_FFLAGS_DISALLOW[flags that must be disallowed from appearing in #cgo FFLAGS]" "CGO_LDFLAGS[flags passed to the compiler for linker]:linker flags" "CGO_LDFLAGS_ALLOW[additional flags to allow to appear in #cgo LDFLAGS]:regular expression" "CGO_LDFLAGS_DISALLOW[flags that must be disallowed from appearing in #cgo LDFLAGS]" "CXX[command to compile C++]:C++ compiler" "FC[command to compile Fortran]:Fortran compiler" "PKG_CONFIG[Path to pkg-config tool.]:path to pkg-config" # Architecture-specific environment variables "GOARM[arm architecture]:arm architecture" "GO386[x86 instruction set]:x86 instruction set" "GOAMD64[amd64 instruction set]:amd64 instruction set" "GOMIPS[mips instruction set]:mips instruction set" "GOMIPS64[mips64 instruction set]:mips64 instruction set" "GOPPC64[powerpc64 instruction set]:powerpc64 instruction set" "GOWASM[web assembly features]:comma separated web assembly features" # Environment variable for use with code coverage "GOCOVERDIR[directory into which to write code coverage data files]" # Special-purpose environment variables "GCCGOTOOLDIR[directory of gccgo tools]:gccgo tool directory" "GOEXPERIMENT[comma-separated list of toolchain experiments to enable or disable]" "GOROOT_FINAL[root of the go tree]:go root" "GO_EXTLINK_ENABLED[enable external linking mode]:boolean" "GIT_ALLOW_PROTOCOL[schemes allowed to fetch]:colon separated git schemes" # Additional information "GOEXE[suffix for executables]:executable suffix" "GOGCCFLAGS[arguments supplied to CC]:space separated arguments to CC" "GOHOSTARCH[architecture of the toolchain binaries]:host os architecture" "GOHOSTOS[operating system of the toolchain binaries]:host os" "GOMOD[absolute path the the main go.mod]:abs path to main go.mod" "GOTOOLDIR[installation directory of go tools]:tool installation directory" "GOVERSION[The version of the installed Go tree]" ) local -a exclude_from_w=(GOENV) __go_list_env_vars() { # the parameter expansion strops off everything after the first [ _values -s ' ' -w 'environment variable' ${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 -/' \ '-json[print the environment in JSON format]' \ '-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]: __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:__go_packages' ;; (fmt) _arguments \ '-C[change to directory before running the command]: :_files -/' \ '-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:__go_packages' ;; (generate) _arguments \ '-C[change to directory before running the command]: :_files -/' \ '-run=[specifies a regular expression to select directives]:regex' \ '-x[print the commands]' \ '-n[print the commands but do not run them]' \ '-v[print the names of packages as they are compiled]' \ ${build_flags[@]} \ "*:args:{ _alternative ':importpaths:__go_packages' _files }" ;; (get) # no mod_flags for get _arguments \ '-t[also download the packages required to build tests]' \ '-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:__go_packages' ;; (install) _arguments \ ${build_flags[@]} \ '*:importpaths:__go_packages' ;; (list) local -a list_args=( '-e[changes the handling of erroneous packages]' '-f[specifies an alternate format for the list]:format' '-json[causes package data to be printed in JSON format]' '-compiled[set CompiledGoFiles to the Go source files presented to the compiler]' '-deps[iterate over named packages and their dependencies]' '-export[set the Export for the given package]:package' '-find[identify the named packages but not resolve their dependencies]:package' '-test[report not only the named packages but also their test binaries]' '-m[list modules instead of packages]' ${build_flags[@]} ${mod_flags[@]} '*:importpaths:__go_packages' ) # -u and -versions are only available if -m is present on the commandline if (($words[(I)-m])); then list_args+=( '-u[adds information about available upgrades]' '-versions[list all known versions of modules]' ) fi _arguments ${list_args[@]} ;; (mod) _arguments -C \ "1: :{_describe 'command' mod_commands}" \ '*:: :->args' case $state in (args) case $words[1] in (download) _arguments \ '-json[print a sequence of JSON objects to standard output]' \ '-x[print the commands download executes]' \ '-reuse[file containing the JSON output of a previous "go mod download -json" invocation]:json:_files -g "*.json"' ;; (edit) _arguments \ ${edit_flags[@]} \ "-module[change the module's path]" \ '*-exclude=[add an exclusion for the given module path and version]:exclude' \ '*-dropexclude=[drop an exclusion for the given module path and version]:dropexclude' \ ':go.mod:_path_files -g "go.mod"' ;; (graph) _arguments \ '-go[report the module graph as loaded by the given Go version]:goversion' \ '-x[print the commands graph executes]' ;; (init) # Use go packages as module name suggestion _arguments \ '*:module:__go_packages' ;; (tidy) _arguments \ '-v[print information about removed modules to standard error]' \ '-e[attempt to proceed despite errors encountered while loading packages]' \ '-x[print the commands download executes]' \ '-diff[not to modify go.mod or go.sum but instead print necessary changes as a unified diff]' \ '-go=[update the go directive in the go.mod file to the given version]:goversion' \ '-compat=[preserves additional checksums needed for the indicated Go version]:version' ;; (vendor) _arguments \ '-v[print the names of vendored modules and packages to standard error]' \ '-e[attempt to proceed despite errors encountered while loading packages]' \ '-o[create the vendor directory at the given path instead of "vendor"]:directory:_path_files -/' ;; (why) _arguments \ '-m[treats the arguments as a list of modules]' \ '-vendor[exclude tests of dependencies]' \ '*:module:__go_packages' ;; esac ;; esac ;; (run) _arguments \ ${build_flags[@]} \ '-exec[invoke the binary using xprog]:xporg' \ '*:importpaths:__go_packages' ;; (telemetry) local -a telemetry_commands=( 'off:disable both collection and uploading of telemetry data' 'local:disable telemetry uploading, but enable local data collection' 'on:enable both collection and uploading of telemetry data' ) _describe 'command' telemetry_commands ;; (test) if [[ $words[$CURRENT] = -test.* ]]; then _arguments \ '-test.bench[run only benchmarks matching regexp]:regexp' \ '-test.benchmem[print memory allocations for benchmarks]' \ '-test.benchtime[run each benchmark for duration d (default 1s)]:d' \ '-test.blockprofile[write a goroutine blocking profile to file]:file:_files' \ '-test.blockprofilerate[set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)]:rate' \ '-test.count[run tests and benchmarks n times (default 1)]:n' \ '-test.coverprofile[write a coverage profile to file]:file:_files' \ '-test.cpu[comma-separated list of cpu counts to run each test with]:comma-separated list' \ '-test.cpuprofile[write a cpu profile to file]:file:_files' \ '-test.failfast[do not start new tests after the first test failure]' \ '-test.list[list tests, examples, and benchmarks matching regexp then exit]:regexp' \ '-test.fuzz[run the fuzz test matching regexp]:regexp' \ '-test.fuzzcachedir[directory where interesting fuzzing inputs are stored]:dir:_path_files -/' \ '-test.fuzzminimizetime[time to spend minimizing a value after finding a failing input (default 1m0s)]:t' \ '-test.fuzztime[time to spend fuzzing; default is to run indefinitely]:t' \ '-test.fuzzworker[coordinate with the parent process to fuzz random values (for use only by cmd/go)]' \ '-test.list[list tests, examples, and benchmarks matching regexp then exit]:regexp' \ '-test.memprofile[write an allocation profile to file]:file:_files' \ '-test.memprofilerate[set memory allocation profiling rate (see runtime.MemProfileRate)]:rate' \ '-test.mutexprofile[write a mutex contention profile to the named file after execution]:string' \ '-test.mutexprofilefraction[if >= 0, calls runtime.SetMutexProfileFraction() (default 1)]:int' \ '-test.outputdir[write profiles to dir]:dir:_path_files -/' \ '-test.paniconexit0[panic on call to os.Exit(0)]' \ '-test.parallel[run at most n tests in parallel (default 4)]:n' \ '-test.run[run only tests and examples matching regexp]:regexp' \ '-test.short[run smaller test suite to save time]' \ '-test.shuffle[randomize the execution order of tests and benchmarks (default "off")]:string' \ '-test.testlogfile[write test action log to file (for use only by cmd/go)]:file' \ '-test.timeout[panic test binary after duration d (default 0, timeout disabled)]:d' \ '-test.trace[write an execution trace to file]:file' \ '-test.v[verbose: print additional output]' else _arguments \ "-c[compile but don't run test]" \ '-artifacts[save test artifacts in the directory specified by -outputdir]' \ '-bench[run benchmarks matching the regular expression]:regexp' \ '-benchmem[print memory allocation statistics for benchmarks]' \ '-benchtime[run benchmarks for t rime]:t' \ '-blockprofile[write a goroutine blocking profile to the specified file]:block' \ '-blockprofilerate[control goroutine blocking profiles]:n' \ '-count[run each test and benchmark n times]:n' \ '-cover[enable coverage analysis]' \ '-covermode[set the mode for coverage analysis]:mode:(set count atomic)' \ '-coverpkg[apply coverage analysis in each test of listed packages]:list' \ '-coverprofile[write a coverage profile to file]:cover' \ '-cpu[specify a list of GOMAXPROCS values]:cpus' \ '-cpuprofile[write a CPU profile to the specified file]:profile' \ '-failfast[do not start new tests after the first test failure]' \ '-fullpath[show full file names in the error messages]' \ '-fuzz[run the fuzz test matching the regular expression]:regexp' \ '-fuzztime[run enough iterations of the fuzz target during fuzzing]:t' \ '-fuzzminimizetime[run enough iterations of the fuzz target during each minimization attempt]:t' \ '-json[log verbose output and test results in JSON]' \ '-list[list tests, benchmarks, fuzz tests, or examples matching the regular expression]:regexp' \ '-memprofile[write a memory profile to file]:mem' \ '-memprofilerate[enable more precise memory profiles]:n' \ '-mutexprofile[write a mutex contention profile to the specified file]:file:_files' \ '-mutexprofilefraction[sample 1 in n stack traces of goroutines holding a contended mutex]:n' \ '-outputdir[place output files from profiling in output dir]:dir:_path_files -/' \ '-parallel[allow parallel execution of test functions]:n' \ '-run[run tests and examples matching the regular expression]:regexp' \ '-short[tell long-running tests to shorten their run time]' \ '-shuffle[randomize the execution order of tests and benchmarks]:type:(off on)' \ '-skip[run only tests that do not match the regular expression]:pattern' \ '-test.-[specify options for test running]:test running options:' \ '-timeout[timeout long running tests]:t' \ '-trace[write an execution trace to the specified file]:trace' \ '-v[verbose output]' \ '-vet[configure the invocation of "go vet" during "go test" to use the comma-separated list of vet checks]:list' \ ${build_flags[@]} \ '-exec[run test binary using xprog]:xprog' \ '-o[compile test binary to named file]:file:_files' \ '*:importpaths:__go_packages' fi ;; (tool) local -a tools=($(go tool)) _arguments \ '-n[print command that would be executed]' \ "1: :{_describe 'tool' tools}" \ '*:: :->args' case $state in (args) case $words[1] in (addr2line) _files ;; (asm) _arguments \ '*-D[predefined symbol with optional simple value]:value' \ '*-I[include directory]:value' \ '-S[print assembly and machine code]' \ '(- *)-V[print assembler version and exit]' \ '-debug[dump instructions as they are parsed]' \ '-dynlink[support references to Go symbols]' \ '-e[no limit on number of errors reported]' \ '-gensymabis[write symbol ABI information to output file. Do not assemble]' \ '-o[output file]:string:_files' \ '-p[set expected package import to pkgpath]:pkgpath' \ '-shared[generate code that can be linked into a shared lib]' \ '-spectre[enable spectre mitigations in list]:list:(all ret)' \ '-trimpath[remove prefix from recorded source file paths]:string' \ '-v[print debug output]' \ '*:file:_files' ;; (buildid) _arguments \ '-w[rewrite the build ID found in the file]' \ '*:file:_files' ;; (cgo) _arguments \ '(- *)-V[print cgo version and exit]' \ '-debug-define[print relevant #defines]' \ '-debug-gcc[print gcc invocations]' \ '-dynimport[if non-empty, print dynamic import data]:string' \ '-dynlinker[record dynamic linker information]' \ '-dynout[write -dynimport output to file]:file:_files' \ '-dynpackage[set Go package for -dynimport output]:string' \ '-exportheader[where to write export header]:string' \ '-importpath[the import path for the Go package]:package' \ '-import_runtime_cgo[import runtime/cgo in generated code]' \ '-import_syscall[import syscall in generated code]' \ '-gccgo[generate files for use with gccgo]' \ '-gccgoprefix[-fgo-prefix option used with gccgo]:string' \ '-gccgopkgpath[-fgo-pkgpath option used with gccgo]:string:_path_files -/' \ '-gccgo_define_cgoincomplete[define cgo.Incomplete locally rather than importing it from "runtime/cgo" package]' \ '-godefs[write Go definitions for C file to stdout]' \ '-objdir[object directory]:dir:_path_files -/' \ '-srcdir[source directory]:dir:_path_files -/' \ '*:file:_files' ;; (compile) _arguments \ '-%[debug non-static initializers]' \ '-+[compiling runtime]' \ "-A[for bootstrapping, allow 'any' type]" \ '-B[disable bounds checking]' \ '-D[set relative path for local imports]:path' \ '-E[debug symbol export]' \ '*-I[add directory to import search path]:directory' \ '-K[debug missing line numbers]' \ '-L[use full (long) path in error messages]' \ '-M[debug move generation]' \ '-N[disable optimizations]' \ '-P[debug peephole optimizer]' \ '-R[debug register optimizer]' \ '*-S[print assembly listing]' \ '(- *)-V[print compiler version and exit]' \ '-W[debug parse tree after type checking]' \ '-asmhdr[write assembly header to file]:file' \ '-asan[insert calls to C/C++ address sanitizer]' \ '-buildid[record id as the build id in the export metadata]:id' \ '-blockprofile[write block profile for the compilation to file]:file:_files' \ '-c[concurrency during compilation]:concurrency' \ '-complete[compiling complete package (no C or assembly)]' \ '-cpuprofile[write cpu profile to file]:file:_files' \ '-d[print debug information about items in list]:list' \ '-dwarf[generate DWARF symbols]' \ '-dwarflocationlists[add location lists to DWARF in optimized mode]' \ '-gendwarfinl[generate DWARF inline info records]:num' \ '-dynlink[support references to Go symbols]' \ '-e[no limit on number of errors reported]' \ '-f[debug stack frames]' \ '-g[debug code generation]' \ '-goversion[specify required go tool version of the runtime]:version' \ '-h[halt on error]' \ '-i[debug line number stack]' \ '-importcfg[read import configuration from file]:config:_files' \ '-installsuffix[set pkg directory suffix]:suffix' \ '-j[debug runtime-initialized variables]' \ '-l[disable inlining]' \ '-lang[set language version to compile]:version' \ '-largemodel[generate code that assumes a large memory model]' \ '-linjobj[write linker-specific object to file and compiler-specific object to usual output file]:file:_files' \ '-live[debug liveness analysis]' \ '-m[print optimization decisions]' \ '-memprofile[write memory profile to file]:file' \ '-memprofilerate[set runtime.MemProfileRate to rate]:rate' \ '-msan[insert calls to C/C++ memory sanitizer]' \ '-mutexprofile[write mutex profile for the compilation to file]:file:_files' \ '-nolocalimports[reject local (relative) imports]' \ '-o[write output to file]:file' \ '-p[set expected package import path]:path' \ '-pack[write package file instead of object file]' \ '-r[debug generated wrappers]' \ '-race[enable race detector]' \ '-s[warn about composite literals that can be simplified]' \ '-shared[generate code that can be linked into a shared library]' \ '-spectre[enable spectre mitigations in list]:type:(all index ret)' \ '-traceprofile[write an execution trace to file]:file:_files' \ '-trimpath[remove prefix from recorded source file paths]:prefix' \ '-u[reject unsafe code]' \ '-v[increase debug verbosity]' \ '-w[debug type checking]' \ '-wb[enable write barrier (default 1)]' \ '-x[debug lexer]' \ '-y[debug declarations in canned imports (with -d)]' \ '*:file:_files -g "*.go(-.)"' ;; cover) if (( CURRENT == 2 )); then _arguments \ '-func=[output coverage profile information for each function]:string' \ '-html=[generate HTML representation of coverage profile]:file:_files' \ '-mode=[coverage mode]:mode:(set count atomic)' return fi _arguments \ '-o[file for output]:file' \ '-var=[name of coverage variable to generate]:var' \ '*:file:_files -g "*.go(-.)"' ;; (doc) _arguments \ '-c[respect case when matching symbols]' \ '-cmd[treat a command (package main) like a regular package]' \ '-u[show docs for unexported and exported symbols and methods]' ;; (fix) if [[ $words[2] == "help" ]]; then __go_fix_analyzers else _arguments \ "*:args:{ _alternative ':subcommand:(help)' _files }" fi ;; (link) _arguments \ '-B[add an ELF NT_GNU_BUILD_ID note when using ELF]:note' \ '-E[set entry symbol name]:entry' \ '-H[set header type]:type' \ '-I[use linker as ELF dynamic linker]:linker' \ '-L[add specified directory to library path]:directory:_path_files -/' \ '-R[set address rounding quantum (default -1)]:quantum' \ '-T[set text segment address (default -1)]:address' \ '(- *)-V[print version and exit]' \ '-X[add string value definition]:definition' \ '-asan[enable ASan interface]' \ '-aslr[enable ASLR for buildmode=c-shared on windows]' \ '-benchmark[set mode to enable phase benchmarking]:mode:(mem cpu)' \ '-benchmarkprofile[emit phase profiles]:base' \ '-bindnow[mark a synamically linked ELF object for immediate function binding]' \ '-buildid[record id as Go toolchain build id]:id' \ '-buildmode[set build mode]:mode' \ '-c[dump call graph]' \ '-capturehostobjs[capture host object files loading during internal linking to specified dir]:dir:_path_files -/' \ '-checklinkname[check link-name symbol references]' \ '-compressdwarf[compress DWARF if possible]' \ '-cpuprofile[write cpu profile to file]:file:_files' \ '-d[disable dynamic executable]' \ '-debugnosplit[dump nosplit call graph]' \ '-debugtextsize[debug text section max size]:size' \ '-debugtramp[debug trampolines]:num' \ '-extar[archive program for buildmode=c-archive]:program' \ '-extld[use linker when linking in external mode]:linker' \ '-extldflags[pass flags to external linker]:flags' \ '-f[ignore version mismatch]' \ '-fipso[write fips module to file]:file:_files' \ '-funcalign[set function align to N bytes]:byte' \ '-g[disable go package data checks]' \ '-h[halt on error]' \ '-importcfg[read import configuration from file]:config:_files' \ '-installsuffix[set package directory suffix]:suffix' \ '-k[set field tracking symbol]:symbol' \ '-libgcc[compiler support lib for internal linking; use "none" to disable]:lib:(none)' \ '-linkmode[set link mode]:mode:(internal external auto)' \ '-linkshared[link against installed Go shared libraries]' \ '-memprofile[write memory profile to file]:file' \ '-memprofilerate[set runtime.MemProfileRate to rate]:rate' \ '-msan[enable MSan interface]' \ '-o[write output to file]:file:_files' \ '-pluginpath[full path name for plugin]:path:_path_files -/' \ '-pruneweakmap[prune weak mapinit refs]' \ '-r[set the ELF dynamic linker search path to dir1:dir2:...]:path:_path_files -/' \ '-race[enable race detector]' \ '-randlayout[randomize function layout]' \ '-s[disable symbol table]' \ '-strictdups[sanity check duplicate symbol contents during object file reading]:level:((1\:"warn" 2\:"err"))' \ '-tmpdir[use directory for temporary files]:directory:_path_files -/' \ '-v[print link trace]' \ '-w[disable DWARF generation]' \ '*:files:_files' ;; (objdump) _arguments \ '-s[only dump symbols matching this regexp]:regexp' \ '*:files:_files' ;; (pack) local -a pack_ops=( 'c:append files to a new archive' 'p:print files from the archive' 'r:append files to the archive' 't:list files from the archive' 'x:extract files from the archive' ) _arguments \ '1:ops:{_describe "ops" pack_ops}' \ '::verbose:(v)' \ ':files:_files' ;; (pprof) _arguments \ '-callgrind[outputs a graph in callgrind format]' \ '-comments[output all profile comments]' \ '-disasm=[output annotated assembly]:p' \ '-dot[outputs a graph in DOT format]' \ '-eog[visualize graph through eog]' \ '-evince[visualize graph through evince]' \ '-gif[outputs a graph image in GIF format]' \ '-gv[visualize graph through gv]' \ '-kcachegrind[visualize report in KCachegrind]' \ '-list=[output annotated source for functions matching regexp]:p' \ '-pdf[outputs a graph in PDF format]' \ '-peek=[output callers/callees of functions matching regexp]:p' \ '-png[outputs a graph image in PNG format]' \ '-proto[outputs the profile in compressed protobuf format]' \ '-ps[outputs a graph in PS format]' \ '-raw[outputs a text representation of the raw profile]' \ '-svg[outputs a graph in SVG format]' \ '-tags[outputs all tags in the profile]' \ '-text[outputs top entries in text form]' \ '-top[outputs top entries in text form]' \ '-topproto[outputs top entries in compresses protobuf format]' \ '-traces[outputs all profile samples in text form]' \ '-tree[outputs a text rendering of call graph]' \ '-web[visualize graph through web browser]' \ '-weblist=[output annotated source in HTML]:p' \ '-call_tree[generate a context-sensitive call tree]' \ '-compact_labels[show minimal headers]' \ '-divide_by=[scale all samples by dividing them by f]:f' \ '-drop_negative[ignore negative differences]' \ '-edgefraction=[hide edges below *total]:f' \ '-focus=[restricts to paths going through a node matching regexp]:r' \ '-hide=[skips nodes matching regexp]:regexp' \ '-ignore=[skips paths going through any nodes matching regexp]:r' \ '-intel_syntax[show assembly in Intel syntax]' \ '-mean[average sample value over first value]' \ '-nodecount=[max number of nodes to show]:n' \ '-nodefraction=[hide nodes below *total]:f' \ '-noinlines[ignore inlines]' \ '-normalize[scales profile based on the base profile]' \ '-output=[generate output on file f (stdout by default)]:f' \ '-prune_from[drops any functions below the matched frame]' \ '-relative_percentages[show percentages relative to focused subgraph]' \ '-sample_index[index of sample value to display]' \ '-show=[only show nodes matching regexp]:regexp' \ '-show-from=[drops functions above the highest matched frame]:regexp' \ '-show-columns[show column numbers at the source code line level]' \ '-source_path=[search path for source files]:path:_files -/' \ '-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \ '-taghide=[skip tags matching this regexp]:regexp' \ '-tagignore=[discard samples tagged with key:value matching regexp]:regexp' \ '-tagleaf[add pseudo stack frames for labels key/value pairs at the callstack leaf]' \ '-tagroot[add pseudo stack frames for labels key/value pairs at the callstack root]' \ '-trim[honor nodefraction/edgefraction/nodecount defaults]' \ '-trim_path[path to trim from source paths before search]:path:_files -/' \ '-unit=[convert all samples to unit u for display]:u' \ '-functions[report at function level (default)]' \ '-filefunctions[aggregate at the file function level]' \ '-files[report at source file level]' \ '-lines[report at source line level]' \ '-addresses[report at address level]' \ '-cum[sort by cumulative data]' \ '-flat[sort entries based on own weight]' \ '-seconds=[length of time for dynamic profiles]:n' \ '-timeout=[timeout in seconds for profile collection]:seconds' \ '-buildid=[override build id for main binary in profile]:id' \ '-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:__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' \ '-http=[provide web interface at host:port]:host_port' \ '-no_browser[skip opening a browser for the interactive web UI]' \ '-tools=[search path for object tools]:path:_files -/' \ '-inuse_space[display in-use memory size]' \ '-inuse_objects[display in-use object counts]' \ '-alloc_space[display allocated memory size]' \ '-alloc_objects[display allocated object counts]' \ '-total_delay[display total delay at each region]' \ '-contentions[display number of delays at each region]' \ '-mean_delay[display mean delay at each region]' \ '-help[help message]' \ '*:files:_files' ;; (trace) local -a trace_types=( "net:network blocking profile" "sync:synchronization blocking profile" "syscall:syscall blocking profile" "scheduler:latency profile" ) _arguments \ '-pprof=[profile type]:type:{_describe "type" trace_types}' \ '-http=[HTTP service address]:addr' \ '-d=[print debug info such as parsed events]:level:((1\:"high-level" 2\:"low-level"))' \ '*:files:_files' ;; (vet) _arguments \ '(- *)-V[print version and exit]'\ '-appends[enable appends analysis]' \ '-asmdecl[check assembly against Go declarations]' \ '-assign[check for useless assignments]' \ '-atomic[check for common mistaken usages of the sync/atomic]' \ '-bools[enable bools analysis]' \ '-buildtag[check that +build tags are valid]' \ '-cgocall[enable cgocall analysis]' \ '-composites[check that composite literals used field-keyed elements]' \ '-compositewhitelist[use composite white list]' \ '-copylocks[check that locks are not passed by value]' \ '-defers[enable defers analysis]' \ '-directive[enable directive analysis]' \ '-errorsas[enable errorsas analysis]' \ '-flags[print analysis flags in JSON]' \ '-framepointer[enable framepointer analysis]' \ '-httpresponse[enable httpresponse analysis]' \ '-ifaceassert[enable ifaceassert analysis]' \ '-json[emit JSON output]' \ '-loopclosure[enable loopclosure analysis]' \ '-lostcancel[enable lostcancel analysis]' \ '-methods[check that canonically named methods are canonically defined]' \ '-nilfunc[check for comparisons between functions and nil]' \ '-printf[check printf-like invocations]' \ '-printfuncs[print function names to check]:string' \ '-rangeloops[check that range loop variables are used correctly]' \ '-shift[enable shift analysis]' \ '-sigchanyzer[enable sigchanyzer analysis]' \ '-slog[enable slog analysis]' \ '-stdmethods[enable stdmethods analysis]' \ '-stringintconv[enable stringintconv analysis]' \ '-structtags[check that struct field tags have canonical format]' \ '-tests[enable tests analysis]' \ '-timeformat[enable time format analysis]' \ '-unmarshal[enable unmarshal analysis]' \ '-unreachable[check for unreachable code]' \ '-unsafeptr[check for misuse of unsafe.Pointer]' \ '-unusedfuncs[list of functions whose results must be used]:string' \ '-unusedresult[check for unused result of calls to functions in -unusedfuncs]' \ '-unusedstringmethods[list of methods whose results must be used]:string' \ '*:files:_files' ;; esac ;; esac ;; (version) _arguments \ '-m[print each executable embedded module version information]' \ '-v[report unrecognized files]' \ '-json[print each executable embedded module version in JSON format]' \ '*:files:_files' ;; (vet) _arguments \ '-n[print commands that would be executed]' \ '-x[prints commands as they are executed]' \ '-vettool[set a different analysis tool with alternative or additional checks]:prog:_files' \ ${build_flags[@]} \ '*:importpaths:__go_packages' ;; (work) local -a work_commands=( 'edit:edit go.work from tools or scripts' 'init:initialize workspace file' 'sync:sync workspace build list to modules' 'use:add modules to workspace file' 'vendor:make vendored copy of dependencies' ) _arguments \ "1: :{_describe 'command' work_commands}" \ '*:: :->args' case $state in (args) case $words[1] in (edit) _arguments \ ${edit_flags[@]} \ '*-use[add use directive from the go.work set of module directories]' \ '*-dropuse[drop use directive from the go.work set of module directories]' \ ':go.work:_path_files -g "go.work"' ;; (init) _arguments \ '*:directory: _path_files -/' ;; (use) _arguments \ '-r[searches recursively for modules in the argumentdirectories]' \ '*:directory: _path_files -/' ;; (vendor) _arguments \ '-v[print the names of vendored modules and packages to standard error]' \ '-e[attempt to proceed despite errors encountered while loading packages]' \ '-o[create the vendor directory at the given path instead of vendor]:outdir:_path_files -/' ;; esac ;; esac ;; (help) local -a topics=( 'buildconstraint:build constraints' 'buildmode:build modes' 'c:calling between Go and C' 'cache:build and test caching' 'environment:environment variables' 'filetype:file types' 'go.mod:the go.mod file' 'gopath:GOPATH environment variable' 'goproxy:module proxy protocol' 'importpath:import path syntax' 'modules:modules, module versions, and more' 'module-auth:module authentication using go.sum' 'packages:package lists and patterns' 'private:configuration for downloading non-public code' 'testflag:testing flags' 'testfunc:testing functions' 'vcs:controlling version control with GOVCS' ) case "$words[2]" in (mod) _arguments "2: :{_describe 'command' mod_commands}" ;; (*) _arguments "1: :{_describe 'command' commands -- topics}" ;; esac ;; esac ;; esac # 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 ================================================ FILE: src/_gpgconf ================================================ #compdef gpgconf # Copyright (c) 2021 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: # Completions for gpgconf (configuration utility provided with GnuPG 2.4.4 # ) # # Authors: # * "score" https://keybase.io/score_under _gpgconf_component() { local values=( "${(@f)$(gpgconf --list-components | awk -F: '{printf "%s[%s]\n", $1, $2}')}" ) if [ "${action[2]}" = all ]; then values+=('all[All daemon components]') fi _values 'component' "${(o)values[@]}" } _arguments \ '--help[print help text]' \ '--list-components[list all components]' \ '--check-programs[check all programs]' \ '--apply-defaults[apply global default values]' \ '--list-dirs[get the configuration directories for gpgconf]' \ '--list-config[list global configuration file]' \ '--check-config[check global configuration file]' \ '--query-swdb[query the software version database]' \ '--reload[reload all or a given component]:component:_gpgconf_component all' \ '--launch[launch a given component]:component:_gpgconf_component all' \ '--kill[kill a given component]:component:_gpgconf_component all' \ '--create-socketdir[create a directory for sockets below /run/user or /var/run/user]' \ '--remove-socketdir[remove a directory created with command --create-socketdir]' \ '--list-options[list options]:component:_gpgconf_component' \ '--change-options[change options]:component:_gpgconf_component' \ '--check-options[check options]:component:_gpgconf_component' \ '--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \ '--status-fd[write status info to the specified file descriptor]:file descriptor' \ '--homedir[specify an alternative gnupg configuration home directory]:directory:_directories' \ '--chuid[change the current user to uid which may either be a number or a name]:uid' \ '(--lock --unlock)--unlock[remove a stale lock file hold for file]:name' \ '(--lock --unlock)--lock[name of file protected by the lock]:name' \ '(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \ '(-v --verbose)'{-v,--verbose}'[verbose]' \ '(-q --quiet)'{-q,--quiet}'[quiet]' \ '(-n --dry-run)'{-n,--dry-run}'[do not make any changes]' \ '(-r --runtime)'{-r,--runtime}'[activate changes at runtime, if possible]' # 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 ================================================ FILE: src/_grpcurl ================================================ #compdef grpcurl # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 grpcurl v1.8.7. (https://github.com/fullstorydev/grpcurl) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '*-H[Additional headers in "name:value" format]:header' \ '-allow-unknown-fields[If "json" format is used, allows unknown fields to be present]' \ '-authority[The authoritative name of the remote server]:authority' \ '-cacert[File containing trusted root certificates for the server]: :_files' \ '-cert[File containing client certificate(public key) to present to the server]: :_files' \ '-connect-timeout[The maximum time, in seconds, to wait for connection to be established]:seconds' \ '*-d[Data for request contents]:data' \ '-emit-defaults[Emit default values for JSON-encoded responses]' \ '-expand-headers[Headers may use "\${NAME}" syntax to reference environment variables]' \ '-format[The format of request data]: :(json text)' \ '-format-error[When a non-zero status is returned, format the response using the value set by the -format flag]' \ '*-import-path[The path to a directory from which proto sources can be imported]: :_files -/' \ '-insecure[Skip server certificate and domain verification]' \ '-keepalive-time[The maximum idle time in seconds]:seconds' \ '-key[File containing client private key, to present to the server]: :_files' \ '-max-msg-sz[The maximum encoded size of a response message in bytes, that grpcurl will accept]:bytes' \ '-max-time[The maximum total time the operation can take, in seconds]:seconds' \ '-msg-template[When describing messages, show a template of input data]' \ '-plaintext[Use plain-text HTTP/2 when connecting to server(no TLS)]' \ '*-proto[The name of a proto source file]: :_files' \ '*-protoset[The name of a file containing an encoded FileDescriptorSet]: :_files' \ '-protoset-out[The name of a file to be written that will contain a FileDescriptorSet]: :_files' \ '*-reflect-header[Additional reflection headers in "name:value" format]:header' \ '*-rpc-header[Additional RPC headers in "name:value" format]' \ '-servername[Override server name when validating TLS certificate]' \ '-unix[Indicates that the server address is the path to a Unix domain socket]' \ '-use-reflection[Server reflection will be used to determine the RPC schema]' \ '-user-agent[The specified value will be added to the User-Agent header set by the grpc-go library]:user_agent' \ '-v[Enable verbose output]' \ '(- *)-version[Print version]' \ '-vv[Enable very verbose output]' \ '(- *)-h[Show help message]' \ '*:: :_files' # 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 ================================================ FILE: src/_gtk-launch ================================================ #compdef gtk-launch gtk4-launch # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 gtk-launch on gtk+-3.24.37, gtk4-launch-4.10.4 # (https://www.gtk.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * ncaq # # ------------------------------------------------------------------------------ _gtk-launch() { local ret=1 if [[ $service == "gtk-launch" ]]; then _arguments -S -A "-*" \ '(- *)'{-h,--help}'[Show help options]' \ '(- *)'{-v,--version}'[Show program version]' \ '(- *)--help-all[Show all help options]' \ '(- *)--help-gtk[Show GTK+ Options]' \ '(- *)--display=[X display to use]:display:_x_display' \ '--class=[Program class as used by the window manager]:class' \ '--name=[Program name as used by the window manager]:name' \ '--gtk-module=[Load additional GTK+ modules]:module' \ '--g-fatal-warnings[Make all warnings fatal]' \ '1: :_gtk-launch-apps' \ '*:: :_files' && ret=0 else # gtk4-launch _arguments -S -A "-*" \ '(- *)'{-h,--help}'[Show help options]' \ '(- *)'{-v,--version}'[Show program version]' \ '1: :_gtk-launch-apps' \ '*:: :_files' && ret=0 fi return ret } (( $+functions[_gtk-launch-apps] )) || _gtk-launch-apps() { local -a apps=(/usr/share/applications/*.desktop(:r:t)) _values 'applications' $apps } _gtk-launch "$@" # 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 ================================================ FILE: src/_hello ================================================ #compdef hello # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for GNU hello (https://www.gnu.org/software/hello/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Wu Zhenyu # # ------------------------------------------------------------------------------ _arguments -s \ '(- *)'{-h,--help}'[display this help and exit]' \ '(- *)'{-v,--version}'[display version information and exit]' \ {-t,--traditional}'[use traditional greeting]' \ {-g,--greeting=}'[use TEXT as the greeting message]:TEXT' # 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 ================================================ FILE: src/_hledger ================================================ #compdef hledger # ------------------------------------------------------------------------------ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for hledger 1.10 ( https://hledger.org/ ) # Last updated: 07.08.2018 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Valodim ( https://github.com/Valodim ) # * fdw ( https://github.com/fdw ) # # ------------------------------------------------------------------------------ # Notes # ----- # # account completion depends on availability of a ~/.hledger.journal file # # ------------------------------------------------------------------------------ local curcontext="$curcontext" curstate state line expl grp cmd ret=1 typeset -a args typeset -A opt_args args=( '(- *)'{-h,--help}'[print help information]' '(-f --file)'{-f,--file}'=[use a different input file]:input file:_files' '--rules-file=[CSV conversion rules file]:rules file:_files' '--alias=[display accounts named OLD as NEW]:alias specification' '--anon=[anonymize accounts and payees]' '(-b --begin)'{-b,--begin}'=[include postings/txns on or after this date]:date' '(-e --end)'{-e,--end}'=[include postings/txns before this date]:date' '(-D --daily)'{-D,--daily}'[multiperiod/multicolumn report by day]' '(-W --weekly)'{-W,--weekly}'[multiperiod/multicolumn report by week]' '(-M --monthly)'{-M,--monthly}'[multiperiod/multicolumn report by month]' '(-Q --quarterly)'{-Q,--quarterly}'[multiperiod/multicolumn report by quarter]' '(-Y --yearly)'{-Y,--yearly}'[multiperiod/multicolumn report by year]' '(-p --period)'{-p,--period}'=[set start date, end date, and/or reporting interval all at once]' '(-C --cleared)'{-C,--cleared}'[include only cleared postings/txns]' '(-U --uncleared)'{-U,--uncleared}'[include only uncleared postings/txns]' '(-R --real)'{-R,--real}'[include only non-virtual postings]' '(--depth)--depth=[hide accounts/postings deeper than N]:depth' '(-E --empty)'{-E,--empty}'[show empty/zero things which are normally omitted]' '(-B --cost)'{-B,--cost}'[show amounts in their cost price'\''s commodity]' '(-V --value)'{-V,--value}'[converts reported amounts to the current market value]' '(-I --ignore-assertions)'{-I,--ignore-assertions}'[ignore any failing balance assertions]' '--forecast=[apply periodic transaction rules to generate future transactions]' ) _arguments -C "$args[@]" -A "-*" \ '(- *)--version[print version information]' \ '--debug[show debug output]' \ '1: :->cmds' \ '*:: :->args' && ret=0 while (( $#state )); do curstate=$state shift state case $curstate in cmds) typeset -a cmds cmds=( 'accounts:show account names (a)' 'activity:show an ascii barchart of posting counts per interval' 'add:prompt for transactions and add them to the journal' 'balance:show accounts and balances (b, bal)' 'balancesheet:show a balance sheet (bs)' 'balancesheetequity:like balancesheet, but also reports equity' 'cashflow:show a cashflow statement (cf)' 'check-dates:check that transactions are sorted by increasing date' 'check-dupes:report account names having the same leaf but different prefixes' 'close:print closing/opening transactions that bring some or all account balances to zero and back' 'help:show any of the hledger manuals' 'import:read new transactions added to each file since last run, and add them to the main journal file' 'incomestatement:show an income statement (is)' 'prices:print market price directives from the journal' 'print:show transaction entries (p, txns)' 'print-unique:print transactions which do not reuse an already-seen description' 'register:show postings and running total (r, reg)' 'register-patch:print the one posting whose transaction description is closest to the description' 'rewrite:print all transactions, adding custom postings to the matched ones' 'stats:show some journal statistics' 'tags:list all the tag names used in the journal' 'test:run built-in unit tests' ) _describe 'subcommands' cmds && ret=0 ;; args) : $words local cmd=$words[1] (( $+cmd )) || return 1 # curcontext="${curcontext%:*:*}:$service-$cmd:" case $cmd in accounts) args=( '(--declared)--declared[show account names declared with account directives]' '(--used)--used[show account names posted to by transactions]' '(--tree)--tree[show accounts as a tree (default in simple reports)]' '(--flat)--flat[show accounts as a list (default in multicolumn)]' '(--drop)--drop=[flat mode, omit N leading account name parts]:drop n' ) ;; activity) ;; add) args=( '(--no-new-accounts)--no-new-accounts=[do not allow creating new accounts]' ) ;; bal|balance) args+=( '(--change)--change[show balance change in each period (default)]' '(--cumulative)--cumulative[show balance change accumulated across periods]' '(-H --historical)'{-H,--historical}'[show historical ending balance in each period]' '(--tree)--tree[show accounts as a tree (default in simple reports)]' '(--flat)--flat[show accounts as a list (default in multicolumn)]' '(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]' '(-T --row-total)'{-T,--row-total}'[show a row total column]' '(-N --no-total)'{-N,--no-total}'[do not show the final total row]' '(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n' '(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]' '(--format)--format=[in tree mode, use this custom line format]:custom line format' '(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format' '(-o --output-file)'{-o,--output-file}'=[write output to file]:file' '(--pretty-tables)--pretty-tables[use unicode to display prettier tables]' '(--sort-amount)--sort-amount[sort by amount instead of account code/name]' '(--invert)--invert[display all amounts with reversed sign]' '(--budget)--budget[show performance compared to budget goals]' '(--show-unbudgeted)--show-unbudgeted[with --budget, show unbudgeted accounts also]' ) ;; bl|balancesheet|balancesheetequity) args+=( '(--change)--change[show balance change in each period (default)]' '(--cumulative)--cumulative[show balance change accumulated across periods]' '(-H --historical)'{-H,--historical}'[show historical ending balance in each period]' '(--tree)--tree[show accounts as a tree (default in simple reports)]' '(--flat)--flat[show accounts as a list (default in multicolumn)]' '(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]' '(-T --row-total)'{-T,--row-total}'[show a row total column]' '(-N --no-total)'{-N,--no-total}'[do not show the final total row]' '(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n' '(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]' '(--format)--format=[in tree mode, use this custom line format]:custom line format' '(--sort-amount)--sort-amount[sort by amount instead of account code/name]' ) ;; cashflow|cf|balancesheet|bs|incomestatement|is) args+=( '(--change)--change[show balance change in each period (default)]' '(--cumulative)--cumulative[show balance change accumulated across periods]' '(-H --historical)'{-H,--historical}'[show historical ending balance in each period]' '(--tree)--tree[show accounts as a tree (default in simple reports)]' '(--flat)--flat[show accounts as a list (default in multicolumn)]' '(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]' '(-T --row-total)'{-T,--row-total}'[show a row total column]' '(-N --no-total)'{-N,--no-total}'[do not show the final total row]' '(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n' '(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]' '(--format)--format=[in tree mode, use this custom line format]:custom line format' '(--sort-amount)--sort-amount[sort by amount instead of account code/name]' ) ;; import) args=( '(--dry-run)--dry-run[just show the transactions to be imported]' ) ;; is|incomestatement) args+=( '(--change)--change[show balance change in each period (default)]' '(--cumulative)--cumulative[show balance change accumulated across periods]' '(-H --historical)'{-H,--historical}'[show historical ending balance in each period]' '(--tree)--tree[show accounts as a tree (default in simple reports)]' '(--flat)--flat[show accounts as a list (default in multicolumn)]' '(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]' '(-T --row-total)'{-T,--row-total}'[show a row total column]' '(-N --no-total)'{-N,--no-total}'[do not show the final total row]' '(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n' '(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]' '(--format)--format=[in tree mode, use this custom line format]:custom line format' '(--sort-amount)--sort-amount[sort by amount instead of account code/name]' ) ;; print) args=( '(-m --match)'{-m,--match}'[show the transaction whose description is most similar]:string' '(--new)--new[show only newer-dated transactions added in each file since last run]' '(-x --explicit)'{-x,--explicit}'[show all amounts explicitly]' '(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format' '(-o --output-file)'{-o,--output-file}'=[write output to file]:file' ) ;; register|reg) args+=( '(--cumulative)--cumulative[show balance change accumulated across periods]' '(-H --historical)'{-H,--historical}'[show historical ending balance in each period]' '(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]' '(-r --related)'{-r,--related}'[show postings'\'' siblings instead]' '(-w --width)'{-w,--width}'=[set output width to 120, or N]:width (default 80)' '(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format' '(-o --output-file)'{-o,--output-file}'=[write output to file]:file' ) ;; stats) args=( '(-o --output-file)'{-o,--output-file}'=[write output to file]:file' ) ;; # fallback to _default *) _arguments -C -A "-*" "$args[@]" \ '*: :_default' && ret=0 continue esac _arguments -C -A "-*" "$args[@]" \ '*:query patterns:->query' && ret=0 ;; query) local -a accs keywords keywords=( 'acct\::match account names' 'code\::match by transaction code' 'desc\::match transaction descriptions' 'tag\::match by tag name' 'depth\::match at or above depth' 'status\::match cleared/uncleared transactions' 'real\::match real/virtual transactions' 'empty\::match if amount is/is not zero' 'amt\::match transaction amount' 'cur\::match by currency' ) if compset -P 'amt:'; then _message 'match amount (<, <=, >, >=, add sign for non-absolute match)' && ret=0 continue fi if compset -P '(#b)(code|desc|tag|depth|status|real|empty):'; then _message "'$match[1]' parameter" && ret=0 continue fi accs=( ${(f)"$(_call_program hledger hledger accounts $PREFIX 2>/dev/null)"} ) if (( $? )); then _message "error fetching accounts from hledger" fi # decided against partial matching here. these lines can # be uncommented to complete subaccounts hierarchically # (add -S '' -q to the compadd below, too) # if compset -P '(#b)(*):'; then # accs=( ${(M)accs:#$match[1]:*} ) # accs=( ${accs#$IPREFIX} ) # fi # accs=( ${accs%%:*} ) _wanted accounts expl "accounts" compadd -a accs && ret=0 _describe "matcher keywords" keywords -S '' && ret=0 # not is special, it doesn't need the -S '' keywords=( 'not:negate expression' ) _describe "matcher keywords" keywords && ret=0 ;; esac done return ret # 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 ================================================ FILE: src/_httpie ================================================ #compdef http https=http # ------------------------------------------------------------------------------ # 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 httpie 3.2.2 (https://httpie.io/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Akira Maeda # * Valodim # * Claus Klingberg # * Shohei YOSHIDA # # ------------------------------------------------------------------------------ _httpie_params() { local ret=1 expl # or a url if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then _httpie_urls && ret=0 # regular param, if we already have a url elif (( CURRENT > NORMARG )); then # if the suffix is precisely : this is shorthand for a header if [[ -prefix ':' ]]; then PREFIX= SUFFIX=: fi # if we are in front of a : (possibly due to the PREFIX move before) if [[ -suffix ':' ]]; then # this is rather buggy with normal tab behavior : compstate[insert]=menu _wanted http_header expl 'HTTP Header' \ compadd -s ':' -S '' -- Content-Type Cookie && return 0 fi # ignore all prefix stuff compset -P '(#b)([^:@=]#)' local name=$match[1] if compset -P '='; then _message "$name data field value" elif compset -P '@'; then _files elif compset -P ':=@'; then _files elif compset -P ':='; then _message "$name raw json data" elif compset -P '=='; then _message "$name url parameter value" elif compset -P ':'; then _message "$name header content" else typeset -a ops ops=( '=:data field' '\::header' '==:request parameter' '@:data file field' '\:=:raw json field' '\:=@:raw json field file path' ) _describe -t httpparams "parameter types" ops -Q -S '' fi ret=0 fi # first arg may be a request method (( CURRENT == NORMARG )) && _wanted http_method expl 'Request Method' \ compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0 return $ret } _httpie_urls() { local ret=1 if ! [[ -prefix [-+.a-z0-9]#:// ]]; then local expl compset -S '[^:/]*' && compstate[to_end]='' _wanted url-schemas expl 'URL schema' compadd -S '' http:// https:// && ret=0 else _urls && ret=0 fi return $ret } _httpie_printflags() { local ret=1 # not sure why this is necessary, but it will complete "-pH" style without it [[ $IPREFIX == "-p" ]] && IPREFIX+=" " compset -P '(#b)([a-zA-Z]#)' local -a flags [[ $match[1] != *H* ]] && flags+=( "H:request headers" ) [[ $match[1] != *B* ]] && flags+=( "B:request body" ) [[ $match[1] != *h* ]] && flags+=( "h:response headers" ) [[ $match[1] != *b* ]] && flags+=( "b:response body" ) _describe -t printflags "print flags" flags -S '' && ret=0 return $ret } _httpie_styles() { local -a styles=(abap algol algol_nu arduino auto autumn borland bw colorful default dracula emacs friendly friendly_grayscale fruity github-dark gruvbox-dark gruvbox-light igor inkpot lilypond lovelace manni material monokai murphy native nord nord-darker one-dark paraiso-dark paraiso-light pastie perldoc pie pie-dark pie-light rainbow_dash rrt sas solarized solarized-dark solarized-light stata stata-dark stata-light tango trac vim vs xcode zenburn) _describe -t styles 'style' styles } integer NORMARG _arguments -n -C -s \ '(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object]' \ '(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields]' \ '--multipart[Similar to --form, but always sends a multipart/form-data request]' \ '--boundary=[Specify a custom boundary string for multipart/form-data requests]' \ '--raw=[This option allows you to pass raw request data without extra processing]' \ '(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \ '--pretty=[Controls output processing]:output format:(all colors format none)' \ '(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:_httpie_styles' \ '--unsorted[Disables all sorting while formatting output]' \ '--sorted[Re-enables all sorting options while formatting output]' \ '--response-charset=[Override the response encoding for terminal display purposes]:encoding' \ '--response-mime=[Override the response mime type for coloring and formatting for the terminal]:mine' \ '--format-options=[Controls output formatting]:format' \ '(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \ '(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response]' \ '(-p -h --headers)'{-h,--headers}'[Print only the response headers]' \ '(-p -m --meta)'{-m,--meta}'[Print only the response metadata]' \ '(-p -b --body)'{-b,--body}'[Print only the response body]' \ '--all[By default, only the final request/response is shown]' \ '(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`]' \ '(-o --output)'{-o,--output}'=[Save output to FILE]:output file:_files' \ '(-d --download)'{-d,--download}'=[Do not print the response body to stdout]' \ '(-c --continue)'{-c,--continue}'[Resume an interrupted download]' \ '(-q --quiet)'{-q,--quiet}'[Do not print to stdout or stderr, except for errors and warnings when provided once]' \ '(--session-read-only)--session=[Create, or reuse and update a session]:session name (or path)' \ '(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange]:session name (or path)' \ '(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \ '--auth-type=[The authentication mechanism to be used. Defaults to "basic"]:AUTH-TYPE:(basic digest bearer)' \ '--ignore-netrc[Ignore credentials from .netrc]' \ '--offline[Build the request and print it but do not actually send it]' \ '--proxy=[String mapping protocol to the URL of the proxy]:PROXY' \ '(-F --follow)'{-F,--follow}'[Allow full redirects]' \ '--max-redirects=[A limit of redirects]:number:' \ '--max-headers=[The maximum number of response headers to be read]:number:' \ "--verify=[Enable or disable verification of ssl certificates]:verify certificate:(yes no)" \ '--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \ '--ciphers=[A string in the OpenSSL cipher list format]:ciphers' \ '--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \ '--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \ '--cert-key-pass=[The passphrase to be used to with the given private key]' \ '--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback)]:timeout (seconds)' \ '--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one]' \ '--path-as-is[Bypass dot segment URL squashing]' \ '--chunked[Enable streaming via chunked transfer encoding]' \ '(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin]' \ '(- *)--help[show help message]' \ '(- *)--manual[show the full manual]' \ "(- *)--version[show program's version number and exit]" \ '--traceback[Prints exception traceback should one occur]' \ '--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \ '--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself]' \ '*:args:_httpie_params' && 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 ================================================ FILE: src/_ibus ================================================ #compdef ibus # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 ibus 1.5.27 (https://github.com/ibus/ibus). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Tomo Kazahaya # # ------------------------------------------------------------------------------ # The completion of "ibus emoji --lang=" depends on _language_codes from # https://github.com/zsh-users/zsh-completions. local context state state_descr line typeset -A opt_args local curcontext=$curcontext _arguments -C \ ":command:(($(ibus help|sed -ne 's/^ \(\S\+\) \+\(.*\)/"\1\\:\2"/p')))" \ '*:: :->args' \ && return case $state in args) case $line[1] in (engine) _arguments \ ":engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \ && return ;; (start|restart) _arguments \ '--type=[start or restart daemon type with direct or systemd type]: :(direct systemd)' \ '--file=[start or restart daemon with SYSTEMD_SERVICE file]: :_files' \ '--verbose[Show debug message]' \ '(- *)--help[Show help message]' \ && return ;; (read-cache) _arguments \ '--system[show the content of the system registry cache]' \ '--file=[custom registry cache to show]:registry cache:_files' \ '(- *)--help[Show help message]' \ && return ;; (write-cache) _arguments \ '--system[save the system registry cache]' \ '--file=[custom registry cache to save]:registry cache:_files' \ '(- *)--help[Show help message]' \ && return ;; (emoji) _arguments \ '--font=[emoji font]:emoji font: ' \ '--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \ '--partial-match[match annotations with a partial string]' \ '(- *)--help[Show help message]' \ && return ;; (im-module) _arguments \ '--type=[Set im-module TYPE]: :(gtk2 gtk3 gtk4)' \ '(- *)--help[Show help message]' \ && return ;; esac ;; esac return 1 # 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 ================================================ FILE: src/_include-what-you-use ================================================ #compdef include-what-you-use iwyu # Copyright 2018 CERN for the benefit of the LHCb Collaboration. # All rights reserved. # # Developed by: # # CERN LBC group # # CERN # # https://home.web.cern.ch/ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # with 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: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimers. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimers in the # documentation and/or other materials provided with the distribution. # # * Neither the names of the LBC group, CERN, nor the names of its # contributors may be used to endorse or promote products derived from # this Software without specific prior written permission. # # 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 # CONTRIBUTORS 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 WITH # THE SOFTWARE. # # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for include-what-you-use 0.19 (https://github.com/include-what-you-use/include-what-you-use). # # ------------------------------------------------------------------------------ # TODO: # - prevent _iwyu_opts from running once the first clang option got passed _iwyu_opts() { _arguments \ '--check_also=[print iwyu-violation info for files matching the given glob pattern]:glob pattern:' \ '--keep=[tells iwyu to always keep these includes]:glob pattern' \ '*'"--mapping_file=[iwyu mapping file]:iwyu mapping file:_path_files -g '*(/) *.imp'" \ "--no_default_mappings[do not add iwyu's default mappings]" \ '--pch_in_code[mark the first include in a translation unit as a precompiled header]' \ '--prefix_header_includes=[what to do with command line includes]:command line include treatment:(add keep remove)' \ "--transitive_includes_only[do not suggest that a file add headers that aren't already visible]" \ '--max_line_length=[maximum line length for includes]:a number:' \ '--comment_style=[set verbosity of "why" comments to]:comment style:(none short long)' \ '--no_comments[do not add "why" comments]' \ '--no_fwd_decls[do not use forward declarations]' \ '--verbose=[the higher the level, the more output]:a number:' \ '--quoted_includes_first[when sorting includes, place quoted ones first]' \ '--cxx17ns[suggests the more concise syntax introduced in C++17]' \ '--error=-[exit with N(default: 1) for iwyu violations]::exit code' \ '--error_always=-[always exit with N (default: 1)]::exit code' \ '--debug=[debug flags]:flag' \ '--regex=[use specified regex dialect in iwyu]:dialect:(llvm ecmascript)' \ '*: :_files' } _alternative \ 'iwyu:iwyu_option:_iwyu_opts' \ 'gcc:gcc_option:_gcc' \ # 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 ================================================ FILE: src/_inxi ================================================ #compdef inxi # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script of inxi 3.3.21-00 (https://smxi.org/docs/inxi.htm) # # a full featured CLI system information tool # # ------------------------------------------------------------------------------ # Authors # ------- # # * Oleksii Filonenko # # ------------------------------------------------------------------------------ _inxi() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 local colors=($(seq 0 42)) _arguments -C -s \ '(-A --audio)'{-A,--audio}"[Show Audio/sound card(s) information]" \ '(-b --basic)'{-b,--basic}"[Show basic output, short form]" \ '(-B --battery)'{-B,--battery}"[Show system Battery information]" \ '(-C --cpu)'{-C,--cpu}"[Show full CPU output]" \ '(-d --disk-full --optical)'{-d,--disk-full,--optical}"[Show hard + optical drive info]" \ '(-D --disk)'{-D,--disk}"[Show hard Disk info]" \ '(-E --bluetooth)'{-E,--bluetooth}'[Show bluetooth device data report, if available]' \ '--edid[Full graphics data, triggers -a -G]' \ '(-f --flags)'{-f,--flags}"[Show all CPU flags used]" \ '(-F --full)'{-F,--full}"[Show Full output]" \ '(-G --graphics)'{-G,--graphics}"[Show Graphic card(s) information]" \ '(- *)'{-h,--help}"[Show list of command-line options]" \ '(-i --ip)'{-i,--ip}"[Show WAN IP address and local interfaces]" \ '(-I --info)'{-I,--info}"[Show Information: processes, uptime, etc.]" \ '(-j --swap)'{-j,--swap}'[Swap in use]' \ '(-J --usb)'{-J,--usb}"[Show USB data for attached Hubs and Devices]" \ '(-l --label)'{-l,--label}"[Show partition labels]" \ '(-L --logical)'{-L,--logical}'[Logical devices]' \ '(-m --memory)'{-m,--memory}"[Memory (RAM) data]" \ '(--memory-modules --mm)'{--memory-modules,--mm}'[Memory (RAM) data. Exclude empty module slots]' \ '(--memory-short --ms)'{--memory-short,--ms}'[Memory (RAM) data. Show only short Memory RAM report]' \ '(-M --machine)'{-M,--machine}"[Show Machine data]" \ '(-n --network-advanced)'{-n,--network-advanced}"[Show Advanced Network card information]" \ '(-N --network)'{-N,--network}"[Show Network card(s) information]" \ '(-o --unmounted)'{-o,--unmounted}"[Show unmounted partition information]" \ '(-p --partitions-full)'{-p,--partitions-full}"[Show full Partition information]" \ '(-P --partitions)'{-P,--partitions}"[Show basic Partition information]" \ '(-r --repos)'{-r,--repos}"[Show distro repository data]" \ '(-R --raid)'{-R,--raid}"[Show RAID data]" \ "(- *)"--recommends"[Check inxi dependencies + recommends]" \ '(-s --sensors)'{-s,--sensors}"[Show output from configured sensors]" \ "--slots[Show PCI slots]" \ '(-S --system)'{-S,--system}"[Show System information]" \ '(-t --processes)'{-t+,--processes=}"[Show processes]:processes:((c\:'CPU only' m\:'Memory only' cm\:'CPU+memory'))" \ '(-u --uuid)'{-u,--uuid}"[Show partition UUIDs]" \ "(- *)"{-U,--update}"[Auto-update inxi]" \ "(- *)"{-V,--version}"[Show version of inxi]" \ '(-v --verbosity)'{-v+,--verbosity=}"[Script verbosity levels]:verbosity:_inxi_verbosity" \ '(-w --weather)'{-w,--weather}"[Adds weather line]" \ '(-W --weather-location)'{-W+,--weather-location=}"[Get weather/time for an alternate location]:weather location: " \ "--weather-source=[Change weather data source]: :(1 2 3 4 5 6 7 8 9)" \ "--weather-unit=[Set weather unit]:weather unit:((m\:metric i\:imperial mi\:'metric (imperial)' im\:'imperial (metric)'))" \ "--host[Turns on hostname in System line]" \ "--no-host[Turns off hostname in System line]" \ {-z,--filter}"[Adds security filters]" \ '(--za --filter-all)'{--za,--filter-all}'[Shortcut triggers, -z, --zl, --zu, --zv]' \ '(--zl --filter-label)'{--zl,--filter-label}'[Filter out partition labels in -j, -o, -p, -P, -Sa]' \ '(--zu --filter-uuid)'{--zu,--filter-uuid}'[Filter out partition UUIDs in -j, -o, -p, -P, -Sa]' \ '(--zv --filter-vulnerabilities)'{--zv,--filter-vulnerabilities}'[Filters out Vulnerabilities report in -Ca]' \ '(-Z --no-filter)'{-Z,--no-filter}"[Disable output filters]" \ '(-c --color)'{-c+,--color=}"[Set color scheme]:color:(${colors[*]})" \ "--indent=[Change default wide mode primary indentation width]:integer:(11 12 13 14 15 16 17 18 19 20)" \ "--indents=[Change wrapped mode primary indentation width]:integer:(0 1 2 3 4 5 6 7 8 9 10)" \ "--limit[Limit max IP addresses for -i]:limit (-1 removes the limit): " \ '(--max-wrap --wrap-max)'{--max-wrap,--wrap-max}='[Set maximum width where inxi autowraps line starters]:width' \ "--output[Change data output type]:type:(json screen xml)" \ "--output-file[Path to output file]:output file:->output_file" \ "--partition-sort[Change default sort order of partition output]:order:_inxi_partition_sort" \ '(-y --width)'{-y+,--width=}"[Set width override]:columns (80 minimum): " \ '(-Y --height)'{-Y+,--height=}"[Output height control]:" \ \*{-x,--extra}"[Extra data options]" \ '(-a --admin)'{-a,--admin}"[Admin extra data options]:admin option:->admin" \ "--alt[Bypass a downloader option]:downloader:_inxi_alt" \ '--bt-tool[Force use of given tool for bluetooth report]' \ '(--no-dig --dig)--dig[Overrides configuration item NO_DIG]' \ "--display[Get display data out of X]:\:: " \ "--dmidecode[Force use of dmidecode]" \ "--downloader[Force inxi to use a specific downloader]:downloader:(curl fetch perl wget)" \ '--force[Force use items]:' \ '--hddtemp[Force use of hddtemp for disk temps]' \ '(--no-html-wan --html-wan)--html-wan[Overrides configuration item NO_HTML_WAN]' \ '(--dig --no-dig)--no-dig[Skip dig for WAN IP checks]' \ '--no-doas[Skip internal program use of doas features]' \ '(--no-html-wan --html-wan)--no-html-wan[Skip HTML IP sources for WAN IP checks]' \ "--no-ssl[Skip SSL certificate checks]" \ "--no-sudo[Skip internal program use of sudo features]" \ '--rpm[Force use of disabled package manager counts for packages feature with -rx/-Ix ]' \ '--sensors-default[Removes configuration item SENSORS_USE and SENSORS_EXCLUDE]' \ '--sensors-exclude[Exclude supplied sensor array for -s output]' \ '--sensors-use[Use only supplied sensor array for -s output]' \ "--sleep[Change CPU sleep time]:sleep time (usually in decimals): " \ "--tty[Forces internal IRC flag to off]" \ "--usb-sys[Forces the USB data generator to use /sys as data source]" \ "--usb-tool[Forces the USB data generator to use lsusb as data source]" \ "--wan-ip-url[Force -i to use supplied URL as WAN ip source]:URL: " \ "--wm[Force System item wm to use wmctrl as data source]" \ "--dbg[Debug downloader failures]:level:(1)" \ "--debug[On screen debugger output]:level:(1 2 3 10 11 20 21 22)" \ "--debug-proc[Force debugger to parse /proc directory data when run as root]" \ "--debug-proc-print[Use this to locate file that /proc debugger hangs on]" \ "--debug-no-exit[Skip exit on error when running debugger]" \ "--debug-no-proc[Skip /proc debugging in case of a hang]" \ "--debug-no-sys[Skip /sys debugging in case of a hang]" \ "--debug-sys[Force PowerPC debugger parsing of /sys as sudo/root]" \ "--debug-proc[Force debugger to parse /proc directory data when run as root]" \ "--debug-sys-print[Use this to locate file that /sys debugger hangs on]" \ "--ftp[Set alternate ftp upload location]:FTP URL: " \ && ret=0 case "$state" in (admin) _arguments -s \ '-C[Adds CPU family, model-id, and stepping]' \ '-d[Adds logical and physical block size in bytes]' \ {-p,-P}'[Adds raw partition / filesystem block size]' \ && ret=0 ;; (output_file) _alternative \ "outputs:output file:((print\:'Print to stdout'))" \ "outputs:output file:_files" ;; esac return ret } (( $+functions[_inxi_partition_sort] )) || _inxi_partition_sort() { local -a orders=( 'dev-base:/dev partition identifier' 'fs:partition filesystem' 'id:mount point of partition (default)' 'label:label of partition' 'percent-used:percentage of partition size used' 'size:KiB size of partition' 'uuid:UUID of the partition' 'used:KiB used of partition' ) _describe 'sort order' orders } (( $+functions[_inxi_alt] )) || _inxi_alt() { local -a downloaders=( '40:Perl' '41:Curl' '42:Fetch' '43:Wget' '44:Curl, Fetch, and Wget' ) _describe 'downloader' downloaders } (( $+functions[_inxi_verbosity] )) || _inxi_verbosity() { local -a levels=( '0:Short output, same as: inxi' '1:Basic verbose, -S + basic CPU' '2:Adds -N, -M, -B, same as: inxi -b' '3:Adds -C, -n, -x' '4:Adds -P, -D' '5:Adds -A, -m, -s, -l, -u' '6:Adds -p, -o, -d, --usb, -xx' '7:Adds -i, -xxx' '8:Adds -r, --slots, -tcm, --admin' ) _describe 'script verbosity level' levels } _inxi "$@" # 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 ================================================ FILE: src/_ipcmk ================================================ #compdef ipcmk # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 ipcmk, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - create various IPC resources # # Author: # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments -s \ '(-M --shmem)'{-M,--shmem}'[Create a shared memory segment of size bytes]:size' \ '(-Q --queue)'{-Q,--queue}'[Create a message queue]' \ '(-S --semaphore)'{-S,--semaphore}'[Create a semaphore array with number of elements]:number' \ '(-p --mode)'{-p,--mode}'[Access permissions for the resource]:mode' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' # 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 # Note: This script is useful only on systems with `ipcmk` (typically Linux). # macOS does not include this command. ================================================ FILE: src/_ipcrm ================================================ #compdef ipcrm # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 ipcrm, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - remove System V IPC objects # # Author: # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments -s \ '(-a --all)'{-a,--all}'[Remove all resources]:resource:(shm msg sem)' \ '(-M --shmem-key)'{-M,--shmem-key}'[Remove the shared memory segment created with shemkey]:shmkey' \ '(-m --shmem-id)'{-m,--shmem-id}'[Remove the shared memory segment identified by shmid]:shmid' \ '(-Q --queue-key)'{-Q,--queue-key}'[Remove the message queue created with msgkey]:msgkey' \ '(-q --queue-id)'{-q,--queue-id}'[Remove the message queue identified by msgid]:msgid' \ '(-S --semaphore-key)'{-S,--semaphore-key}'[Remove the semaphore created with semkey]:semkey' \ '(-s --semaphore-id)'{-s,--semaphore-id}'[Remove the semaphore identified by semid]' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \ '1:type:(shm msg sem)' \ '*:id' # 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 ================================================ FILE: src/_ipcs ================================================ #compdef ipcs # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 ipcs, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - show information on IPC facilities # # Author: # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments -s \ '(-i --id)'{-i,--id}'[Show full details on just one resource element identified by id]:id' \ '(- *)'{-h,--help}'[Display help text and exit]' \ '(- *)'{-V,--version}'[Print version and exit]' \ '(-m --shmems)'{-m,--shmems}'[Write information about active shared memory segments]' \ '(-q --queues)'{-q,--queues}'[Write information about active message queues]' \ '(-s --semaphores)'{-s,--semaphores}'[Write information about active semaphore sets]' \ '(-a --all -s --semaphores -q --queues -m --shmems)'{-a,--all}'[Write information about all three resources]' \ '(-c --creator)'{-c,--creator}'[Show creator and owner]' \ '(-l --limits)'{-l,--limits}'[Show resource limits]' \ '(-p --pid)'{-p,--pid}'[Show PIDs of creator and last operator]' \ '(-t --time)'{-t,--time}'[Write time information]' \ '(-u --summary)'{-u,--summary}'[Show status summary]' \ '(--human -b --bytes)'{-b,--bytes}'[Print the sizes in bytes rather than in a human-readable format]' \ '(--human -b --bytes)--human[Print sizes in human-readable format]' # 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 ================================================ FILE: src/_jest ================================================ #compdef jest jest.js # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 Jest 30.1.3 (https://jestjs.io/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shotaro Aoyama (https://github.com/aoyama-val) # # ------------------------------------------------------------------------------ local curcontext=$curcontext state line ret=1 declare -A opt_args local -a notify_modes=("always" "failure" "success" "change" "success-change" "failure-change") _arguments -C -s \ '(- : *)'{-h,--help}'[Show help]' \ '(- : *)'--version'[Show version number]' \ '--all[The opposite of "onlyChanged"]' \ '--automock[Automock all files by default]' \ '(-b --bail)'{-b,--bail}'[Exit the test suite immediately after "n" number of failing tests]' \ '(--cache --no-cache)--cache[Use the transform cache]' \ '(--cache --no-cache)--no-cache[Do not use the transform cache]' \ '--cacheDirectory[The directory where Jest should store its cached dependency information]:dir:_files -/' \ '--changedFilesWithAncestor[Run tests related to the current changes and the changes made in the last commit]' \ '--changedSince[Run tests related to the changes since the provided branch]:string' \ '--ci[Run Jest in continuous integration (CI) mode]' \ '--clearCache[Clear the configured Jest cache directory and then exits]' \ '--clearMocks[Automatically clear mock calls, instances, contexts and results before every test]' \ '--collectCoverageFrom[A glob pattern for collecting coverage info]:string' \ '(--color --colors)'{--color,--colors}'[Force test results output color highlighting (even if stdout is not a TTY)]' \ '(-c --config)'{-c,--config}'[The path to a jest config file specifying how to find and execute tests]:files:_files' \ '(--coverage --collectCoverage)'{--coverage,--collectCoverage}'[Indicate that test coverage information should be collected and reported in the output]' \ '--coverageDirectory[The directory where Jest should output its coverage files]:dir:_files -/' \ '--coveragePathIgnorePatterns[An array of regexp pattern strings that are matched against all file paths before executing the test]:array' \ '--coverageProvider[Select between Babel and V8 to collect coverage]:choices:(babel v8)' \ '--coverageReporters[A list of reporter names that Jest uses when writing coverage reports]:array' \ '--coverageThreshold[A JSON string with which will be used to configure minimum threshold enforcement for coverage results]:string' \ '--debug[Print debugging info about your jest config]' \ '--detectLeaks[**EXPERIMENTAL**: Detect memory leaks in tests]' \ '--detectOpenHandles[Print out remaining open handles preventing Jest from exiting at the end of a test run]' \ '(--env --testEnvironment)'{--env,--testEnvironment}'[The test environment used for all tests]:files:_files' \ '--errorOnDeprecated[Make calling deprecated APIs throw helpful error messages]' \ '(-e --expand)'{-e,--expand}'[Use this flag to show full diffs instead of a patch]' \ '--filter[Path to a module exporting a filtering function]:string' \ '--findRelatedTests[Find related tests for a list of source files that were passed in as arguments]' \ '--forceExit[Force Jest to exit after all tests have completed running]' \ '--globalSetup[The path to a module that runs before All Tests]:files:_files' \ '--globalTeardown[The path to a module that runs after All Tests]:files:_files' \ '--globals[A JSON string with map of global variables that need to be available in all test environments]:string' \ '--haste[A JSON string with map of variables for the haste module system]:string' \ '--ignoreProjects[Ignore the tests of the specified projects]:array' \ '--injectGlobals[Should Jest inject global variables or not]' \ '--json[Print the test results in JSON]' \ '--lastCommit[Run all tests affected by file changes in the last commit made]' \ '--listTests[List all tests Jest will run given the arguments and exits]' \ '--logHeapUsage[Log the heap usage after every test]' \ '--maxConcurrency[Specify the maximum number of tests that are allowed to run concurrently]:number' \ '(-w --maxWorkers)'{-w,--maxWorkers}'[Maximum number of workers will spawn for running tests]:string' \ "--moduleDirectories[Directories to be searched from the requiring module's location]:dir:_files -/" \ '--moduleFileExtensions[An array of file extensions your modules use]:array' \ '--moduleNameMapper[A JSON string with a map from regular expressions to module names]:string' \ '--modulePathIgnorePatterns[An array of ignore module pattern]:array' \ '--modulePaths[An array of absolute paths to search modules]:directories:_files -/' \ '--noStackTrace[Disable stack trace in test results output]' \ '--notify[Activate notifications for test results]' \ '--notifyMode[Specify notification mode for test results]:mode:($notify_modes)' \ '(-o --onlyChanged)'{-o,--onlyChanged}'[Attempt to identify which tests to run based on which files have changed in the current repository]' \ '(-f --onlyFailures)'{-f,--onlyFailures}'[Run tests that failed in the previous execution]' \ '--openHandlesTimeout[Timeout msecs for open handle warnings]:number' \ '--outputFile[Output file name of test results]:files:_files' \ '--passWithNoTests[Will not fail if no tests are found]' \ "--preset[A preset that is used as a base for Jest's configuration]:string" \ '--prettierPath[The path to the "prettier" module used for inline snapshots]:string' \ '--projects[Projects that use Jest to run all tests of all projects in a single instance]:array' \ '--randomize[Shuffle the order of the tests within a file]' \ '--reporters[A list of custom reporters for the test suite]:array' \ '--resetMocks[Automatically reset mock state before every test]' \ '--resetModules[The module registry for every test file will be reset before running each test]' \ '--resolver[A JSON string which allows the use of a custom resolver]:string' \ '--restoreMocks[Automatically restore mock state and implementation before every test]' \ '--rootDir[The root directory that Jest should scan for tests and modules]:dir:_files -/' \ '--roots[A list directories that Jest should use to search for files in]:array:_files -/' \ '(-i --runInBand)'{-i,--runInBand}'[Run all tests serially in the current process]' \ '--runTestsByPath[Used when provided patterns are exact file paths]' \ "--runner[Use a custom runner instead of Jest's default test runner]:string" \ '--seed[Set a seed value that can be retrieved in a tests file via "jest.getSeed()"]:number' \ '--selectProjects[Run the tests of the specified projects]:array' \ '--setupFiles[Module paths that configure or set up the testing environment before each test]:files:_files' \ '--setupFilesAfterEnv[Module paths that configure or set up the testing framework before each test]:files:_files' \ '--shard[Shard tests and execute only the selected shard]:shard' \ '--showConfig[Print your jest config and then exits]' \ '--showSeed[Print the seed value in the test report summary]' \ '--silent[Prevent tests from printing messages through the console]' \ '--skipFilter[Disable the filter provided by --filter]' \ '--snapshotSerializers[Paths of snapshot serializer modules for snapshot testing]:files:_files' \ '--testEnvironmentOptions[Options that will be passed to the "testEnvironment"]:string' \ '--testFailureExitCode[Exit code of "jest" command if the test run failed]:string' \ '--testLocationInResults[Add "location" information to the test results]' \ '--testMatch[The glob patterns Jest uses to detect test files]:array' \ '(-t --testNamePattern)'{-t,--testNamePattern}'[Run only tests with a name that matches the regex pattern]:string' \ '--testPathIgnorePatterns[Regexp patterns for ignoring tests]:array' \ '--testPathPatterns[Regexp patterns for executing tests]:array' \ '--testRegex[Regexp patterns that Jest uses to detect test files]:array' \ '--testResultsProcessor[Specify a custom results processor]:string' \ '--testRunner[Specify a custom test runner]:string' \ '--testSequencer[Specify a custom test sequencer]:string' \ '--testTimeout[Default timeout of test cases]:number' \ '--transform[A JSON string which maps from regular expressions to paths to transformers]:string' \ '--transformIgnorePatterns[Ignore regexp patterns for transformation]:array' \ '--unmockedModulePathPatterns[Regexp patterns for unmocked modules]:array' \ '(-u --updateSnapshot)'{-u,--updateSnapshot}'[Re-record snapshots]' \ '--useStderr[Divert all output to stderr]' \ '--verbose[Display individual test results with the test suite hierarchy]' \ '--waitForUnhandledRejections[Give one event loop turn to handle unhandles rejections]' \ '--watch[Watch files for changes and rerun tests related to changed files]' \ '--watchAll[Watch files for changes and rerun all tests]' \ '--watchPathIgnorePatterns[Ignore patterns of watch path]:array' \ '(--watchman --no-watchman)--watchman[Use watchman for file crawling]' \ '(--watchman --no-watchman)--no-watchman[Do not use watchman for file crawling]' \ '--workerThreads[Use worker threads for parallelization]' \ '*: :->file' \ && ret=0 case $state in (file) (( CURRENT > 0 )) && line[CURRENT]=() line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} ) _files -F line && ret=0 ;; esac return ret # 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 ================================================ FILE: src/_jmeter ================================================ #compdef jmeter # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for JMeter (https://jmeter.apache.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ _arguments \ '(- 1 *)--?[print command line options and exit]' \ '(- 1 *)'{-h,--help}'[print usage information and exit]' \ '(- 1 *)'{-v,--version}'[print the version information and exit]' \ {-p,--propfile}'[the jmeter property file to use]:properties file:_files -g "*.properties"' \ '*'{-q,--addprop}'[additional property file(s)]:properties file:_files -g "*.properties"' \ {-t,--testfile}'[the jmeter test plan file to run]:JMeter test plan file:_files -g "*.jmx"' \ {-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \ {-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \ {-i,--jmeterlogconf}'[jmeter logging configuration file]: :_files -g "*.xml"' \ {-n,--nongui}'[run JMeter in nongui mode]' \ {-s,--server}'[run the JMeter server]' \ {-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \ {-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \ {-N,--nonProxyHosts}'[set non proxy host list]:host' \ {-u,--username}'[set username for proxy server that JMeter is to use]:username:_users' \ {-a,--password}'[set password for proxy server that JMeter is to use]:password' \ {-J-,--jmeterproperty}'[define additional JMeter properties]:argument=value' \ {-G-,--globalproperty}'[define Global properties (sent to servers)]:argument=value' \ {-D-,--systemproperty}'[define additional System properties]:argument=value' \ {-S,--systemPropertyFile}'[a property file to be added as System properties]:properties file:_files -g "*.properties"' \ {-f,--forceDeleteResultFile}'[force delete existing results files and web report folder]' \ {-L,--loglevel}'[define loglevel]:[category=]level' \ {-r,--runremote}'[start remote servers (as defined by the jmeter property remote_hosts)]' \ {-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \ {-d,--homedir}'[the JMeter home directory to use]: :_files -/' \ {-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]' \ {-g,--reportonly}'[generate report dashboard only, from a test results file]: :_files' \ {-e,--reportatendofloadtests}'[generate report dashboard after load test]' \ {-o,--reportoutputfolder}'[output folder for report dashboard]: :_files -/' # 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 ================================================ FILE: src/_jmeter-plugins ================================================ #compdef jmeter-plugins # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for jmeter-plugins command line tool 0.4.2 # (https://jmeter-plugins.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ _arguments \ '(- 1 *)--help[show help options]' \ '--generate-png[generate PNG file containing graph]:PNG file name:_files -g "*.png"' \ '--generate-csv[generate CSV file containing graph data]:CSV file name:_files -g "*.csv"' \ '--input-jtl[load data from specified JTL file]:JTL file:_files -g "*.jtl"' \ '--plugin-type[type of graph to use for results generation]:class:((AggregateReport ThreadsStateOverTime BytesThroughputOverTime HitsPerSecond LatenciesOverTime PerfMon ResponseCodesPerSecond ResponseTimesDistribution ResponseTimesOverTime ResponseTimesPercentiles ThroughputOverTime ThroughputVsThreads TimesVsThreads TransactionsPerSecond))' \ '--width[set graph width]:graph width (pixels)' \ '--height[set graph height]::graph height (pixels)' \ '--granulation[granulation time for samples]:time (ms)' \ '--relative-times[use relative X axis times, no will set absolute times]: :((yes no))' \ '--aggregate-rows[aggregate all rows into one]: :((yes no))' \ '--paint-gradient[paint gradient background]: :((yes no))' \ '--paint-zeroing[paint zeroing lines]: :((yes no))' \ '--prevent-outliers[prevent outliers on distribution graph]: :((yes no))' \ '--limit-rows[limit number of points in row]:number of points' \ '--force-y[force Y axis limit]:limit' \ '--hide-low-counts[hide points with sample count below limit]:limit' # 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 ================================================ FILE: src/_jonas ================================================ #compdef jonas # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for JOnAS 5.2 (https://jonas.ow2.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ typeset -A opt_args local context state line curcontext="$curcontext" ret=1 _arguments -C \ '1:cmd:->cmds' \ '*::arg:->args' \ && ret=0 case "$state" in (cmds) local commands; commands=( 'version:show version information' 'check:check that the JOnAS environment is correctly set' 'start:start a server instance' 'stop:stop a server instance' 'admin:administrate a server instance' ) _describe -t commands 'command' commands && ret=0 ;; (args) curcontext="${curcontext%:*:*}:jonas-cmd-$words[1]:" case $words[1] in (version|check) _message 'no more arguments' && ret=0 ;; (start) _arguments \ '-standby[start a minimal JOnAS server with only mandatory services]' \ '(-bg)-fg[start the server in foreground mode]' \ '(-fg)-bg[start the server in background mode]' \ '-win[start the server in a new window]' \ '(-bg)-tui[start the Apache Felix TUI (force foreground mode)]' \ '-gui[start the Apache Felix GUI]' \ '-dev[start a JOnAS server by using bundles present in the default maven repository instead of bundles under $JONAS_ROOT/lib/bundles]' \ '-clean[clean the Apache Felix cache before starting a JOnAS server]' \ '-n[set the server name, must be unique in the domain (default: jonas)]:name' \ '-target[start another server or cluster (group of servers) in the domain]:server' \ '-Ddomain.name=[set the name of the management domain to which the server belongs]:domain' \ && ret=0 ;; (stop) _arguments \ '-standby[stop all services except the mandatory ones]' \ '-n[set the name of the server to stop (default: jonas)]:name' \ '-target[stop another server or cluster (group of servers) in the domain]:server' \ '-Ddomain.name=[set the name of the management domain to which the server belongs]:domain' \ && ret=0 ;; (admin) _arguments \ '(- : *)-?[print the help message]' \ '-win[administer the server in a new window]' \ '-n[set the name of the server to administer (default: jonas)]:name' \ '-username[set the username when authentication is required]: :_users' \ '-password[set the password when authentication is required]:password' \ '-registry[set the registry URL]: :_urls' \ '-protocol[set the protocol name]:protocol:((jrmp\:JRE\ implementation\ of\ RMI\ on\ the\ JRMP\ protocol\ \(default\) iiop\:JacORB\ implementation\ of\ RMI\ over\ the\ IIOP\ protocol irmi\:Oracle\ JRE\ independent\ implementation\ of\ RMI))' \ '-a[deploy an application from a given filepath on the current server, or on another target in the domain if the current server is a master]:Java application archive:_files -g "*.(j|w|r|e)ar"' \ '-r[undeploy a previously deployed application from the current server or from the specified target if the current server is a master]:Java application archive:_files -g "*.(j|w|r|e)ar"' \ '-gc[run the garbage collector on the current JOnAS server]' \ '-passivate[passivate all entity bean instances]' \ '-e[list the properties of the current JOnAS server]' \ '-j[list the registered JNDI names, as seen by the current JOnAS server]' \ '-l[list the beans currently loaded by the current JOnAS server]' \ '-synch[synchronize the entity bean instances on the current JOnAS server]' \ '-debug[set the logging level for the given topic to DEBUG]:topic' \ '-tt[change the default timeout for transactions]:timeout (seconds)' \ '-ping[wait until the JOnAS server is available]' \ '-timeout[maximum time to wait when -ping is used]:timeout (seconds)' \ && ret=0 ;; esac ;; esac return ret # 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 ================================================ FILE: src/_jrnl ================================================ #compdef jrnl # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 jrnl v4.2.1 (https://github.com/jrnl-org/jrnl). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ _jrnl() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '--debug[Print information useful for troubleshooting]' \ '(- *)--help[Show help message]' \ '(- *)--version[print version information]' \ '--list[List all configured journals]' \ '--encrypt[Encrypt selected journal with a password]' \ '--decrypt[Decrypt selected journal and store it in plain text]' \ '--import[Import entries from another journal]' \ '-on[Show entries on this date]:date' \ '-today-in-history[Show entries of today over the years]' \ '-month[Show entries on this month of any year]:date' \ '-day[Show entries on this day of any month]:date' \ '-year[Show entries of a specific year]:date' \ '-from[Show entries after, or on, this date]:date' \ '(-to -until)'{-to,-until}'[Show entries before, or on, this date]' \ '-contains[Show entries containing specific text]:text' \ '-and[Show only entries that match all conditions(default: OR)]' \ '-starred[Show only starred entries (marked with *)]' \ '-tagged[Show only entries that have at least one tag]' \ '-n[Show a maximum of NUMBER entries. And "-3" has the same effect]:number' \ '-not[exclude entries with that tag]:tag_or_flag' \ '--edit[Opens the selected entries in your configured editor]' \ '--delete[Interactively deletes selected entries]' \ '--change-time[Change timestamp for selected entries(default: now)]:date' \ '--format[Display selected entries in an alternate format]:format:_jrnl_formats' \ '--tags[Alias for "--format tags"]' \ '--short[Show only titles or line containing the search tags]' \ '--config-override[Override configured key-value pair]:key_value' \ '--config-file[Override default config file]:path:_files' \ '*:: :->args' \ && ret=0 case $state in (args) if [[ $PREFIX = @* ]]; then local -a tags=($(jrnl --tags 2>/dev/null | command grep -oE '@\S+')) _describe -t tags 'tags' tags && ret=0 fi ;; esac return ret } (( $+functions[_jrnl_formats] )) || _jrnl_formats() { local -a formats if (( $+opt_args[--list] )); then formats=(json yaml) elif (( $+opt_args[--import] )); then formats=(jrnl) else formats=(boxed calendar dates fancy heatmap json markdown md pretty short tags text txt xml yaml) fi _values 'format' $formats } _jrnl "$@" # 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 ================================================ FILE: src/_kak ================================================ #compdef kak # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 kak 2024.05.18 (https://github.com/mawww/kakoune) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Frank LENORMAND # # ------------------------------------------------------------------------------ _kak_sessions() { local -a session_ids expl session_ids=($(_call_program session_names kak -l)) _description session-ids expl "session name" compadd "$expl[@]" -a session_ids } _kak() { _arguments \ '-c[connect to given session]:session_id:_kak_sessions' \ '-e[execute argument on client initialization phase]:keys' \ '-E[execute argument on server initialization]:keys' \ "-n[do not load the system's kakrc]" \ '-s[set the current session name]:session_id' \ '-d[run as a headless session (requires -s)]' \ '-p[just send stdin as commands to the given session]:session_id:_kak_sessions' \ "-f[enter in 'filter mode':select the whole file, then execute keys]:keys" \ '-i[backup the files on which a filter is applied using the given suffix]:suffix' \ '-q[in filter mode, do not print any errors]' \ '-ui[set the type of user interface to use (terminal, dummy, or json)]:ui_type:(terminal dummy json)' \ '-l[list existing sessions]' \ '-clear[clear dead sessions]' \ '-debug[initial debug option value]:arg' \ '(- *)-version[display Kakoune version and quit]' \ '-ro[readonly mode]' \ '(- *)-help[display a help message and quit]' \ '*::files:_files' } _kak "$@" # 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 ================================================ FILE: src/_kitchen ================================================ #compdef kitchen # ------------------------------------------------------------------------------ # 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 Test Kitchen (https://kitchen.ci/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Peter Eisentraut (https://github.com/petere) # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ _kitchen() { local curcontext="$curcontext" state line typeset -A opt_args _arguments '1: :->cmds'\ '2: :->args' case $state in cmds) _kitchen_commands ;; args) case $line[1] in converge|create|destroy|diagnose|list|setup|test|verify) compadd 'all' _kitchen_instances ;; login) _kitchen_instances ;; esac ;; esac } _kitchen_commands() { local commands commands=("${(@f)$(_call_program commands $service help | sed -n 's/^ kitchen \([[:alpha:]]*\) .*# \(.*\)$/\1:\2/p')}") _describe -t commands 'kitchen commands' commands } _kitchen_instances() { if [[ $_kitchen_instances_cache_dir != $PWD ]]; then unset _kitchen_instances_cache fi if [[ ${+_kitchen_instances_cache} -eq 0 ]]; then _kitchen_instances_cache=(${(f)"$(_call_program instances $service list -b 2>/dev/null)"}) _kitchen_instances_cache_dir=$PWD fi _wanted instances expl 'instance' compadd -a _kitchen_instances_cache } _kitchen "$@" # 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 ================================================ FILE: src/_l3build ================================================ #compdef l3build # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for l3build 2025-09-03 (https://github.com/latex3/l3build/). # Modified from rejected https://github.com/latex3/l3build/pull/267 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Wu Zhenyu # # ------------------------------------------------------------------------------ _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' ) _describe -t targets 'target' targets "$@" } _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 # sh-indentation: 2 # indent-tabs-mode: nil # sh-basic-offset: 2 # End: # vim: ft=zsh sw=2 ts=2 et ================================================ FILE: src/_language_codes ================================================ #autoload # ------------------------------------------------------------------------------ # Description # ----------- # # Completer for language codes. # # Usage: _language_codes ISO-639-1 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ (( $+functions[_language_codes_iso_639_1] )) || _language_codes_iso_639_1() { local codes; codes=( 'aa:Afar' 'ab:Abkhazian' 'af:Afrikaans' 'ak:Akan' 'sq:Albanian' 'am:Amharic' 'ar:Arabic' 'an:Aragonese' 'hy:Armenian' 'as:Assamese' 'av:Avaric' 'ae:Avestan' 'ay:Aymara' 'az:Azerbaijani' 'ba:Bashkir' 'bm:Bambara' 'eu:Basque' 'be:Belarusian' 'bn:Bengali' 'bh:Bihari languages' 'bi:Bislama' 'bo:Tibetan' 'bs:Bosnian' 'br:Breton' 'bg:Bulgarian' 'my:Burmese' 'ca:Catalan' 'cs:Czech' 'ch:Chamorro' 'ce:Chechen' 'zh:Chinese' 'cu:Church Slavic' 'cv:Chuvash' 'kw:Cornish' 'co:Corsican' 'cr:Cree' 'cy:Welsh' 'cs:Czech' 'da:Danish' 'de:German' 'dv:Divehi' 'nl:Dutch' 'dz:Dzongkha' 'el:Greek, Modern (1453-)' 'en:English' 'eo:Esperanto' 'et:Estonian' 'eu:Basque' 'ee:Ewe' 'fo:Faroese' 'fa:Persian' 'fj:Fijian' 'fi:Finnish' 'fr:French' 'fy:Western Frisian' 'ff:Fulah' 'ka:Georgian' 'de:German' 'gd:Gaelic' 'ga:Irish' 'gl:Galician' 'gv:Manx' 'gn:Guarani' 'gu:Gujarati' 'ht:Haitian' 'ha:Hausa' 'he:Hebrew' 'hz:Herero' 'hi:Hindi' 'ho:Hiri Motu' 'hr:Croatian' 'hu:Hungarian' 'hy:Armenian' 'ig:Igbo' 'is:Icelandic' 'io:Ido' 'ii:Sichuan Yi' 'iu:Inuktitut' 'ie:Interlingue' 'ia:Interlingua (International Auxiliary Language Association)' 'id:Indonesian' 'ik:Inupiaq' 'is:Icelandic' 'it:Italian' 'jv:Javanese' 'ja:Japanese' 'kl:Kalaallisut' 'kn:Kannada' 'ks:Kashmiri' 'ka:Georgian' 'kr:Kanuri' 'kk:Kazakh' 'km:Central Khmer' 'ki:Kikuyu' 'rw:Kinyarwanda' 'ky:Kirghiz' 'kv:Komi' 'kg:Kongo' 'ko:Korean' 'kj:Kuanyama' 'ku:Kurdish' 'lo:Lao' 'la:Latin' 'lv:Latvian' 'li:Limburgan' 'ln:Lingala' 'lt:Lithuanian' 'lb:Luxembourgish' 'lu:Luba-Katanga' 'lg:Ganda' 'mk:Macedonian' 'mh:Marshallese' 'ml:Malayalam' 'mi:Maori' 'mr:Marathi' 'ms:Malay' 'mk:Macedonian' 'mg:Malagasy' 'mt:Maltese' 'mn:Mongolian' 'mi:Maori' 'ms:Malay' 'my:Burmese' 'na:Nauru' 'nv:Navajo' 'nr:Ndebele, South' 'nd:Ndebele, North' 'ng:Ndonga' 'ne:Nepali' 'nl:Dutch' 'nn:Norwegian Nynorsk' 'nb:Bokmål, Norwegian' 'no:Norwegian' 'ny:Chichewa' 'oc:Occitan (post 1500)' 'oj:Ojibwa' 'or:Oriya' 'om:Oromo' 'os:Ossetian' 'pa:Panjabi' 'fa:Persian' 'pi:Pali' 'pl:Polish' 'pt:Portuguese' 'ps:Pushto' 'qu:Quechua' 'rm:Romansh' 'ro:Romanian' 'ro:Romanian' 'rn:Rundi' 'ru:Russian' 'sg:Sango' 'sa:Sanskrit' 'si:Sinhala' 'sk:Slovak' 'sk:Slovak' 'sl:Slovenian' 'se:Northern Sami' 'sm:Samoan' 'sn:Shona' 'sd:Sindhi' 'so:Somali' 'st:Sotho, Southern' 'es:Spanish' 'sq:Albanian' 'sc:Sardinian' 'sr:Serbian' 'ss:Swati' 'su:Sundanese' 'sw:Swahili' 'sv:Swedish' 'ty:Tahitian' 'ta:Tamil' 'tt:Tatar' 'te:Telugu' 'tg:Tajik' 'tl:Tagalog' 'th:Thai' 'bo:Tibetan' 'ti:Tigrinya' 'to:Tonga (Tonga Islands)' 'tn:Tswana' 'ts:Tsonga' 'tk:Turkmen' 'tr:Turkish' 'tw:Twi' 'ug:Uighur' 'uk:Ukrainian' 'ur:Urdu' 'uz:Uzbek' 've:Venda' 'vi:Vietnamese' 'vo:Volapük' 'cy:Welsh' 'wa:Walloon' 'wo:Wolof' 'xh:Xhosa' 'yi:Yiddish' 'yo:Yoruba' 'za:Zhuang' 'zh:Chinese' 'zu:Zulu' ) _describe -t language-codes 'ISO 639-1 language code' codes "$@" } _language_codes() { local command="$argv[$#]" ret=1 case $command in ISO-639-1) _language_codes_${${command//-/_}:l} "${@[1,-2]}" && ret=0 ;; *) _message "unknown command: $command" ;; esac return ret } # 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 ================================================ FILE: src/_ldattach ================================================ #compdef ldattach # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 ldattach, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - attach a line discipline to a serial line # # Author: # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ typeset -A opt_args local context state line local curcontext="$curcontext" _arguments -s -C \ '(-1 --onestopbit)'{-1,--onestopbit}'[Set the number of stop bits of the serial line to one]' \ '(-2 --twostopbits)'{-2,--twostopbits}'[Set the number of stop bits of the serial line to two]' \ '(-7 --sevenbits)'{-7,--sevenbits}'[Set the character size of the serial line to 7 bits]' \ '(-8 --eightbits)'{-8,--eightbits}'[Set the character size of the serial line to 8 bits]' \ '(-d --debug)'{-d,--debug}'[Enable debugging output]' \ '(-e --evenparity)'{-e,--evenparity}'[Set the parity of the serial line to even]' \ '(-i --iflag)'{-i,--iflag}'[Set the specified bits in the c_iflag word of the serial line]:value' \ '(-n --noparity)'{-n,--noparity}'[Set the parity of the serial line to none]' \ '(-o --oddparity)'{-o,--oddparity}'[Set the parity of the serial line to odd]' \ '(-s --speed)'{-s,--speed}'[Set the speed(the baud rate) of the serial line]:value' \ '(-c --intro-command)'{-c,--intro-command}'[An intro command before the invocation of ldattach]:command' \ '(-p --pause)'{-p,--pause}'[Sleep for given seconds before the invocation of ldattach]:value' \ '(- *)'{-h,--help}'[Display help text and exit]'\ '(- *)'{-V,--version}'[Print version and exit]' \ '1:line discipline' \ '2::device:->device' # Complete device argument case $state in device) _files -g '/dev/tty*' ;; esac # 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 ================================================ FILE: src/_lilypond ================================================ #compdef lilypond # ------------------------------------------------------------------------------ # Copyright (c) 2021 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 lilypond 2.22.2 (https://lilypond.org/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Andre Kugland (https://github.com/kugland) # # ------------------------------------------------------------------------------ _arguments -C -S -A "-*" \ '(- 1 *)-dhelp[show help for scheme options]' \ '(- 1 *)'{-h,--help}'[show usage information]' \ '(- 1 *)'{-v,--version}'[show version number]' \ '(- 1 *)'{-w,--warranty}'[show warranty and copyright]' \ '(-f --formats)'{-f,--formats=}'[select format(s) to generate]:format(s) to generate:_sequence compadd - pdf svg png ps eps' \ '--pdf[generate .pdf files]' \ '--svg[generate .svg files]' \ '--png[generate .png files]' \ '--ps[generate .ps files]' \ '(-E --eps)'{-E,--eps}'[generate .eps files]' \ '(-O --pspdfopt)'{-O,--pspdfopt=}'[set .ps/.pdf optimization]:.ps/.pdf optimization:(size TeX TeX-GS)' \ '*'{-d,--define-default=}'[set scheme option]:scheme option:->scheme_opt' \ '(-e --evaluate)'{-e,--evaluate=}'[evaluate scheme code]:scheme code' \ '(-H --header)'{-H,--header=}'[dump header field to file]:field' \ '*'{-I,--include=}'[append directory to include search path]:directory:_files -/' \ '(-i --init)'{-i,--init=}'[use file as init file]:file:_files -g "*.(#i)ly(-.)"' \ '(-j --jail)'{-j,--jail=}'[chroot to jail, become user:group and cd into dir]:jail arg (user,group,jail,dir)' \ '(-o --output)'{-o,--output=}'[set output base filename or folder]:output base filename or folder:_files' \ '(-l --loglevel -s --silent -V --verbose)'{-l,--loglevel=}'[set level of the log]:log level [INFO]:(NONE ERROR WARNING BASIC PROGRESS INFO DEBUG)' \ '(-l --loglevel -s --silent -V --verbose)'{-s,--silent}'[no progress, only error messages (same as --loglevel=ERROR)]' \ '(-l --loglevel -s --silent -V --verbose)'{-V,--verbose}'[be verbose (same as --loglevel=DEBUG)]' \ '*:input file:_files -g "*.(#i)ly(-.)"' case $state in scheme_opt) _values 'scheme option' \ 'anti-alias-factor[set anti-alias factor]:anti-alias-factor (1-8)' \ 'aux-files[create .tex, .texi, .count files in the EPS backend]:aux-files:(\#t \#f)' \ 'backend[select backend]:backend:(eps null ps scm svg)' \ 'check-internal-types[check every property assignment for types]:check-internal-types:(\#t \#f)' \ 'clip-systems[generate cut-out snippets of a score]:clip-systems:(\#t \#f)' \ 'crop[match the size of the normal output to the typeset image]:crop:(\#t \#f)' \ 'datadir[LilyPond prefix for data files]: :_files -/' \ 'debug-gc-assert-parsed-dead[ensure that all references to parsed objects are dead]:debug-gc-assert-parsed-dead:(\#t \#f)' \ 'debug-gc[dump memory debugging statistics]:debug-gc:(\#t \#f)' \ 'debug-lexer[debug the flex lexer]:debug-lexer:(\#t \#f)' \ 'debug-page-breaking-scoring[dump scores for many different page breaking configurations]:debug-page-breaking-scoring:(\#t \#f)' \ 'debug-parser[debug the bison parser]:debug-parser:(\#t \#f)' \ 'debug-property-callbacks[debug cyclic callback chains]:debug-property-callbacks:(\#t \#f)' \ 'debug-skylines[debug skylines]:debug-skylines:(\#t \#f)' \ 'delete-intermediate-files[delete unusable, intermediate PostScript files]:delete-intermediate-files:(\#t \#f)' \ 'dump-signatures[dump output signatures of each system]:dump-signatures:(\#t \#f)' \ 'embed-source-code[embed the source files inside the generated PDF document]:embed-source-code:(\#t \#f)' \ 'eps-box-padding[pad left edge of the output EPS bounding box by given amount]:eps-box-padding (mm)' \ 'font-export-dir[directory for exporting fonts as PostScript files]:font-export-dir:_files -/' \ 'font-ps-resdir[build a subset of PostScript resource directory for embedding fonts]:font-ps-resdir' \ 'gs-api[whether to use the Ghostscript API (read-only if not available)]:gs-api:(\#t \#f)' \ 'gs-load-fonts[load fonts via Ghostscript]:gs-load-fonts:(\#t \#f)' \ 'gs-load-lily-fonts[load only LilyPond fonts via Ghostscript]:gs-load-lily-fonts:(\#t \#f)' \ 'gs-never-embed-fonts[make Ghostscript embed only TrueType fonts and no other font format]:gs-never-embed-fonts:(\#t \#f)' \ 'gui[run LilyPond from a GUI and redirect stderr to a log file]:gui:(\#t \#f)' \ 'help[show this help]:help:(\#t \#f)' \ 'include-book-title-preview[include book titles in preview images]:include-book-title-preview:(\#t \#f)' \ 'include-eps-fonts[include fonts in separate-system EPS files]:include-eps-fonts:(\#t \#f)' \ 'include-settings[included file before the score is processed]:include-settings:_files -g "*.(#i)ly(-.)"' \ 'job-count[process in parallel, using the given number of jobs]:job-count' \ 'log-file[output log to file (.log will be appended)]:log-file' \ 'max-markup-depth[maximum depth for the markup tree]:max-markup-depth' \ 'midi-extension[set the default file extension for MIDI output]:midi-extension:(mid midi)' \ 'music-font-encodings[use font encodings and the PostScript "show" operator with music fonts]:music-font-encodings:(\#t \#f)' \ 'music-strings-to-paths[convert text strings to paths when glyphs belong to a music font]:music-strings-to-paths:(\#t \#f)' \ 'outline-bookmarks[use bookmarks in table of contents metadata]:outline-bookmarks:(\#t \#f)' \ 'paper-size[set default paper size]:paper-size:(\"a1\" \"a2\" \"a3\" \"a4\" \"a5\" \"a6\" \"b1\" \"b2\" \"b3\" \"b4\" \"b5\" \"b6\" \"c1\" \"c2\" \"c3\" \"c4\" \"c5\" \"c6\" \"f4\" \"government-legal\" \"government-letter\" \"imperial\" \"junior-legal\" \"ledger\" \"legal\" \"letter\" \"folio\" \"octavo\" \"quarto\" \"tabloid\")' \ 'pixmap-format[set GhostScript'\''s output format for pixel images]:pixmap-format:(fpng jpeg jpegcmyk jpeggray png16m pngalpha pnggray pngmonod)' \ 'png-height[image height for PNG output]:png-height (pixels)' \ 'png-width[image width for PNG output]:png-width (pixels)' \ 'point-and-click[add point & click links to PDF and SVG output]:point-and-click:(\#t \#f)' \ 'preview[create preview images also]:preview:(\#t \#f)' \ 'print-pages[print pages in the normal way]:print-pages:(\#t \#f)' \ 'profile-property-accesses[keep statistics of get_property() calls]:profile-property-accesses:(\#t \#f)' \ 'protected-scheme-parsing[continue when errors in inline Scheme are caught in the parser]:protected-scheme-parsing:(\#t \#f)' \ 'read-file-list[specify file which contains a list of input files]:read-file-list:(\#t \#f)' \ 'relative-includes[look for the included file relative to the current file]:relative-includes:(\#t \#f)' \ 'resolution[set resolution for generating PNG pixmaps to given value]:resolution (dpi)' \ 'safe[run in safer mode]:safe:(\#t \#f)' \ 'separate-log-files[use separate log files for each input]:separate-log-files:(\#t \#f)' \ 'show-available-fonts[list available font names]:show-available-fonts:(\#t \#f)' \ 'strict-infinity-checking[force a crash on encountering Inf and NaN floating point exceptions]:strict-infinity-checking:(\#t \#f)' \ 'strip-output-dir[don'\''t use directories from input files while constructing output file names]:strip-output-dir:(\#t \#f)' \ 'strokeadjust[set the PostScript '\''strokeadjust'\'' operator explicitly]:strokeadjust:(\#t \#f)' \ 'svg-woff[use woff font files in SVG backend]:svg-woff:(\#t \#f)' \ 'verbose[verbose output]:verbose:(\#t \#f)' \ 'warning-as-error[change all warning and programming_error messages into errors]:warning-as-error:(\#t \#f)' ;; esac # 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 ================================================ FILE: src/_lscpu ================================================ #compdef lscpu # ------------------------------------------------------------------------------ # Copyright (c) 2024 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 lscpu v15.0.2 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ (( $+functions[_lscpu_cpu_column] )) || _lscpu_cpu_column() { local -a columns=( "BOGOMIPS[crude measurement of CPU speed]" "CPU[logical CPU number]" "CORE[logical core number]" "SOCKET[logical socket number]" "CLUSTER[logical cluster number]" "NODE[logical NUMA node number]" "BOOK[logical book number]" "DRAWER[logical drawer number]" "CACHE[shows how caches are shared between CPUs]" "POLARIZATION[CPU dispatching mode on virtual hardware]" "ADDRESS[physical address of a CPU]" "CONFIGURED[shows if the hypervisor has allocated the CPU]" "ONLINE[shows if Linux currently makes use of the CPU]" "MHZ[shows the currently MHz of the CPU]" "SCALMHZ%[ shows scaling percentage of the CPU frequency]" "MAXMHZ[shows the maximum MHz of the CPU]" "MINMHZ[shows the minimum MHz of the CPU]" "MODELNAME[shows CPU model name]" ) _values -s ',' column $columns } (( $+functions[_lscpu_cache] )) || _lscpu_cache() { local -a columns=( "ALL-SIZE[size of all system caches]" "LEVEL[cache level]" "NAME[cache name]" "ONE-SIZE[size of one cache]" "TYPE[cache type]" "WAYS[ways of associativity]" "ALLOC-POLICY[allocation policy]" "WRITE-POLICY[write policy]" "PHY-LINE[number of physical cache line per cache tag]" "SETS[number of sets in the cache; set lines has the same cache index]" "COHERENCY-SIZE[minimum amount of data in bytes transferred from memory to cache]" ) _values -s ',' column $columns } _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-a --all)'{-a,--all}'[print both online and offline CPUs(default for -e)]' \ '(-b --online)'{-b,--online}'[print online CPUs only]' \ '(-B --bytes)'{-B,--bytes}'[print sizes in bytes rather than in human readable format]' \ '-C[info about caches in extended readable format]' \ '--cache=-[info about caches in extended readable format]::list:_lscpu_cache' \ '(-c --offline)'{-c,--offline}'[print offline CPUs only]' \ '(-J --json)'{-J,--json}'[use JSON for default or extended format]' \ '-e[print out an extended readable format]' \ '--extended=-[print out an extended readable format]::list:_lscpu_cpu_column' \ '-p[print out a parsable format]' \ '--parse=-[print out a parsable format]::list:_lscpu_cpu_column' \ '(-s --sysroot)'{-s,--sysroot}'[use specified directory as system root]:dir:_files -/' \ '(-x --hex)'{-x,--hex}'[print hexadecimal masks rather than list of CPUs]' \ '(-y --physical)'{-y,--physical}'[print physical instead of logical IDs]' \ '--hierarchic=-[use subsections in summary]:when:(auto never always)' \ '--output-all[print all available columns for -e, -p or -C]' # 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 ================================================ FILE: src/_lsipc ================================================ #compdef lsipc # ------------------------------------------------------------------------------ # 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 lsipc v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ (( $+functions[_lsipc_output_columns] )) || _lsipc_output_columns() { local -a columns=( "ID[Resource ID]" "OWNER[Owner's username or UID]" "PERMS[Permissions]" "CUID[Creator UID]" "CUSER[Creator user]" "CGID[Creator GID]" "CGROUP[Creator group]" "UID[User ID]" "USER[User name]" "GID[Group ID]" "GROUP[Group name]" "CTIME[Time of the last change]" # Generic POSIX columns: "NAME[POSIX resource name]" "MTIME[Time of last action]" # System V Shared-memory columns (--shmems): "SIZE[Segment size]" "NATTCH[Number of attached processes]" "STATUS[Status]" "ATTACH[Attach time]" "DETACH[Detach time]" "COMMAND[Creator command line]" "CPID[PID of the creator]" "LPID[PID of last user]" # System V Message-queue columns (--queues): "USEDBYTES[Bytes used]" "MSGS[Number of messages]" "SEND[Time of last msg sent]" "RECV[Time of last msg received]" "LSPID[PID of the last msg sender]" "LRPID[PID of the last msg receiver]" # System V Semaphore columns (--semaphores): "NSEMS[Number of semaphores]" "OTIME[Time of the last operation]" # POSIX Semaphore columns (--posix-semaphores): "SVAL[Semaphore value]" # Summary columns (--global): "RESOURCE[Resource name]" "DESCRIPTION[Resource description]" "LIMIT[System-wide limit]" "USED[Currently used]" "USE%[Currently use percentage]" ) _values -s ',' column $columns } _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-m --shmems)'{-m,--shmems}'[shared memory segments]' \ '(-M --posix-shmems)'{-M,--posix-shmems}'[POSIX shared memory segments]' \ '(-q --queues)'{-q,--queues}'[message queues]' \ '(-Q --posix-mqueues)'{-Q,--posix-mqueues}'[POSIX message queues]' \ '(-s --semaphores)'{-s,--semaphores}'[semaphores]' \ '(-S --posix-semaphores)'{-S,--posix-semaphores}'[POSIX semaphores]' \ '(-g --global)'{-g,--global}'[info about system-wide usage]' \ \*{-i,--id}'[System V resource identified by id]:id' \ \*{-N,--name}'[POSIX resource identified by name]:name' \ '--noheadings[do not print headings]' \ '--notruncate[do not truncate output]' \ '(-b --bytes)'{-b,--bytes}'[print SIZE in bytes rather]' \ '(-c --creator)'{-c,--creator}'[show creator and owner]' \ '(-e --export)'{-e,--export}'[display in the export-able output format]' \ '(-J --json)'{-J,--json}'[use the JSON output format]' \ '(-n --newline)'{-n,--newline}'[display each piece of information on a new line]' \ '(-l --list)'{-l,--list}'[force list output format]' \ '(-o --output)'{-o,--output=-}'[define the columns to output]:columns:_lsipc_output_columns' \ '(-P --numeric-perms)'{-P,--numeric-perms}'[print numeric permissions]' \ '(-r --raw)'{-r,--raw}'[display in raw mode]' \ '(-t --time)'{-t,--time}'[show attach, detach and change times]' \ '(-y --shell)'{-y,--shell}'[use column names to be usable as shell variables]' # 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 ================================================ FILE: src/_lslocks ================================================ #compdef lslocks # ------------------------------------------------------------------------------ # 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 lslocks v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ (( $+functions[_lslocks_output_columns] )) || _lslocks_output_columns() { local -a columns=( "COMMAND[command of the process holding the lock]" "PID[PID of the process holding the lock]" "TYPE[kind of lock]" "SIZE[size of the locks]" "INODE[inode number]" "MAJ\\:MIN[major:minor device number]" "MODE[lock access mode]" "M[mandatory state of the lock: 0 (none), 1 (set)]" "START[relative byte offset of the lock]" "END[ending offset of the lock]" "PATH[path of the locked file]" "BLOCKER[PID of the process blocking the lock]" "HOLDERS[holders of the lock]" ) _values -s ',' column $columns } _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-b --bytes)'{-b,--bytes}'[print SIZE in bytes rather]' \ '(-J --json)'{-J,--json}'[use the JSON output format]' \ '(-i --noinaccessible)'{-i,--noinaccessible}'[ignore locks without read permissions]' \ '(-o --output)'{-o,--output=-}'[output columns]:columns:_lslocks_output_columns' \ '(-o --output --output-all)--output-all[output all columns]' \ '(-p --pid)'{-p,--pid}'[display only locks held by this process]:pid:_pids' \ '(-r --raw)'{-r,--raw}'[use the raw output format]' \ '(-u --notruncate)'{-u,--notruncate}'[do not truncate text in columns]' \ '(- *)'{-H,--list-columns}'[list the available columns]' # 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 ================================================ FILE: src/_lslogins ================================================ #compdef lslogins # ------------------------------------------------------------------------------ # 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 lslogins v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ (( $+functions[_lslogins_output_columns] )) || _lslogins_output_columns() { local -a columns=( "USER[user name]" "UID[user ID]" "GECOS[full user name]" "HOMEDIR[home directory]" "SHELL[login shell]" "NOLOGIN[log in disabled by nologin(8) or pam_nologin(8)]" "PWD-LOCK[password defined, but locked]" "PWD-EMPTY[password not defined]" "PWD-DENY[login by password disabled]" "PWD-METHOD[password encryption method]" "GROUP[primary group name]" "GID[primary group ID]" "SUPP-GROUPS[supplementary group names]" "SUPP-GIDS[supplementary group IDs]" "LAST-LOGIN[date of last login]" "LAST-TTY[last tty used]" "LAST-HOSTNAME[hostname during the last session]" "FAILED-LOGIN[date of last failed login]" "FAILED-TTY[where did the login fail?]" "HUSHED[user's hush settings]" "PWD-WARN[days user is warned of password expiration]" "PWD-CHANGE[date of last password change]" "PWD-MIN[number of days required between changes]" "PWD-MAX[max number of days a password may remain unchanged]" "PWD-EXPIR[password expiration date]" "CONTEXT[the user's security context]" "PROC[number of processes run by the user]" ) _values -s ',' column $columns } _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-a --acc-expiration)'{-a,--acc-expiration}'[display info about passwords expiration]' \ '(-c --colon-separate)'{-c,--colon-separate}'[display data in a format similar to /etc/passwd]' \ '(-e --export)'{-e,--export}'[display in an export-able output format]' \ '(-f --failed)'{-f,--failed}"[display data about the user's last failed logins]" \ '(-G --supp-groups)'{-G,--supp-groups}'[display information about groups]' \ '(-g --groups)'{-g,--groups=}'[display users belonging to the given group]:group:_groups' \ '(-L --last)'{-L,--last}"[show info about the user's last login sessions]" \ '(-l --logins)'{-l,--logins}'[display only users from the given logins]:logins' \ '(-n --newline)'{-n,--newline}'[display each piece of information on a new line]'\ '--noheadings[do not print headings]' \ '--truncate[do not truncate output]' \ '(-o --output)'{-o,--output=-}'[output columns]:columns:_lslogins_output_columns' \ '(-o --output --output-all)--output-all[output all columns]' \ '(-p --pwd)'{-p,--pwd}'[display information related to login by password]' \ '(-r --raw)'{-r,--raw}'[display in raw mode]' \ '(-s --system-accs)'{-s,--system-accs}'[display system accounts]' \ '--time-format=[display dates format]:type:(short full iso)' \ '(-u --user-accs)'{-u,--user-accs}'[display user accounts]' \ '(-y --shell)'{-y,--shell}'[use column names to be usable as shell variable identifiers]' \ '(-Z --context)'{-Z,--context}'[display SELinux contexts]' \ '(-z --print0)'{-z,--print0}'[delimit user entries with a nul character]' \ '--wtmp-file[set an alternate path for wtmp]:path:_files' \ '--btmp-file[set an alternate path for btmp]:path:_files' \ '--lastlog[set an alternate path for lastlog]:path:_files' \ '--lastlog2[set an alternate path for lastlog2]:path:_files' # 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 ================================================ FILE: src/_lsmem ================================================ #compdef lsmem # ------------------------------------------------------------------------------ # 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 lsmem v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ (( $+functions[_lsmem_output_columns] )) || _lsmem_output_columns() { local -a columns=( "RANGE[start and end address of the memory range]" "SIZE[size of the memory range]" "STATE[online status of the memory range]" "REMOVABLE[memory is removable]" "BLOCK[memory block number or blocks range]" "NODE[numa node of memory]" "ZONES[valid zones for the memory range]" ) _values -s ',' column $columns } _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-J --json)'{-J,--json}'[use the JSON output format]' \ '(-P --pairs)'{-P,--pairs}'[use key=value output format]' \ '(-a --all)'{-a,--all}'[list each individual memory block]' \ '(-b --bytes)'{-b,--bytes}'[print SIZE in bytes rather]' \ '(-n --noheadings)'{-n,--noheadings}'[do not print headings]' \ '(-o --output)'{-o,--output=-}'[output columns]:columns:_lsmem_output_columns' \ '(-o --output --output-all)--output-all[output all columns]' \ '(-r --raw)'{-r,--raw}'[use the raw output format]' \ '(-S --split)'{-S,--split}'[split ranges by specified columns]:columns:_lsmem_output_columns' \ '(-s --sysroot)'{-s,--sysroot}'[use the specified directory as system root]:dir:_files -/' \ '--summary=-[print summary information]:when:(never always only)' # 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 ================================================ FILE: src/_lunchy ================================================ #compdef lunchy # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 lunchy 0.10.4 (https://github.com/mperham/lunchy). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Blake Walters (https://github.com/markupboy) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _lunchy() { local state line cmds ret=1 _arguments -C \ '1: :->cmds' \ '*::arg:->args' && ret=0 case $state in cmds) local -a cmds cmds=( 'ls:Show the list of installed agents, with optional filter' 'list:Show the list of installed agents, with optional filter' 'start:Start the first agent matching pattern' 'stop:Stop the first agent matching pattern' 'restart:Stop and start the first agent matching pattern' 'status:Show the PID and label for all agents, with optional filter' 'install:Install an agents plist file to ~/Library/LaunchAgents or /Library/LaunchAgents' 'uninstall:Uninstall name from ~/Library/LaunchAgents or /Library/LaunchAgents' 'show:Show the contents of the launchctl daemon file' 'edit:Open the launchctl daemon file in the default editor(EDITOR environment variable)' ) _describe -t commands 'lunchy command' cmds && ret=0 ;; args) local -a cmd_args case $line[1] in (ls|list) cmd_args=( '-l[display absolute paths of the launchctl daemon files when showing list of installed agents]' '1:: :_lunchy_installed_agents' ) ;; (start) cmd_args=( '-w[persist the start command, the agent will load on startup]' '-F[force start agents]' '1: :_lunchy_installed_agents' ) ;; (stop) cmd_args=( '-w[persist the stop command, the agent will never load]' '1: :_lunchy_agents' ) ;; (restart) cmd_args=( '1: :_lunchy_agents' ) ;; (install) cmd_args=( '-s[use a symlink for installation]' '1: :_files' ) ;; (uninstall) cmd_args=( '1: :_lunchy_agents' ) ;; (*) cmd_args=( '1: :_lunchy_installed_agents' ) ;; esac _arguments -s -S "$cmd_args[@]" && ret=0 ;; esac return ret } (( $+functions[_lunchy_agents] )) || _lunchy_agents() { local -a agents=(${(@f)"$(lunchy status | awk 'NR>=2{print $3}')"}) _values 'agents' $agents } (( $+functions[_lunchy_installed_agents] )) || _lunchy_installed_agents() { local -a agents=(${(@f)"$(lunchy ls)"}) _values 'agents' $agents } _lunchy "$@" # 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 ================================================ FILE: src/_mc ================================================ #compdef mc # ------------------------------------------------------------------------------ # Copyright (c) 2019 Sebastian Gniazdowski # # 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 Midnight Commander 4.8.28 (https://midnight-commander.org/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Sebastian Gniazdowski (https://github.com/psprint) # ------------------------------------------------------------------------------ setopt localoptions warncreateglobal typesetsilent local -a opts=( {-h,--help}'[show help on options]' --help-all'[show help on all options]' --help-terminal'[terminal options help]' --help-color'[color options help]' {-a,--stickchars}'[use stickchars to draw]' '(-c --color -b --nocolor)'{-b,--nocolor}'[requests to run in black and white]' '(-b --nocolor -c --color)'{-c,--color}'[request to run in color mode]' {-C,--colors=}'[specifies a color configuration]:arg:' --configure-options'[print configure options]' {-d,--nomouse}'[disable mouse support in text version]' {-e,--edit=}'[edit files]:file:_files' {-f,--datadir}'[print data directory]' {-F,--datadir-info}'[print extended info about used data directories]' {-g,--oldmouse}'[tries to use an old highlight mouse tracking]' {-k,--resetsoft}'[resets soft keys on HP terminals]' {-K,--keymap=}'[load definitions of key bindings from specified file]:file:_files' {-l,--ftplog=}'[log ftp dialog to specified file]:file:_files' --nokeymap"[don't load key bindings from any file, use default hardcoded keys]" {-P,--printwd=}'[print last working directory to specified file]:file:_files' {-s,--slow}'[to run on slow terminals]' {-S,--skin=}'[show mc with specified skin]:skin:' {-t,--termcap}'[tries to use termcap instead of terminfo]' '(-U --subshell -u --nosubshell)'{-u,--nosubshell}'[disables subshell support]' '(-u --nosubshell -U --subshell)'{-U,--subshell}'[enables subshell support (default)]' {-v,--view=}'[launches the file viewer on a file]:file:_files' {-V,--version}'[displays the current version]' {-x,--xterm}'[forces xterm features]' {-X,--no-x11}'[disable X11 support]' '*:pane directory:_directories' ) _arguments -s $opts # Return value passes through # 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 ================================================ FILE: src/_mcookie ================================================ #compdef mcookie # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 mcookie, util-linux 2.40.2 (https://github.com/util-linux/util-linux/) # - generate random 128-bit hexadecimal numbers # # Author: # * Aditi Sharma (https://github.com/Aditi76117) # ------------------------------------------------------------------------------ _arguments \ {-f,--file}'[Use file as as cookie seed]:file:_files' \ {-m,--max-size}'[Set maximum length of output]:number' \ {-v,--verbose}'[Print entropy source and random seed info]' \ '(- *)'{-h,--help}'[Display help message and exit]' \ '(- *)'{-V,--version}'[Display version information and exit]' # 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 ================================================ FILE: src/_middleman ================================================ #compdef middleman # ------------------------------------------------------------------------------ # Copyright (c) 2013 Jozef Izso, MIT License # # 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 middleman (https://middlemanapp.com/) # Includes commands from middleman-blog and middleman-deploy extensions. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jozef Izso (https://github.com/jozefizso) # # ------------------------------------------------------------------------------ local ret=1 state local -a common_ops common_ops=( "--help[Display help]" ) typeset -A opt_args _arguments \ ':subcommand:->subcommand' \ $common_ops \ '*::options:->options' && ret=0 case $state in subcommand) local -a subcommands subcommands=( "article:Create a new blog article" "build:Builds the static site for deployment" "console:Start an interactive console in the context of your Middleman application" "deploy:Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages on github)." "extension:Create Middleman extension scaffold" "init:Create new project" "server:Start the preview server" "upgrade:Upgrade installed bundle" "version:Show version" ) _describe -t subcommands 'middleman subcommand' subcommands && ret=0 ;; options) local -a args args=( $common_ops ) local -a help help=( "--help[Display help information]" ) case $words[1] in article) args=( {-d,--date}"[The date to create the post with (defaults to now)]:date" ) ;; build) args=( "--clean[Remove orphaned files from build (Default: true)]" "--no-clean[Disable removing orphaned files from build]" {-g,--glob}"[Build a subset of the project]:glob" "--verbose[Print debug messages]" "--instrument[Print instrument messages]:instrument" "--profile[Generate profiling report for the build]" ) ;; console) args=( {-e,--environment}"[The environment Middleman will run under (Default: development)]:environment" "--verbose[Print debug messages]" ) ;; deploy) args=( {-b,--build-before}"[Run \`middleman build\` before the deploy step]" ) ;; extension) args=( "--git[Default: true]" ) ;; init) args=( {-T,--template}"[Use a project template: default, html5, mobile, smacss, empty. (Default: default)]:template" "--css-dir [The path to the css files]:css_dir" "--js-dir [The path to the javascript files]:js_dir" "--images-dir [The path to the image files]:images_dir" "--rack [Include a config.ru file]" "--skip-gemfile [Don't create a Gemfile]" "--skip-bundle [Don't run bundle install]" "--skip-git [Skip Git ignores and keeps]" ) ;; server) args=( {-e,--environment}"[The environment Middleman will run under (Default: development)]:environment" {-h,--host}"[Bind to HOST address (Default: 0.0.0.0)]:host" {-p,--port}"[The port Middleman will listen on (Default: 4567)]:port" "--verbose [Print debug messages]" "--instrument [Print instrument messages]:instrument" "--disable-watcher [Disable the file change and delete watcher process]" "--profile [Generate profiling report for server startup]" "--reload-paths [Additional paths to auto-reload when files change]:reload_paths" "--force-polling [Force file watcher into polling mode]" ) ;; upgrade) args=() ;; version) args=() ;; esac _arguments $args && ret=0 ;; esac return ret # 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 ================================================ FILE: src/_mina ================================================ #compdef mina # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Mina (http://nadarei.co/mina/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Kazuya Takeshima (https://github.com/mitukiii) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line cmds ret=1 _arguments -C \ {-h,--help}'[Show help]' \ {-V,--version}'[Show program version]' \ {-v,--verbose}'[Show commands as they happen]' \ {-s,--simulate}'[Run in simulation mode]' \ {-t,--trace}'[Show backtraces when errors occur]' \ -f'[Use FILE as the deploy configuration]:file:_files' \ '*: :->cmds' && ret=0 case $state in cmds) cmds=( ${(f)"$(_call_program commands mina -T 2> /dev/null | sed -e 's/:/\\:/g; s/\[/\\[/g; s/\]/\\]/g; s/mina \([^ ]*\) .*# /\1:/g')"} ) _describe -t commands 'mina command' cmds && ret=0 ;; esac return ret # 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 ================================================ FILE: src/_mix ================================================ #compdef mix #autoload # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Elixir Mix # # Last updated: 18.04.2017 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Han Ngo (https://github.com/tieubao) # * Teja Sophista (https://github.com/tejanium) # # ------------------------------------------------------------------------------ local -a _1st_arguments _1st_arguments=( 'app.start:Starts all registered apps' 'app.tree:Prints the application tree' 'archive:Lists installed archives' 'archive.build:Archives this project into a .ez file' 'archive.install:Installs an archive locally' 'archive.uninstall:Uninstalls archives' 'clean:Deletes generated application files' 'cmd:Executes the given command' 'compile:Compiles source files' 'deps:Lists dependencies and their status' "deps.clean:Deletes the given dependencies' files" 'deps.compile:Compiles dependencies' 'deps.get:Gets all out of date dependencies' 'deps.tree:Prints the dependency tree' 'deps.unlock:Unlocks the given dependencies' 'deps.update:Updates the given dependencies' 'do:Executes the tasks separated by comma' 'ecto:Prints Ecto help information' 'ecto.create:Creates the repository storage' 'ecto.drop:Drops the repository storage' 'ecto.dump:Dumps the repository database structure' 'ecto.gen.migration:Generates a new migration for the repo' 'ecto.gen.repo:Generates a new repository' 'ecto.load:Loads previously dumped database structure' 'ecto.migrate:Runs the repository migrations' 'ecto.migrations:Displays the repository migration status' 'ecto.rollback:Rolls back the repository migrations' 'escript:Lists installed escripts' 'escript.build:Builds an escript for the project' 'escript.install:Installs an escript locally' 'escript.uninstall:Uninstalls escripts' 'gettext.extract:Extracts translations from source code' 'gettext.merge:Merge template files into translation files' 'help:Prints help information for tasks' 'hex:Prints Hex help information' 'hex.build:Builds a new package version locally' 'hex.config:Reads, updates or deletes Hex config' 'hex.docs:Fetch or open documentation of a package' 'hex.info:Prints Hex information' 'hex.key:Manages Hex API key' 'hex.outdated:Shows outdated Hex deps for the current project' 'hex.owner:Manages Hex package ownership' 'hex.public_keys:Manages Hex public keys' 'hex.publish:Publishes a new package version' 'hex.retire:Retires a package version' 'hex.search:Searches for package names' 'hex.user:Registers or manages Hex user' 'loadconfig:Loads and persists the given configuration' 'local:Lists local tasks' 'local.hex:Installs Hex locally' 'local.phoenix:Updates Phoenix locally' 'local.phx:Updates the Phoenix project generator locally' 'local.public_keys:Manages public keys' 'local.rebar:Installs Rebar locally' 'new:Creates a new Elixir project' 'phoenix.gen.html:Generates controller, model and views for an HTML based resource' 'phoenix.server:Starts applications and their servers' 'phx.digest:Digests and compresses static files' 'phx.digest.clean:Removes old versions of static assets.' 'phx.gen.auth:Generates a flexible, pre-built authentication system' 'phx.gen.channel:Generates a Phoenix channel' 'phx.gen.context:Generates a context with functions around an Ecto schema' 'phx.gen.html:Generates controller, views, and context for an HTML resource' 'phx.gen.live:Generates controller, context and helper for a LiveView resource' 'phx.gen.json:Generates controller, views, and context for a JSON resource' 'phx.gen.presence:Generates a Presence tracker' 'phx.gen.schema:Generates an Ecto schema and migration file' 'phx.gen.secret:Generates a secret' 'phx.new:Creates a new Phoenix application' 'phx.new.ecto:Creates a new Ecto project within an umbrella project' 'phx.new.web:Creates a new Phoenix web project within an umbrella project' 'phx.routes:Prints all routes' 'phx.server:Starts applications and their servers' 'profile.fprof:Profiles the given file or expression with fprof' 'run:Runs the given file or expression' "test:Runs a project's tests" 'xref:Performs cross reference checks' '--help:Describe available tasks' '--version:Prints the Elixir version information' ) __task_list () { local expl declare -a tasks tasks=( 'app.start' 'app.tree' 'archive' 'archive.build' 'archive.install' 'archive.uninstall' 'clean' 'cmd' 'compile' 'deps' 'deps.clean' 'deps.compile' 'deps.get' 'deps.tree' 'deps.unlock' 'deps.update' 'do' 'ecto' 'ecto.create' 'ecto.drop' 'ecto.dump' 'ecto.gen.migration' 'ecto.gen.repo' 'ecto.load' 'ecto.migrate' 'ecto.migrations' 'ecto.rollback' 'escript' 'escript.build' 'escript.install' 'escript.uninstall' 'gettext.extract' 'gettext.merge' 'format' 'help' 'hex' 'hex.build' 'hex.config' 'hex.docs' 'hex.info' 'hex.key' 'hex.outdated' 'hex.owner' 'hex.public_keys' 'hex.publish' 'hex.retire' 'hex.search' 'hex.user' 'loadconfig' 'local' 'local.hex' 'local.public_keys' 'local.rebar' 'new' 'phoenix.gen.html' 'phoenix.server' 'phx.digest' 'phx.digest.clean' 'phx.gen.auth' 'phx.gen.channel' 'phx.gen.context' 'phx.gen.html' 'phx.gen.live' 'phx.gen.json' 'phx.gen.presence' 'phx.gen.schema' 'phx.gen.secret' 'phx.routes' 'phx.server' 'profile.fprof' 'run' 'test' 'xref' ) _wanted tasks expl 'help' compadd $tasks } local expl local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) _describe -t commands "mix subcommand" _1st_arguments ;; (options) case $line[1] in (help) _arguments ':feature:__task_list' ;; (test|format|run) _arguments ':PATH:_files' ;; esac ;; esac # 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 ================================================ FILE: src/_mkcert ================================================ #compdef mkcert # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 mkcert v1.4.4 (https://github.com/FiloSottile/mkcert) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)-help[Print help message]' \ '(- *)-version[Print version information]' \ '-install[Install the local CA in the system trust store]' \ '-uninstall[Uninstall the local CA]' \ '-cert-file[Specify cert file output path]:path:_files' \ '-key-file[Specify key file output path]:path:_files' \ '-p12-file[Specify p12 file output path]:path:_files' \ '-client[Generate a certificate for client authentication]' \ '-ecdsa[Generate a certificate with an ECDSA key]' \ '-pkcs12[Generate a ".p12" PKCS #12 file]' \ '-csr[Generate a certificate based on the supplied CSR]:csr' \ '(- *)-CAROOT[Print the CA certificate and key storage location]' \ && 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 ================================================ FILE: src/_mssh ================================================ #compdef mssh # ------------------------------------------------------------------------------ # Copyright (c) 2020 Hyeon Kim # # 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 # ----------- # mssh is a Python client for accessing EC2 instances via AWS EC2 Instance # Connect. # # References: # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html#ec2-instance-connect-connecting-ec2-cli # https://github.com/aws/aws-ec2-instance-connect-cli # https://pypi.org/project/ec2instanceconnectcli/ # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hyeon Kim (https://hyeon.me/) # # ------------------------------------------------------------------------------ # Do nothing if there's no AWS CLI if (( ! $+commands[aws] )); then return fi # Define function only when it doesn't exist (( $+functions[_mssh_cache_policy] )) || _mssh_cache_policy() { # Cache invalidates after 30 seconds # # Reference: # https://zsh.sourceforge.net/Doc/Release/Expansion.html#index-globbing_002c-qualifiers local -a oldp oldp=( "$1"(ms+30) ) (( $#oldp )) } # Unless user explicitly turned off caching, enable caching just for this context local existing_setting zstyle -s ":completion:${curcontext}:" use-cache existing_setting if [[ -z "${existing_setting}" ]]; then zstyle ":completion:${curcontext}:" use-cache on fi # Update cache policy only when there was no existing policy local existing_policy zstyle -s ":completion:${curcontext}:" cache-policy existing_policy if [[ -z "${existing_policy}" ]]; then zstyle ":completion:${curcontext}:" cache-policy _mssh_cache_policy fi local -a instances if _cache_invalid mssh_instances || ! _retrieve_cache mssh_instances; then # Cache is invalid or caching retrieval failed (usually due to disabled cache) # Store the output of the AWS CLI separately # # Reference: # https://unix.stackexchange.com/a/430182 local stderr local -i exit_code () { aws ec2 describe-instances \ --query 'Reservations[].Instances[] | [?State.Name == `running`].join(`:`, [InstanceId, Tags[?Key == `Name`].Value | [0]])' \ --output text \ >${1} 2>${2} exit_code=${?} IFS=$'\n\t' instances=($(<${1})) stderr=$(<${2}) } =(:) =(:) if (( $exit_code == 0 )); then # AWS CLI successfully executed _store_cache mssh_instances instances else # AWS CLI failed, abort autocompletion _message -r "\ Failed autocomplete due to following reason: ${stderr}" return fi fi _describe 'command' instances # Reference: # https://zsh.sourceforge.net/Doc/Release/Completion-System.html # https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org # 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 ================================================ FILE: src/_mussh ================================================ #compdef mussh # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 MUltihost SSH Wrapper (https://sourceforge.net/projects/mussh/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Mario Fernandez (https://github.com/sirech) # # ------------------------------------------------------------------------------ _arguments \ '(- *)--help[display this help message]' \ '-d-[Verbose debug]:level:(0 1 2)' \ '-v-[SSH debug levels]:level:(0 1 2 3)' \ '-m-[Run concurrently on the specified hosts at a time. "0" is used for infinite]:count' \ '-q[No output unless necessary]' \ '*-i[Load an identity file. May be used more than once]:identity:_files' \ '-o[Args to pass to ssh with -o option]:ssh-args' \ '(-a -A)-a[Force loading ssh-agent]' \ '(-a -A)-A[Do NOT load ssh-agent]' \ '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \ '(-b -B)-B[Allow hosts output to mingle. (default)]' \ '(-u -U)-u[Unique. Eliminate duplicate hosts. (default)]' \ '(-u -U)-U[Do NOT make host list unique]' \ '-P[Do NOT fall back to passwords on any host. This will skip hosts where keys fail]' \ '(-l -L)-l[Use _login_ when no other is specified with the hostname]:login' \ '(-l -L)-L[Force use of _login_ on all hosts]:login' \ '-s[Path to shell on remote host]:shell' \ '-t[Timeout setting for each session]:timeout' \ '(- *)-V[print version info and exit]' \ '-p[Host to use as proxy]:[user@]host:_hosts' \ '-po[Args to pass to ssh on proxy with -o option]:ssh-args' \ '*-h[Add a host to list of hosts]:user@host' \ '*-H[Add contents of file to list of hosts]:host file:_files' \ '(-c -C)-c[Add a command or quoted list of commands to list of commands to be executed on each host]:command' \ '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files' # 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 ================================================ FILE: src/_mvn ================================================ #compdef mvn mvnDebug # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for Maven 3.x and 4.x (https://maven.apache.org/). # # Status: See FIXME and TODO tags. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ # Notes # ----- # # * By default advanced phases are displayed only if you start typing them. To have # them always displayed: # # zstyle ':completion:*:mvn:*' show-all-phases true # # * By default full form plugins (groupId:artifactId[:version]) are only shown if you # start typing them. To have them always displayed: # # zstyle ':completion:*:mvn:*' show-full-form-plugins true # # * By default only the plugins for which the completion has already been # called ("mvn plugin:") are shown. To define your own list of plugins: # # maven_plugins=(jboss tomcat gwt android) # zstyle ':completion:*:mvn:*' plugins $maven_plugins # # * To have a better presentation of completions: # # zstyle ':completion:*:*:mvn:*:matches' group 'yes' # zstyle ':completion:*:*:mvn:*:options' description 'yes' # zstyle ':completion:*:*:mvn:*:options' auto-description '%d' # zstyle ':completion:*:*:mvn:*:descriptions' format $'\e[1m -- %d --\e[22m' # zstyle ':completion:*:*:mvn:*:messages' format $'\e[1m -- %d --\e[22m' # zstyle ':completion:*:*:mvn:*:warnings' format $'\e[1m -- No matches found --\e[22m' # # ------------------------------------------------------------------------------ _mvn() { typeset -A opt_args local context state line local curcontext="$curcontext" maven_version excl_opts opts excl_opts=(-h --help -v --version -ep --encrypt-password -emp --encrypt-master-password) opts=( "(- : *)"{-h,--help}'[display help information]' "(- : *)"{-v,--version}'[display version information]' "(- : *)"{-emp,--encrypt-master-password}'[encrypt master security password]:master password:_mvn_passwords' "(- : *)"{-ep,--encrypt-password}'[encrypt server password]:password:_mvn_passwords' "($excl_opts -B --batch-mode)"{-B,--batch-mode}'[run in non-interactive (batch) mode]' "($excl_opts -b --builder)"{-b,--builder}'[The id of the build strategy to use]' "($excl_opts -V --show-version)"{-V,--show-version}'[display version information without stopping build]' "($excl_opts -q --quiet -X --debug)"{-q,--quiet}'[quiet output, only show errors]' "($excl_opts -X --debug -q --quiet)"{-X,--debug}'[produce execution debug output]' "($excl_opts -llr --legacy-local-repository)"{-llr,--legacy-local-repository}'[Use Maven 2 Legacy Local Repository behaviour]' "($excl_opts -N --non-recursive)"{-N,--non-recursive}'[do not recurse into sub-projects]' "($excl_opts -C --strict-checksums -c --lax-checksums)"{-C,--strict-checksums}'[fail the build if checksums don'\''t match]' "($excl_opts -c --lax-checksums -C --strict-checksums)"{-c,--lax-checksums}'[warn if checksums don'\''t match]' "($excl_opts -e --errors)"{-e,--errors}'[produce execution error messages]' "($excl_opts -f --file)"{-f,--file}'[force the use of an alternate POM file]:POM file:_mvn_pom_files' "($excl_opts -s --settings)"{-s,--settings}'[alternate path for the user settings file]:settings file:_mvn_settings_files' "($excl_opts -gs --global-settings)"{-gs,--global-settings}'[alternate path for the global settings file]:global settings file:_mvn_settings_files' "($excl_opts -gt --global-toolchains)"{-gt,--global-toolchains}'[alternate path for the global toolchains file]:global toolchains file:_mvn_toolchains_files' "($excl_opts -fae --fail-at-end -ff --fail-fast -fn --fail-never)"{-fae,--fail-at-end}'[only fail the build afterwards, allow all non-impacted builds to continue]' "($excl_opts -ff --fail-fast -fae --fail-at-end -fn --fail-never)"{-ff,--fail-fast}'[stop at first failure in reactorized builds]' "($excl_opts -fn --fail-never -fae --fail-at-end -ff --fail-fast)"{-fn,--fail-never}'[never fail the build, regardless of project result]' "($excl_opts)*"{-P,--activate-profiles}'[comma-delimited list of profiles to activate]:profile:_mvn_profiles -s ,' "($excl_opts -pl --projects)"{-pl,--projects}'[build specified reactor projects instead of all projects]:project list:_mvn_projects -s ,' "($excl_opts -rf --resume-from)"{-rf,--resume-from}'[resume reactor from specified project]:project:_mvn_projects' "($excl_opts -o --offline -U --update-snapshots -cpu --check-plugin-updates -up --update-plugins)"{-o,--offline}'[work offline]' "($excl_opts -U --update-snapshots -nsu --no-snapshot-updates -o --offline)"{-U,--update-snapshots}'[force a check for updated releases and snapshots on remote repositories]' "($excl_opts -nsu --no-snapshot-updates -U --update-snapshots -o --offline)"{-nsu,--no-snapshot-updates}'[Suppress SNAPSHOT updates]' "($excl_opts -ntp --no-transfer-progress)"{-ntp,--no-transfer-progress}'[Do not display transfer progress when downloading or uploading ]' "*"{-D-,--define}'[define a system property]:property:_mvn_properties' ) _pick_variant -r maven_version maven4='Maven 4' maven3='Maven 3' maven2='Maven 2' unknown --version if [[ $maven_version == 'maven4' || $maven_version == 'maven3' ]]; then opts+=( "($excl_opts --color)"'--color[defines the color mode of the output. Supported are auto, always, never]: :(never always auto)' "($excl_opts -T --threads)"{-T,--threads}'[thread count, for instance 2.0C where C is core multiplied]:thread count:_mvn_thread_counts' "($excl_opts -t --toolchains)"{-t,--toolchains}'[alternate path for the user toolchains file]:toolchains file:_mvn_toolchains_files' "($excl_opts -l --log-file)"{-l,--log-file}'[log file to where all build output will go]:log file:_mvn_log_files' ) elif [[ $maven_version == 'maven2' ]]; then opts+=( "($excl_opts -cpu --check-plugin-updates -up --update-plugins -npu --no-plugin-updates -o --offline)"{-cpu,--check-plugin-updates,-up,--update-plugins}'[force upToDate check for any relevant registered plugins]' "($excl_opts -npr --no-plugin-registry)"{-npr,--no-plugin-registry}'[don'\''t use plugin-registry.xml for plugin versions]' "($excl_opts -npu --no-plugin-updates -cpu --check-plugin-updates -up --update-plugins)"{-npu,--no-plugin-updates}'[suppress upToDate check for any relevant registered plugins]' "($excl_opts -r --reactor)"{-r,--reactor}'[dynamically build reactor from subdirectories]:reactor:_mvn_reactors' ) fi if [[ $maven_version == 'maven4' ]]; then opts+=( "($excl_opts -canf --cache-artifact-not-found)"{-canf,--cache-artifact-not-found}'[defines caching behaviour for not found artifacts]: :(false true)' "($excl_opts -fos --fail-on-severity)"{-fos,--fail-on-severity}'[configure which severity of logging should cause the build to fail]: :(WARN ERROR)' "($excl_opts -itr --ignore-transitive-repositories)"{-itr,--ignore-transitive-repositories}'[if set, Maven will ignore remote repositories introduced by transitive dependencies]' "($excl_opts --non-interactive)"'--non-interactive[run in non-interactive mode. Alias for --batch-mode]' "($excl_opts -r --resume)"{-r,--resume}'[resume reactor from the last failed project, using the resume.properties file in the build directory]' ) fi [[ -n ${(M)words:#"-pl"} || -n ${(M)words:#"--projects"} ]] && opts+=( "($excl_opts -am --also-make)"{-am,--also-make}'[if project list is specified, also build projects required by the list]' "($excl_opts -amd --also-make-dependents)"{-amd,--also-make-dependents}'[if project list is specified, also build projects that depend on projects on the list]' ) opts+=( "($excl_opts)*: :_mvn_args" ) _arguments -C "$opts[@]" } (( $+functions[_mvn_args] )) || _mvn_args() { _alternative \ 'phases:phase:_mvn_phases' \ 'plugin-colon-goals:plugin colon goal:_mvn_plugin_colon_goals' } (( $+functions[_mvn_phases] )) || _mvn_phases() { local phases phases=( 'clean:remove all files generated by the previous build' 'compile:compile the source code of the project' 'test:run tests using a suitable unit testing framework' 'package:take the compiled code and package it in its distributable format, such as a JAR' 'integration-test:process and deploy the package if necessary into an environment where integration tests can be run' 'verify:run any checks to verify the package is valid and meets quality criteria' 'install:install the package into the local repository, for use as a dependency in other projects locally' 'deploy:done in an integration or release environment, copies the final package to the remote repository' 'site:generates the projects site documentation' 'site-deploy:deploys the generated site documentation to the specified web server' ) if [[ $#PREFIX -gt 0 ]] || zstyle -t ":completion:${curcontext}:" show-all-phases; then phases+=( 'pre-clean:executes processes needed prior to the actual project cleaning' 'post-clean:executes processes needed to finalize the project cleaning' 'validate:validate the project is correct and all necessary information is available' 'initialize:initialize build state, e.g. set properties or create directories' 'generate-sources:generate any source code for inclusion in compilation' 'process-sources:process the source code, for example to filter any values' 'generate-resources:generate resources for inclusion in the package' 'process-resources:copy and process the resources into the destination directory, ready for packaging' 'process-classes:post-process the generated files from compilation' 'generate-test-sources:generate any test source code for inclusion in compilation' 'process-test-sources:process the test source code, for example to filter any values' 'generate-test-resources:create resources for testing' 'process-test-resources:copy and process the resources into the test destination directory' 'test-compile:compile the test source code into the test destination directory' 'process-test-classes:post-process the generated files from test compilation' 'prepare-package:perform any operations necessary to prepare a package before the actual packaging' 'pre-integration-test:perform actions required before integration tests are executed' 'post-integration-test:perform actions required after integration tests have been executed' 'pre-site:executes processes needed prior to the actual project site generation.' 'post-site:executes processes needed to finalize the site generation, and to prepare for site deployment' ) fi _describe -t 'phases' "phase" phases } (( $+functions[_mvn_plugins] )) || _mvn_plugins() { local ret=1 if [[ $words[CURRENT] == *.* ]] || zstyle -t ":completion:${curcontext}:" show-full-form-plugins; then _wanted full-form-plugins expl 'full form plugin' _mvn_full_form_plugins && ret=0 else _wanted plugin-prefixes expl 'plugin prefix' _mvn_plugin_prefixes && ret=0 fi return ret } (( $+functions[_mvn_plugin_colon_goals] )) || _mvn_plugin_colon_goals() { local ret=1 if [[ $words[CURRENT] == *.* ]] || zstyle -t ":completion:${curcontext}:" show-full-form-plugins; then _wanted full-form-plugin-colon-goals expl 'full form plugin colon goal' _mvn_full_form_plugin_colon_goals && ret=0 else _wanted plugin-prefix-colon-goals expl 'plugin prefix colon goal' _mvn_plugin_prefix_colon_goals && ret=0 fi return ret } (( $+functions[_mvn_plugin_prefix_colon_goals] )) || _mvn_plugin_prefix_colon_goals() { local ret=1 if compset -P '*:'; then local plugin="${IPREFIX%:}" _wanted goals expl "${plugin} plugin goal" _mvn_plugin_goals $plugin && ret=0 else _wanted plugin-prefixes expl 'plugin prefix' _mvn_plugin_prefixes -qS: && ret=0 fi return ret } (( $+functions[_mvn_plugin_prefixes] )) || _mvn_plugin_prefixes() { local plugins zstyle -a ":completion:${curcontext}:" plugins plugins [[ $#plugins -eq 0 ]] && plugins=($(__mvn_get_plugin_prefix $(__mvn_get_cache_dir)/mvn/plugins/*(:t))) _describe -t plugin-prefixes 'plugin prefix' plugins $@ } (( $+functions[_mvn_full_form_plugin_colon_goals] )) || _mvn_full_form_plugin_colon_goals() { local ret=1 # FIXME Duplicates _mvn_full_form_plugins if compset -P 1 '*:'; then local groupId="${${IPREFIX%:}##*:}" if compset -P 1 '*:'; then local artifactId="${${IPREFIX%:}##*:}" if compset -P 1 '*:'; then local version="${${IPREFIX%:}##*:}" _wanted goals expl "${artifactId}:${version} goal" _mvn_plugin_goals "${groupId}:${artifactId}:${version}" && ret=0 else _alternative \ "versions:${artifactId} version:_mvn_artifact_versions -qS: ${groupId}:${artifactId}" \ "goals:${artifactId} goal:_mvn_plugin_goals ${groupId}:${artifactId}" \ && ret=0 fi else _wanted artifactIds expl "${groupId} artifactId" _mvn_groupId_artifactIds -qS: $groupId && ret=0 fi else _wanted groupIds expl "groupId" _mvn_groupIds -qS: && ret=0 fi return ret } (( $+functions[_mvn_full_form_plugins] )) || _mvn_full_form_plugins() { local ret=1 chunk="${PREFIX%%:*}" if compset -P 1 '*:'; then local groupId="$chunk" chunk="${PREFIX%%:*}" if compset -P 1 '*:'; then _wanted versions expl "${current} version" _mvn_artifact_versions $@ "${groupId}:${chunk}" && ret=0 else _wanted artifactIds expl "${groupId} artifactId" _mvn_groupId_artifactIds -qS: "${groupId}" && ret=0 fi else _wanted groupIds expl "groupId" _mvn_groupIds -qS: && ret=0 fi return ret } (( $+functions[_mvn_groupIds] )) || _mvn_groupIds() { local repository_location=$(__mvn_get_repository_location) update_policy ret=1 zstyle -s ":completion:${curcontext}:" cache-policy update_policy [[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_groupIds_caching_policy if [[ -d $repository_location ]]; then 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 [[ $#_groupIds -gt 0 ]] && _multi_parts $@ . _groupIds && ret=0 fi return ret } (( $+functions[_mvn_groupId_artifactIds] )) || _mvn_groupId_artifactIds() { local groupId_repository_location="${$(__mvn_get_repository_location)}/${${@[-1]}//\.//}" ret=1 if [[ -d $groupId_repository_location ]]; then local artifactIds; artifactIds=($groupId_repository_location/*/*/*.pom(:h:h:t)) _describe -t artifactIds "artifactId" artifactIds $@[0,-2] && ret=0 fi return ret } (( $+functions[_mvn_artifact_versions] )) || _mvn_artifact_versions() { local artifact_repository_location="${$(__mvn_get_repository_location)}/${${@[-1]}//[\.:]//}" ret=1 if [[ -d $artifact_repository_location ]]; then local versions; versions=($artifact_repository_location/*/*.pom(:h:t)) _describe -t versions "version" versions $@[0,-2] fi return ret } (( $+functions[_mvn_plugin_goals] )) || _mvn_plugin_goals() { local ret=1 plugin="$@[-1]" update_policy zstyle -s ":completion:${curcontext}:" cache-policy update_policy [[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_goals_caching_policy 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\\: /:}}) [[ $#_goals -gt 0 ]] && _store_cache "mvn/plugins/${plugin}" _goals fi [[ $#_goals -gt 0 ]] && _describe -t "goals" "${plugin} goal" _goals $@[0,-2] && ret=0 return ret } (( $+functions[_mvn_profiles] )) || _mvn_profiles() { # FIXME Use "mvn help:all-profiles" output instead of parsing settings and pom files... # Blocked on http://jira.codehaus.org/browse/MPH-82 and http://jira.codehaus.org/browse/MPH-83 local profs update_policy settings_file=$(__mvn_get_settings_file) parent_pom_file=$(__mvn_get_parent_pom_file) cache_name profiles_section ret=1 # TODO Should be split into _mvn_profiles/mvn_profiles_lists zstyle -s ":completion:${curcontext}:" cache-policy update_policy [[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_profiles_caching_policy profs=() # Resolve profiles from settings.xml if [[ -f $settings_file ]]; then 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 ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid "$cache_name" ) && ! _retrieve_cache "$cache_name"; then _profiles=() profiles_section="${(M)${(f)$(<$settings_file)}:#**}" if [[ -n "$profiles_section" ]]; then for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*}%*}//*<\/repositories>}//*<\/pluginRepositories>}//*<\/build>}//<\/id>*/,,,}##*}%%*}}; do [[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in settings file"']') done fi [[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles fi profs+=($_profiles) fi # Resolve project profiles if [[ -f $parent_pom_file ]]; then 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 ( [[ ${+_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)}:#**}" if [[ -n "$profiles_section" ]]; then for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*}%*}//*<\/repositories>}//*<\/pluginRepositories>}//*<\/build>}//<\/id>*/,,,}##*}%%*}}; do [[ -z ${(M)profiles:#"$profile"*} ]] && _profiles+=("$profile"'['"in ${file#${parent_pom_file:h}\/}"']') done fi done [[ $#_profiles -gt 0 ]] && _store_cache "$cache_name" _profiles fi profs+=($_profiles) fi compset -P '-'; compset -P '+'; compset -P '!' # FIXME Only works for the first profile [[ $#profs -gt 0 ]] && _values $@ 'profile' "${profs[@]}" && ret=0 return ret } (( $+functions[_mvn_projects] )) || _mvn_projects() { # TODO Projects can also be given in the form [groupId:]artifactId. # TODO Should be split into _mvn_projects/mvn_projects_lists local pom_file=$(__mvn_get_parent_pom_file) ret=1 if [[ -f $pom_file ]]; then setopt localoptions extendedglob local projects; projects=(${pom_file:h}/*/**/pom.xml~*target\/*) # FIXME project.build.directory is not always target/ projects=(${${projects#.\/}:h}) [[ $#projects -gt 0 ]] && _values "$@" 'project' "${projects[@]}" && ret=0 fi return ret } (( $+functions[_mvn_properties] )) || _mvn_properties() { local ret=1 if compset -P '*='; then _wanted property-values expl 'property value' _mvn_property_values ${${IPREFIX%=}#-D} && ret=0 else _wanted property-names expl 'property name' _mvn_property_names -qS= && ret=0 fi return ret } (( $+functions[_mvn_property_names] )) || _mvn_property_names() { # FIXME "-qS=" should be inherited from _mvn_properties local alternatives; alternatives=( "common-property-names:common property name:_mvn_common_property_names -qS=" ) for plugin_colon_goal in ${(M)words:#[^-]*:*}; do alternatives+=("plugin-property-names:plugin property name:_mvn_plugin_goal_property_names -qS= ${plugin_colon_goal}") done _alternative "${alternatives[@]}" } (( $+functions[_mvn_common_property_names] )) || _mvn_common_property_names() { local properties; properties=( 'skipTests:skip tests execution' 'maven.test.skip:skip tests compilation and execution' 'gpg.passphrase:gpg passphrase' 'tycho.mode:enable maven mode for Tycho projects to disable p2 resolution' ) _describe -t 'common-property-names' 'common property name' properties $@ } (( $+functions[_mvn_plugin_goal_property_names] )) || _mvn_plugin_goal_property_names() { local plugin_colon_goal="$@[-1]" update_policy ret=1 zstyle -s ":completion:${curcontext}:" cache-policy update_policy [[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _mvn_properties_caching_policy 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]##:*}) [[ $#_properties -gt 0 ]] && _store_cache "mvn/plugins/${plugin_colon_goal}" _properties fi [[ $#_properties -gt 0 ]] && _describe -t "${plugin_colon_goal//:/-}-property-names" "${plugin_colon_goal} property name" _properties $@[0,-2] && ret=0 return ret } (( $+functions[_mvn_property_values] )) || _mvn_property_values() { local ret=1 setopt localoptions extendedglob case $@[-1] in ((#i)*pomFile*) _wanted pom-files expl 'POM file' _mvn_pom_files && ret=0;; ((#i)*file*) _wanted files expl 'file' _files && ret=0;; ((#i)*groupId*) _wanted groupIds expl 'groupId' _mvn_groupIds && ret=0;; ((#i)*artifactId*) _wanted artifactIds expl 'artifactId' _mvn_groupId_artifactIds ${${(M)${(ps.:.)opt_args[(K)-D]}:#groupId=*}#groupId=} && ret=0;; ((#i)*version*) _wanted versions expl 'version' _mvn_artifact_versions ${${(M)${(ps.:.)opt_args[(K)-D]}:#groupId=*}#groupId=}:${${(M)${(ps.:.)opt_args[(K)-D]}:#artifactId=*}#artifactId=} && ret=0;; ((#i)*repositoryId*) _message -e repositoryIds 'repositoryId' && ret=0;; # TODO Not implemented ((#i)*classifier*) _message -e classifiers 'classifier' && ret=0;; ((#i)*scope*) _wanted scopes expl 'scope' _mvn_scopes && ret=0;; ((#i)*url*) _wanted urls expl 'url' _urls && ret=0;; # TODO Use _alternative and add repository urls from settings + projects ((#i)*(password|passphrase)*) _wanted passwords expl password _mvn_passwords && ret=0;; ((#i)*(createChecksum|generatePom|maven.test.skip)*) _wanted booleans expl 'boolean' _mvn_booleans && ret=0;; ((#i)*user*) _wanted users expl 'user' _users && ret=0;; # TODO Use _alternative and add repository usernames from settings + projects ((#i)*plugin*) _wanted plugin expl 'plugin' _mvn_plugins && ret=0;; ((#i)*tycho.mode*) _wanted tychomodes expl 'tychomode' _mvn_tycho_modes && ret=0;; (*) _default && ret=0;; esac return ret } (( $+functions[_mvn_scopes] )) || _mvn_scopes() { local scopes; scopes=( 'compile:default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.' 'provided:much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.' 'runtime:indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.' 'test:indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.' 'system:similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.' 'import:only used on a dependency of type pom in the section. It indicates that the specified POM should be replaced with the dependencies in that POM'\''s section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency.' ) _describe -t scopes 'scope' scopes } (( $+functions[_mvn_thread_counts] )) || _mvn_thread_counts() { local thread_counts; thread_counts=( '1:build with 1 thread' '1C:build with 1 thread per CPU core' '2:build with 2 threads' '2C:build with 2 threads per CPU core' '3:build with 3 threads' '3C:build with 3 threads per CPU core' '4:build with 4 threads' '4C:build with 4 threads per CPU core' '5:build with 5 threads' '5C:build with 5 threads per CPU core' '6:build with 6 threads' '6C:build with 6 threads per CPU core' '7:build with 7 threads' '7C:build with 7 threads per CPU core' '8:build with 8 threads' '8C:build with 8 threads per CPU core' ) _describe -t thread-counts 'thread count' thread_counts } (( $+functions[_mvn_reactors] )) || _mvn_reactors() { _message -e reactors 'reactor' # FIXME No idea what kind of value the "--reactor" option is supposed to take } (( $+functions[_mvn_passwords] )) || _mvn_passwords() { _message -e passwords 'password' } (( $+functions[_mvn_pom_files] )) || _mvn_pom_files() { _files -g '*pom*\.xml*' } (( $+functions[_mvn_toolchains_files] )) || _mvn_toolchains_files() { _files -g '*toolchains*\.xml*' } (( $+functions[_mvn_settings_files] )) || _mvn_settings_files() { _files -g '*settings*\.xml*' } (( $+functions[_mvn_log_files] )) || _mvn_log_files() { _files } (( $+functions[_mvn_booleans] )) || _mvn_booleans() { local booleans; booleans=( 'true:"true" boolean value' 'false:"false" boolean value' ) _describe -t booleans 'boolean' booleans } (( $+functions[_mvn_tycho_modes] )) || _mvn_tycho_modes() { local tychomodes; tychomodes=( 'maven:maven mode, Tycho will not do any p2 dependency resolution' ) _describe -t tychomodes 'boolean' tychomodes } # ------------------------------------------------------------------------------ # Helper functions # ------------------------------------------------------------------------------ __mvn_get_pom_file() { print ${~opt_args[-f]:-${opt_args[--file]:-pom.xml}} } __mvn_get_parent_pom_file() { local pom_file=$(__mvn_get_pom_file) while [[ -f ${pom_file:a:h:h}/pom.xml ]]; do pom_file=${pom_file:a:h:h}/pom.xml; done print $pom_file } __mvn_get_settings_file() { print ${~opt_args[-s]:-${opt_args[--settings]:-$HOME/.m2/settings.xml}} } __mvn_get_repository_location() { print ${${${${(M)"$(<$(__mvn_get_settings_file))":#**}:-$HOME/.m2/repository}##*}%%<\/localRepository>*} } __mvn_get_plugin_prefix() { print ${${${${@#*.*:}%%:*}%-plugin}/-#maven-#} } __mvn_get_cache_dir() { local cache_dir zstyle -s ":completion:${curcontext}:" cache-path cache_dir print ${cache_dir:-${ZDOTDIR:-$HOME}/.zcompcache} } # ------------------------------------------------------------------------------ # Caching policies # ------------------------------------------------------------------------------ (( $+functions[_mvn_goals_caching_policy] )) || _mvn_goals_caching_policy() { # Rebuild if cache is older than one month. local -a oldp oldp=( "$1"(NmM+1) ) (( $#oldp )) } (( $+functions[_mvn_properties_caching_policy] )) || _mvn_properties_caching_policy() { _mvn_goals_caching_policy } (( $+functions[_mvn_groupIds_caching_policy] )) || _mvn_groupIds_caching_policy() { _mvn_goals_caching_policy } (( $+functions[_mvn_profiles_caching_policy] )) || _mvn_profiles_caching_policy() { # Rebuild if cached file more recent than cache. local cached_file="${1#$(__mvn_get_cache_dir)}" [[ -f $cached_file && $cached_file -nt "$1" ]] && return 0 # Rebuild if cache is older than one week. local -a oldp oldp=( "$1"(Nmw+1) ) (( $#oldp )) && return 0 return 1 } _mvn "$@" # 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 ================================================ FILE: src/_nano ================================================ #compdef nano # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for nano 8.1 # (https://www.nano-editor.org/) # # ------------------------------------------------------------------------------ local curcontext="$curcontext" state line local -i ret=1 _arguments -s -S -C \ '(-)'{-A,--smarthome}'[enable smart home key]' \ '(-B --backup)'{-B,--backup}'[save backups of existing files]' \ '(-C --backupdir)'{-C+,--backupdir=}'[specify directory for saving unique backup files]:directory:_directories' \ '(-D --boldtext)'{-D,--boldtext}'[use bold instead of reverse video text]' \ '(-E --tabstospaces)'{-E,--tabstospaces}'[convert typed tabs to spaces]' \ '(-F --multibuffer)'{-F,--multibuffer}'[read a file into a new buffer by default]' \ '(-G --locking)'{-G,--locking}'[use vim-style lock files]' \ '(-H --historylog)'{-H,--historylog}'[log & read search replace string history]' \ '(-I --ignorercfiles)'{-I,--ignorercfiles}"[don't look at nanorc files]" \ '(-J --guidestripe)'{-J+,--guidestripe=}'[show a guide bar at specified column]:number' \ '(-K --rawsequences)'{-K,--rawsequences}'[fix numeric keypad key confusion problem]' \ '(-L --nonewlines)'{-L,--nonewlines}"[don't add an automatic newline]" \ '(-M --trimblanks)'{-M,--trimblanks}'[trim trailing spaces when hard-wrapping]' \ '(-N --noconvert -u --unix)'{-N,--noconvert}"[don't convert files from DOS/Mac format]" \ '(-O --bookstyle)'{-O,--bookstyle}'[leading whitespace means new paragraph]' \ '(-P --positionlog)'{-P,--positionlog}'[log & read location of cursor position]' \ '(-Q --quotestr)'{-Q+,--quotestr=}'[specify regular expression to match quoted parts of lines]:regex [^([ \t]*([!#%\:;>|}]|//))+]' \ '(-R --restricted)'{-R,--restricted}'[restricted mode]' \ '(-S --softwrap)'{-S,--softwrap}'[display overly long lines on multiple rows]' \ '(-T --tabsize)'{-T+,--tabsize=}'[set width of a tab]:columns [8]' \ '(-U --quickblank -c --constantshow -_ --minibar)'{-U,--quickblank}'[do quick statusbar blanking]' \ '(- *)'{-V,--version}'[print version information and exit]' \ '(-W --wordbounds -X --wordchars)'{-W,--wordbounds}'[detect word boundaries more accurately]' \ '(-X --wordchars -W --wordbounds)'{-X+,--wordchars=}'[specify which other characters are word parts]:string' \ '(-Y --syntax=)'{-Y+,--syntax=}'[syntax definition to use for coloring]:value' \ '(-Z --zap)'{-Z,--zap}'[let backspace and delete erase a marked region]' \ '(-a --atblanks)'{-a,--atblanks}'[when soft-wrapping, do it at whitespace]' \ '(-b --breaklonglines -w --nowrap)'{-b,--breaklonglines}'[automatically hard-wrap overlong lines]' \ '(-c --constantshow -U --quickblank)'{-c,--constantshow}'[show cursor position constantly]' \ '(-d --rebinddelete)'{-d,--rebinddelete}'[fix Backspace/Delete confusion problem]' \ '(-e --emptyline)'{-e,--emptyline}'[keep the line below the title bar empty]' \ '(-f --rcfile)'{-f,--rcfile=}'[Use only specified file for configuring nano]:file:_files' \ '(-g --showcursor)'{-g,--showcursor}'[show cursor in file browser & help text]' \ '(- *)'{-h,--help}'[show help text and exit]' \ '(-i --autoindent)'{-i,--autoindent}'[automatically indent new lines]' \ '(-j --jumpyscrolling)'{-j,--jumpyscrolling}'[scroll by half-screen, not by line]' \ '(-k --cutfromcursor)'{-k,--cutfromcursor}'[cut from cursor to end of line]' \ '(-l --linenumbers)'{-l,--linenumbers}'[show line numbers in front of the text]' \ '(-m --mouse)'{-m,--mouse}'[enable the use of the mouse]' \ '(-n --noread)'{-n,--noread}"[don't read the file (only write it)]" \ '(-o --operatingdir)'{-o+,--operatingdir=}'[set operating directory]:directory:_directories' \ '(-p --preserve)'{-p,--preserve}'[preserve XON (^Q) and XOFF (^S) keys]' \ '(-q --indicator)'{-q,--indicator}'[show a position+portion indicator]' \ '(-r --fill)'{-r+,--fill=}'[set width for hard-wrap and justification]:width [-8]' \ '(-s --speller)'{-s+,--speller=}'[enable alternate speller]:program:_command_names -e' \ '(-t --tempfile)'{-t,--tempfile}'[auto save on exit, do not prompt]' \ '(-u --unix -N --noconvert)'{-u,--unix}'[save a file by default in Unix format]' \ '(-v --view)'{-v,--view}'[view mode (read-only)]' \ '(-w --nowrap -b --breaklonglines)'{-w,--nowrap}"[don't hard-wrap long lines default]" \ '(-x --nohelp)'{-x,--nohelp}"[don't show the two help lines]" \ '(-y --afterends)'{-y,--afterends}'[make Ctrl+Right stop at word ends]' \ '(-z --suspend)'{-z,--suspend}'[enable suspension]' \ '(-@ --colonparsing)'{-@,--colonparsing}'[accept "filename:linenumber" notation]' \ '(-% --stateflags)'{-%,--stateflags}'[show some states in the title bar]' \ '(-_ --minibar -U --quickblank)'{-_,--minibar}'[suppress the title bar and show information at the bottom of the screen]' \ '(-! --magic)'{-\!,--magic}'[try libmagic to determine applicable syntax]' \ '(-0 --zero)'{-0,--zero}'[hide all bars, use whole terminal]' \ '(-/ --modernbindings)'{-/,--modernbindings}'[use better-known key bindings]' \ '(-t -q)*: :->args' && ret=0 if [[ -n $state ]]; then case $PREFIX in +) _message -e lines "start at a given line" ;; +[crCR]#[/?]) _message -e 'search string' ;; +<->,) _message -e 'column number' ;; *) _files && ret=0 ;; esac fi return ret # 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 ================================================ FILE: src/_nanoc ================================================ #compdef nanoc # ------------------------------------------------------------------------------ # Copyright (c) 2020 OKURA Masafumi, MIT License # # 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 nanoc 4.13.5 (https://nanoc.app/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * OKURA Masafumi (https://okuramasafumi.com) # # This works is heavily inspired by the middleman completion by # Jozef Izso (https://github.com/jozefizso) # # ------------------------------------------------------------------------------ local ret=1 local context state line local curcontext="$curcontext" local -a common_ops common_ops=( {-C,--no-color}"[disable color]" {-V,--verbose}"[make output more detailed]" {-d,--debug}"[enable debugging]" \*{-e,--env=}"[set environment]:envvar:_parameters -g '*export*' -qS=" '(- *)'{-h,--help}"[show the help message and quit]" {-l,--color}"[enable color]" '(- *)'{-v,--version}"[show version information and quit]" {-w,--warn}"[enable warnings]" ) typeset -A opt_args _arguments -C \ $common_ops \ '1:subcommand:->subcommand' \ '*::options:->options' && ret=0 case $state in subcommand) local -a subcommands subcommands=( "check:run issue checks" "compile:compile items of this site" "create-site:create a site" "deploy:deploy the compiled site" "help:show help" "prune:remove files not managed by Nanoc from the output directory" "shell:open a shell on the Nanoc environment" "show-data:show data in this site" "show-plugins:show all available plugins" "show-rules:describe the rules for each item" "view:start the web server that serves static files" ) _describe -t subcommands 'nanoc subcommand' subcommands && ret=0 ;; options) local -a args args=( $common_ops ) case $words[1] in check) args=( {-L,--list}"[list all checks]" {-a,--all}"[run all checks]" ) ;; compile) args=( {-W,--watch}'[watch for changes and recompile when needed]' "--diff[generate diff]" "--focus=[compile only items matching the given pattern]:pattern" ) ;; create-site) args=( "--force[force creation of new site]" ) ;; deploy) args=( {-C,--no-check}"[do not run the issue checks marked for deployment]" {-D,--list-deployers}"[list available deployers]" {-L,--list}"[list available locations to deploy to]" {-n,--dry-run}"[show what would be deployed]" {-t,--target=}"[specify the location to deploy to (default:\`default\`)]:target" ) ;; prune) args+=( {-n,--dry-run}"[print files to be deleted instead of actually deleting them]" {-y,--yes}"[confirm deletion]" ) ;; shell) args=( {-p,--preprocess}"[run preprocessor]" ) ;; show-data|show-plugins|show-rules) args=() ;; view) args=( {-H,--handler=}"[specify the handler to use(webrick/mongrel/...)]:handler" {-L,--live-reload}"[reload on changes]" {-o,--host=}"[specify the host to listen on(default: 127.0.0.1)]:host" {-p,--port=}"[specify the port to listen on(default: 3000)]:port" ) ;; esac _arguments $args && ret=0 ;; esac return ret # 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 ================================================ FILE: src/_neo ================================================ #compdef neo # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for neo (https://github.com/st3w/neo). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hydrargyrum (https://github.com/hydrargyrum) # # ------------------------------------------------------------------------------ _arguments \ '(-a --async)'{-a,--async}'[make each column of characters scroll at an independent speed]' \ '(-b --bold)'{-b+,--bold=}'[control if and how neo displays bold characters]:choice [1]:((0\:off 1\:random\ \(default\) 2\:all))' \ '(-C --colorfile -c --color)'{-C+,--colorfile=}'[read the colors from a file]: :_files' \ '(-C --colorfile -c --color)'{-c+,--color=}'[set the foreground text color]:color [green]:(green green2 green3 yellow orange red blue cyan gold rainbow purple pink pink2 vaporwave gray)' \ '(-D --defaultbg)'{-D,--defaultbg}'[use the default terminal background color]' \ '(-d --density)'{-d+,--density=}'[control how many droplets will appear onscreen]: :_numbers -f -d 1.0' \ '(-F --fullwidth)'{-F,--fullwidth}'[use two columns per character]' \ '(-f --fps)'{-f+,--fps=}'[set a frame rate target]: :_numbers -d 60' \ '(-G --glitchpct)'{-G+,--glitchpct=}'[set the percentage of characters onscreen that glitch]: :_numbers -f -d 10.0' \ '(-g --glitchms)'{-g+,--glitchms=}'[control how often the characters on screen glitch]:N [300,400]' \ '(-h --help)'{-h,--help}'[shows the help message]' \ '(-l --lingerms)'{-l+,--lingerms=}'[control how long characters stay onscreen after they finish scrolling]:N [1,3000]' \ '(-M --shadingmode)'{-M+,--shadingmode=}'[control how neo assigns color values to characters on the screen]:choice [1]:((0\:random\ \(default\) 1\:gradient))' \ '(-m --message)'{-m+,--message=}'[display a message in the center of the screen]:message' \ '(-p --profile)'{-p,--profile}'[turn on the profiling mode]' \ '(-r --rippct)'{-r+,--rippct=}'[set the percentage of droplets that stop scrolling before reaching the bottom of the screen]: :_numbers -f -d 33.0' \ '(-S --speed)'{-S+,--speed=}'[control how fast characters scroll down the screen]: :_numbers -f -d 8.0' \ '(-s --screensaver)'{-s,--screensaver}'[exit on the first key press]' \ '(-V --version)'{-V,--version}'[display the version, build date, copyright, and license]' \ --noglitch'[disable character glitching]' \ --chars='[display Unicode characters between NUM1 and NUM2 inclusive]:CHAR,CHAR' \ --charset='[set the charset that is used to draw characters onto the screen]:flag:(ascii extended english dec decimal digits punc bin binary hex hexadecimal katakana greek cyrillic arabic hebrew devanagari braille runic)' \ --colormode='[set the color mode]:flag:((0\:mono 16\:16\ colors 32\:32-bit\ color 256\:256\ colors))' \ --maxdpc='[set the maximum number of droplets per column]: :_numbers -d 3' \ --shortpct='[set the percentage of shortened droplets]: :_numbers -f -d 50.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 ================================================ FILE: src/_neofetch ================================================ #compdef neofetch # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for neofetch (https://github.com/dylanaraps/neofetch) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Wu Zhenyu # # ------------------------------------------------------------------------------ _neofetch_files_none() { _alternative 'none:none:((none\:"Launch the script without a config file"))' 'files:file:_files' } _neofetch_sources() { _alternative 'choices:choices:(auto ascii wallpaper "command output")' 'files: :_files' } local func_names=( title underline os distro model kernel uptime packages shell resolution de wm wm_theme icons term term_font cpu gpu memory gpu_driver cpu_usage disk battery font song local_ip public_ip users locale cols ) local colors=(black blue cyan default gray green magenta orange red white) local distros=( AIX Alpine AlterLinux Anarchy Android Antergos antiX "AOSC OS" "AOSC OS/Retro" Apricity ArcoLinux ArchBox ARCHlabs ArchStrike XFerience ArchMerge Arch Artix Arya Bedrock Bitrig BlackArch BLAG BlankOn BlueLight bonsai BSD BunsenLabs Calculate Carbs CentOS Chakra ChaletOS Chapeau Chrom Cleanjaro ClearOS Clear_Linux Clover Condres Container_Linux CRUX Cucumber Debian Deepin DesaOS Devuan DracOS DarkOs DragonFly Drauger Elementary EndeavourOS Endless EuroLinux Exherbo Fedora Feren FreeBSD FreeMiNT Frugalware Funtoo GalliumOS Garuda Gentoo Pentoo gNewSense GNOME GNU GoboLinux Grombyang Guix Haiku Huayra Hyperbola janus Kali KaOS KDE_neon Kibojoe Kogaion Korora KSLinux Kubuntu LEDE LFS Linux_Lite LMDE Lubuntu Lunar macos Mageia MagpieOS Mandriva Manjaro Maui Mer Minix LinuxMint MX_Linux Namib Neptune NetBSD Netrunner Nitrux NixOS Nurunner NuTyX OBRevenge OpenBSD openEuler OpenIndiana openmamba OpenMandriva OpenStage OpenWrt osmc Oracle OS Elbrus PacBSD Parabola Pardus Parrot Parsix TrueOS PCLinuxOS Peppermint popos Porteus PostMarketOS Proxmox Puppy PureOS Qubes Radix Raspbian Reborn_OS Redstar Redcore Redhat Refracted_Devuan Regata Rosa sabotage Sabayon Sailfish SalentOS Scientific Septor SereneLinux SharkLinux Siduction Slackware SliTaz SmartOS Solus Source_Mage Sparky Star SteamOS SunOS openSUSE_Leap openSUSE_Tumbleweed openSUSE SwagArch Tails Trisquel Ubuntu-Budgie Ubuntu-GNOME Ubuntu-MATE Ubuntu-Studio Ubuntu Venom Void Obarun windows10 Windows7 Xubuntu Zorin IRIX ) local options=( --disable"[Allows you to disable an info line from appearing in the output]:func_name:($func_names)" --title_fqdn"[Hide/Show Fully Qualified Domain Name in title]:on/off:(on off)" --package_managers"[Hide/Show Package Manager names]:on/off:(on tiny off)" --os_arch"[Hide/Show OS architecture]:on/off:(on off)" --speed_type"[Change the type of cpu speed to display]:type:(current min max bios scaling_current scaling_min scaling_max cpufreq)" --speed_shorthand"[Whether or not to show decimals in CPU speed]:on/off:(on off)" --cpu_brand"[Enable/Disable CPU brand in output]:on/off:(on off)" --cpu_cores"[Whether or not to display the number of CPU cores]:type:(logical physical off)" --cpu_speed"[Hide/Show cpu speed]:on/off:(on off)" --cpu_temp"[Hide/Show cpu temperature]:C/F/off:(C F off)" --distro_shorthand"[Shorten the output of distro]:on/off:(on tiny off)" --kernel_shorthand"[Shorten the output of kernel]:on/off:(on off)" --uptime_shorthand"[Shorten the output of uptime]:on/off:(on tiny off)" --refresh_rate"[Whether to display the refresh rate of each monitor]:on/off:(on off)" --gpu_brand"[Enable/Disable GPU brand in output]:on/off:(on off)" --gpu_type"[Which GPU to display]:type:(all dedicated integrated)" --de_version"[Show/Hide Desktop Environment version]:on/off:(on off)" --gtk_shorthand"[Shorten output of gtk theme/icons]:on/off:(on off)" --gtk2"[Enable/Disable gtk2 theme/font/icons output]:on/off:(on off)" --gtk3"[Enable/Disable gtk3 theme/font/icons output]:on/off:(on off)" --shell_path"[Enable/Disable showing $SHELL path]:on/off:(on off)" --shell_version"[Enable/Disable showing $SHELL version]:on/off:(on off)" --disk_show"[Which disks to display]:value:('/' '/dev/sdXX' '/path/to/mount point')" --disk_subtitle"[What information to append to the Disk subtitle]:type:(name mount dir none)" --disk_percent"[Hide/Show disk percent]:on/off:(on off)" --ip_host"[URL to query for public IP]:url:_urls" --ip_timeout"[Public IP timeout (in seconds)]:int" --song_format"[Print the song data in a specific format]:format:(%artist% %album% %title%)" --song_shorthand"[Print the Artist/Album/Title on separate lines]:on/off:(on off)" --memory_percent"[Display memory percentage]:on/off:(on off)" --memory_unit"[Memory output unit]:kib/mib/gib:(kib mib gib)" --music_player"[Manually specify a player to use]:player-name" --colors"[Changes the text colors]:title color:($colors):@ color:($colors):underline color:($colors):subtitle color:($colors):colon color:($colors):info color:($colors)" --underline"[Enable/Disable the underline]:on/off:(on off)" --underline_char"[Character to use when underlining title]:char" --bold"[Enable/Disable bold text]:on/off:(on off)" --separator"[Changes the default ':' separator to the specified string]:string" --color_blocks"[Enable/Disable the color blocks]:on/off:(on off)" --col_offset"[Left-padding of color blocks]:auto/num" --block_width"[Width of color blocks in spaces]:num" --block_height"[Height of color blocks in lines]:num" --block_range"[Range of colors to print as blocks]:num::num" --bar_char"[Characters to use when drawing bars]:elapsed char::total char" --bar_border"[Whether or not to surround the bar with '\\[\\]']:on/off:(on off)" --bar_length"[Length in spaces to make the bars]:num" --bar_colors"[Colors to make the bar in elapsed, total]:num::num" --cpu_display"[Bar mode]:mode:(bar infobar barinfo off)" --memory_display"[Bar mode]:mode:(bar infobar barinfo off)" --battery_display"[Bar mode]:mode:(bar infobar barinfo off)" --disk_display"[Bar mode]:mode:(bar infobar barinfo off)" --backend"[Which image backend to use]:backend:(ascii caca chafa jp2a iterm2 off sixel tycat w3m kitty)" --source"[Which image or ascii file to use]:source:_neofetch_sources" --ascii"[Shortcut to use 'ascii' backend]:source:_neofetch_sources" --caca"[Shortcut to use 'caca' backend]:source:_neofetch_sources" --chafa"[Shortcut to use 'chafa' backend]:source:_neofetch_sources" --iterm2"[Shortcut to use 'iterm2' backend]:source:_neofetch_sources" --jp2a"[Shortcut to use 'jp2a' backend]:source:_neofetch_sources" --kitty"[Shortcut to use 'kitty' backend]:source:_neofetch_sources" --pot"[Shortcut to use 'pot' backend]:source:_neofetch_sources" --pixterm"[Shortcut to use 'pixterm' backend]:source:_neofetch_sources" --sixel"[Shortcut to use 'sixel' backend]:source:_neofetch_sources" --termpix"[Shortcut to use 'termpix' backend]:source:_neofetch_sources" --tycat"[Shortcut to use 'tycat' backend]:source:_neofetch_sources" --w3m"[Shortcut to use 'w3m' backend]:source:_neofetch_sources" --off"[Shortcut to use off backend (Disable ascii art)]" --ascii_colors"[Colors to print the ascii art]:title color:($colors):@ color:($colors):underline color:($colors):subtitle color:($colors):colon color:($colors):info color:($colors)" --ascii_distro"[Which Distro's ascii art to print]:distro:($distros)" --ascii_bold"[Whether or not to bold the ascii logo]:on/off:(on off)" {-L,--logo}"[Hide the info text and only show the ascii logo]" --loop"[Redraw the image constantly until Ctrl+C is used]" --size"[How to size the image]:00px or 00%:(auto none)" --crop_mode"[Which crop mode to use]:mode:(normal fit fill)" --crop_offset"[Change the crop offset for normal mode]:value:(northwest north northeast west center east southwest south southeast)" --xoffset"[How close the image will be to the left edge of the]:px" --yoffset"[How close the image will be to the top edge of the]:px" --bg_color"[Background color to display behind transparent image]:color:($colors)" --gap"[Gap between image and text]:num" --clean"[Delete cached files and thumbnails]" --config"[Specify a path to a custom config file]:files or none:_neofetch_files_none" --no_config"[Don't create the user config file]" '(- : *)'--print_config"[Print the default config file to stdout]" --stdout"[Turn off all colors and disables any ASCII/image backend]" '(- : *)'--help"[Print this text and exit]" '(- : *)'--version"[Show neofetch version]" -v"[Display error messages]" -vv"[Display a verbose log for error reporting]" '(- : *)'--gen-man"[Generate a manpage for Neofetch in your PWD]" ) _arguments $options "*::func_name:($func_names)" # 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 ================================================ FILE: src/_networkQuality ================================================ #compdef networkQuality # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 networkQuality on macOS 26 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments -s \ '-b[Show Bonjour advertised networkQuality servers]' \ '-B[Run against specified Bonjour instance]:name' \ '-C[Use custom configuration URL or path]:url_or_path:_urls' \ '-f[Force usage of a specific protocol selection]:option:(h1 h2 h3 L4S noL4S)' \ '-I[Bind test to interface]:interface:_net_interfaces' \ '-M[Maximum runtime in seconds]:seconds' \ '-r[Connect to host or IP]:host' \ '-S[Create a networkQuality server-instance running locally on the specified port]:port' \ '-c[Produce computer-readable output]:file:_files' \ '-d[Do not run a download test(implies -s)]' \ '-h[Show help]' \ '-k[Disable verification of the server identity via TLS]' \ '-p[Use iCloud Private Relay]' \ '-s[Run tests sequentially instead of parallel upload/download]' \ '-u[Do not run an upload test(implies -s)]' \ '-v[Verbose output]' # 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 ================================================ FILE: src/_nftables ================================================ #compdef nft # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for nft 0.9.0 (https://www.netfilter.org/projects/nftables/index.html). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Markus Richter ( https://github.com/mqus , ) # # ------------------------------------------------------------------------------ _nft(){ local -a rules states prev args families options descriptors local state="start" line nextstate cmd_obj cmd_subcmd cmd_fam cmd_tab cmd_chain #curcontext="$curcontext" options=( '(-)'{-h,--help}'[show help]' '(-)'{-v,--version}'[print version information]' "(-i --interactive)"{-i,--interactive}'[read input from interactive CLI]: :->end' "(-f --file)"{-f,--file}'[read input from ]:nftables rule file:_files' '(-c --check -n --numeric -N)'{-c,--check}"[check command's validity without actually applying the changes]" '(-j --json)'{-j,--json}'[format output in json]' '(-c --check -N)*'{-n,--numeric}'[can be specified up to 3 times, Shows 1:network addresses(default behaviour), 2:internet services (port numbers) and 3:protocols, user IDs, and group IDs numerically]' '(-s --stateless)'{-s,--stateless}'[omit stateful information of ruleset]' '(-N -n --numeric -c --check)'-N'[translate IP addresses to names]' '(-a --handle)'{-a,--handle}'[output rule handle]' '(-e --echo)'{-e,--echo}'[echo what has been added, inserted or replaced]' {-I,--includepath}'[add specified directory to the paths searched for include files]:include directory [/usr/share]:include directory:_directories' ) # start a state machine. The state is modified by _arguments if the # current argument (descriptors) cannot be completed. Each state has to define is successive state and the # 'descriptors' for _arguments, which essentially tells _arguments how to complete local _i=0 while true;do (( _i+=1 )) #Guard for endless loops [[ $_i -gt 100 ]] && return 1 descriptors=() nextstate="end" case $state in (start) ##if line is empty (at the start) or ends with semicolon, autocomplete subcommands, # else if we are after a space,complete a semicolon (end the current nft command) and start anew if [[ $line[1] = "" || $line[1] =~ ';$' ]] ; then descriptors=( ":: :_nft_subcommands" ) nextstate="category" else if [[ $words =~ ' $' ]]; then descriptors=(':: :(\;)') else descriptors=(':argument: ') fi nextstate="start" fi ;; (category) case $line[1] in (add | list | flush | delete | create | rename | insert | replace | reset) descriptors=( ":: :_nft_${line[1]}" ) nextstate=$line[1] ;; (monitor) descriptors=( ":: : _nft_mon_filter" ) nextstate="mon1" ;; (export) descriptors=( ":: :(ruleset)" ":: :_nft_out_format" ) nextstate="preend" ;; (describe) descriptors=( ":expression: ") nextstate="start" #x restart ;; (*) return 1; ;; esac #descriptors=( "(ruleset)" ) #nextstate="end" ;; (mon1) case $line[1] in (new | destroy) # descriptors=( ":: :_nft_mon_keywords" ":: :_nft_out_format") descriptors=( ":: : _nft_mon_keywords") nextstate="mon1" ;; (tables | chains | sets | rules | elements | ruleset) descriptors=( ":: : _nft_out_format") nextstate="preend" ;; esac ;; #all completions for create and insert match with the completions of add (create | insert) state="add" ;| #all completions for reset and flush match with the completions of list (reset | flush) state="list" ;| #(add(^table)/create(^table)/delete/flush(^ruleset)/insert/list(^ruleset)/rename/replace)[family]table (reset | delete | insert | rename | replace | add | create | flush | list) if [[ $state = "add" && $line[1] = "table" ]]; then descriptors=( ":: :_nft_families" ":table name:") nextstate="start" #x restart elif [[ $state = "list" && ( $line[1] = "ruleset" || $line[1] = "tables" ) ]]; then descriptors=( ":: :_nft_families") nextstate="start" #x restart elif [[ $state = "delete" && $line[1] = "table" ]]; then descriptors=(": : _nft_table all-handle") nextstate="tcomplete-delete-table" else cmd_obj=$line[1] cmd_subcmd=$state descriptors=(": : _nft_table all") nextstate="tcomplete" fi ;; (tcomplete-delete-table) # if only a family was completed, complete the table name. case $line[1] in (arp | bridge | inet | ip | ip6 | netdev) descriptors=(": : _nft_table ${line[1]}-handle") cmd_fam=$line[1] ;; # if 'handle' was completed, complete the handle number. (handle) descriptors=(": : _nft_table_handle_all " ) ;; # else, complete nothing and go to the next state. default family is 'ip' (*) descriptors=() cmd_fam="ip" ;; esac nextstate="delete-table" ;; (tcomplete) # if only a family was completed, complete the table name. case $line[1] in (arp | bridge | inet | ip | ip6 | netdev) descriptors=(": : _nft_table ${line[1]}") cmd_fam=$line[1] ;; # else, complete nothing and go to the next state. default family is 'ip' (*) descriptors=() cmd_fam="ip" ;; esac nextstate="$cmd_subcmd-$cmd_obj" ;; (list-table) descriptors=(":: :(\;)") nextstate="start" ;; (delete-table) #if family AND handle were input, complete handle number for given family. if [[ $line[1] == "handle" ]]; then descriptors=(":table handle: _nft_table_handle $cmd_fam" ) else descriptors=() fi nextstate="start" ;; (delete-chain | delete-set | delete-quota | delete-counter | delete-ct\\ helper) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab $cmd_obj true") nextstate="delete-obj-handle" ;; (delete-obj-handle) if [[ $line[1] == "handle" ]]; then descriptors=(": : _nft_object_handle $cmd_fam $cmd_tab $cmd_obj") else descriptors=(": :(\;)") fi nextstate="start" ;; (add-chain) descriptors=(":chain name:") nextstate="start" ;; (rename-chain) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab chain false") nextstate="add-chain" ;; (replace-rule | delete-rule) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab chain false") nextstate="repdel-rule" ;; (repdel-rule) cmd_chain=$line[1] descriptors=(": :(handle)" ": : _nft_rule_handle $cmd_fam $cmd_tab ${line[1]}") if [[ $cmd_subcmd = "replace" ]];then nextstate="rule-stmt" else nextstate="start" fi ;; (add-rule) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab chain false") nextstate="add-rule-2" ;; (add-rule-2) cmd_chain=$line[1] descriptors=(": :(handle index position)") nextstate="add-rule-3" ;; (add-rule-3) case $line[1] in (index | position) descriptors=(":${line[1]}:") ;; (handle) descriptors=(": : _nft_rule_handle $cmd_fam $cmd_tab $cmd_chain") ;; (*) descriptors=() ;; esac nextstate="rule-stmt" ;; (rule-stmt) #TODO # _nft_rule $cmd_fam $cmd_tab $cmd_chain\ # && return 0; descriptors=(":expression: ") nextstate="start" ;; (list-set | list-map | delete-map | list-chain | list-flowtable | delete-flowtable | list-ct\\ helper | list-counter | list-quota | list-meter) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab $cmd_obj false") nextstate="start" ;; (add-element | delete-element) cmd_tab=$line[1] descriptors=(": : _nft_object $cmd_fam $cmd_tab '\(map\|set\)' false") nextstate="start" ;; #TODO: #(add-set | add-map) #(add-flowtable) #("add-ct\ helper") #(add-counter) #(add-quota) (*) return 1; ;; esac _arguments -C -s \ "${options[@]}" \ "${descriptors[@]}" \ "*:: :->$nextstate" \ && return 0; done } # end _nft _nft_subcommands(){ local commands=( 'add:add a table, chain, rule, set, map, or object' 'list:list a ruleset, table, chain, set, map, or object' 'flush:flush (delete everything from) a ruleset, table, chain, set, or map' 'export:print the ruleset in a machine readable format (json or xml)' 'delete:delete a table, chain, rule, set, element, map, or object' 'create:similar to add but returns an error for existing chain' 'rename:rename the specified chain' 'insert:similar to the add command, but the rule is prepended to the beginning of the chain or before the rule at the given position' 'replace:similar to the add command, but replaces the specified rule' 'reset:list-and-reset stateful object' 'monitor:listen to Netlink events' 'describe:show information about the type of an expression and its data type' ) _describe -t commands 'nft subcommand' commands "$@" } _nft_mon_filter(){ local monitor_filters=( 'new:show only events of created objects' 'destroy:show only events of deleted objects' ) _describe -t monitor_filters 'nft monitor' monitor_filters -J monitor_filters "$@" _nft_mon_keywords } _nft_mon_keywords(){ local monitor_keywords=( 'tables:show table events' 'chains:show chain events' 'sets:show set events' 'rules:show rule events' 'elements:show only events of element objects' 'ruleset:show ruleset events, such as table, chain, rule, set, counters and quotas' ) _describe -t monitor_keywords 'nft monitor' monitor_keywords -J monitor_keywords "$@" _nft_out_format } _nft_out_format(){ local monitor_format=( 'json:format output to JSON' 'xml:format output to XML' ) _describe -t monitor_format "output format" monitor_format -J monitor_format "$@" } _nft_add(){ local commands=( 'table:add a new table' 'flowtable:add a new flowtable' 'chain:add a chain to a table' 'rule:add a rule to an existing chain' 'set:add a set to a table' 'map:add a map to a table' 'element:add one or multiple element(s) to a set or map' 'ct\ helper:add a ct helper to a table' 'counter:add a named counter to a table' 'quota:add a named quota helper to a table' ) _describe -t commands 'nft add' commands "$@" } _nft_create(){ local commands=( "table:add a table, but return an error if it already exists" "chain:add a chain to a table, but return an error if it already exists" "flowtable:add a flowtable, but return an error if it already exists" ) _describe -t commands 'nft create' commands "$@" } _nft_delete(){ local commands=( "table:delete the specified table" "chain:delete the specified chain, chain must be empty and mustn't be used as jump target" "rule:delete the specified rule, rule must be referable to by a handle" "set:delete the specified set" "map:delete the specified map" "element:delete element(s) from the specified set/map" "flowtable:delete the specified flowtable" "ct\ helper:delete the specified ct helper" "counter:delete the specified counter" "quota:delete the specified quota" ) _describe -t commands 'nft delete' commands "$@" } _nft_flush(){ local commands=( "ruleset:clear the whole ruleset, including removing all tables and containing objects" "table:flush all chains and rules of the specified table" "chain:flush all rules of the specified chain" "set:remove all elements from the specified set" "map:remove all elements from the specified map" ) _describe -t commands 'nft flush' commands "$@" } _nft_insert(){ local commands=( "rule:prepend a rule to the beginning of the chain or before the rule with the given handle" ) _describe -t commands 'nft insert' commands "$@" } _nft_list(){ local commands=( "ruleset:print the ruleset in human-readable format" "tables:list all tables (undocumented)" "table:list all chains and rules of the specified table" "chain:list all rules of the specified chain" "set:display the elements in the specified set" "map:display the elements in the specified map" "flowtable:list all flowtables" "ct\ helper:display stateful information the ct helper holds" "counter:display stateful information the counter holds" "quota:display stateful information the quota holds" ) _describe -t commands 'nft list' commands "$@" } _nft_rename(){ local commands=( "chain:replace a chain" ) _describe -t commands 'nft rename' commands "$@" } _nft_replace(){ local commands=( "rule:replace a rule" ) _describe -t commands 'nft replace' commands "$@" } _nft_reset(){ local commands=( 'ct\ helper:reset and list a ct helper to a table' 'counter:reset and list a counter from a table' 'quota:reset and list a quota object a table' ) _describe -t commands 'nft reset' commands "$@" } _nft_families(){ local families=( "ip:IPv4 address family" "ip6:IPv6 address family" "inet:internet (IPv4+IPv6) address family" "arp:ARP address family, handling IPv4 ARP packets" "bridge:Bridge address family, handling packets which traverse a bridge device" "netdev:Netdev address family, handling packets from ingress" ) _describe -t families 'nft families' families "$@" } _nft_table(){ # complete the names of tables and the families of existing tables #$1 can be: all all-handle -handle local tables=() if [[ "$1" =~ "^all" ]]; then local families=( ${(f)"$(_call_program -p tables nft list tables 2>/dev/null \ | cut -d\ -f2 )"} ) # ip is the default family, search also for table names there 1="${1/all/ip}" _describe -t families "family" families -J "family" fi if [[ "$1" =~ "-handle$" ]]; then tables=("handle:address the table by handle") #remove -handle from $1 to be able to complete table names 1="${1/-handle/}" _describe -t tables "table" tables -V "handle" fi case $1 in (arp | bridge | inet | ip | ip6 | netdev) tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ | grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\2:type \1, handle \3/' )"} ) _describe -t tables "table" tables -V "table-name" ;; esac } _nft_table_handle(){ # complete the handles of tables with the specified family (with the table name in the description) #$1:protocol family local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ | grep '^table '"$1" | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} ) _describe -t tables "table handle" tables } _nft_table_handle_all(){ # complete the handles of tables of all families (with the table name in the description) local tables=( ${(f)"$(_call_program -p tables nft -a list ruleset 2>/dev/null \ | grep '^table' | sed 's/table // ;s/{ # handle // ;s/\(\S*\) \(\S*\) \(\S*\)/\3:\2(type \1)/' )"} ) _describe -t tables "table handle" tables } _nft_object(){ # complete the names of objects contained directly in a table (with the handle number in the description) #$1:protocol family #$2:table #$3:object type (chain/set/map/flowtable/ct helper/counter/quota/meter) #$4:include 'handle'? local objects=( ${(f)"$(_call_program -p objects nft -a list table $1 $2 2>/dev/null\ | grep ""\^\\s\*$3"" | sed 's/\s*'"$3"' // ;s/ { # \(.*\)/:(\1)/' )"} ) if $4 ;then objects+=( "handle:address $3 by handle") fi _describe -t objects "$3" objects } _nft_object_handle(){ # complete handles of objects contained directly in a table (with the name in the description) #$1:protocol family #$2:table #$3:object type (chain/set/ct helper/counter/quota) local handles=( ${(f)"$(_call_program -p handles nft -a list table $1 $2 2>/dev/null\ | grep ""\^\\s\*$3"" | sed 's/\s*'"$3"' // ;s/ { # handle// ;s/\(\S*\) \(\S*\)/\2:\1/' )"} ) _describe -t handles "$3-handle" handles } _nft_rule_handle(){ # complete the handles of rules (and put the rule into the description) #$1:protocol family #$2:table #$3:chain name local rules=( ${(f)"$(_call_program -p nft-rule-handle nft -a list chain $1 $2 $3 2>/dev/null \ |grep -v '^\s*\(table\|chain\|type\|\}\)'|sed 's/^\s*\(.*\) # handle \(\S*\)$/\2:\1/' )"} ) # don't sort those entries alphabetically, so they get shown in the order they are executed in nftables _describe -t rules "rule" rules -V "rules" } #currently, only the `nft` command is covered by this script. _nft "$@" # 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 ================================================ FILE: src/_node ================================================ #compdef node # ------------------------------------------------------------------------------ # Copyright (c) 2018 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 Node.js v25.8.0 (https://nodejs.org) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Mario Fernandez (https://github.com/sirech) # * Nicholas Penree (https://github.com/drudge) # * Masafumi Koba (https://github.com/ybiquitous) # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ _node_files() { for (( i = 2; i < CURRENT; i++)); do if [[ ${words[i]} == "--prof-process" ]]; then _files -g "*.log" return fi done _files -g "*.(js|mjs|ts|mts)" } _node_args() { if (( CURRENT == 2 )); then _alternative "_node_files" "_values 'command' 'inspect[enable inspector for debugging]'" return fi _node_files } _node_scripts() { local -a scripts=() if (( $+commands[jq] )) && [[ -e package.json ]]; then scripts=(${(@f)"$(jq -r '.scripts | keys[]' package.json | sed 's/:/\\:/g')"}) fi _describe 'scripts' scripts } _node() { local ret=1 _arguments \ '-[script read from stdin (default; interactive mode if a tty)]' \ '--[indicate the end of node options]' \ '--abort-on-uncaught-exception[aborting instead of exiting causes a core file to be generated for analysis]' \ '--allow-addons[allow use of addons when any permissions are set]' \ '--allow-child-process[allow use of child process when any permissions are set]' \ '--allow-fs-read=[allow permissions to read the filesystem]: :_files' \ '--allow-fs-write=[allow permissions to write in the filesystem]: :_files' \ '--allow-inspector[allow use of inspector when any permissions are set]' \ '--allow-net[allow use of network when any permissions are set]' \ '--allow-wasi[allow wasi when any permissions are set]' \ '--allow-worker[allow worker threads when any permissions are set]' \ '--build-sea=[Build a Node.js single executable application]:sea_config:_files -g "*.json"' \ '--build-snapshot[generate a snapshot blob when the process exits]' \ '--build-snapshot-config=[generate a snapshot blob when the process exits using a JSON configuration in the specified path]:path:_files' \ {-c,--check}'[syntax check script without executing]' \ '--completion-bash[print source-able bash completion script]' \ '*'{-C,--conditions=}'[additional user conditions for conditional exports and imports]:condition' \ '--cpu-prof[Start the V8 CPU profiler on start up]' \ '--cpu-prof-dir=[directory where the V8 profiles generated by --cpu-prof]:dir:_files -/' \ '--cpu-prof-interval=[sampling interval in microseconds for the V8 CPU profiler]:number' \ '--cpu-prof-name=[file name of the V8 profile generated with --cpu-prof]: :_files' \ '--diagnostic-dir=[set dir for all output files(default: current working directory)]:dir:_files -/' \ '--disable-proto=[disable Object.prototype.__proto__]:mode:(delete throw)' \ '--disable-sigusr1[disable inspector thread to be listening for SIGUSR1 signal]' \ '*--disable-warning=[silence specific process warnings]:warn type' \ '--disable-wasm-trap-handler[disable trap-handler-based WebAssembly bound checks]' \ '--disallow-code-generation-from-strings[disallow eval and friends]' \ '--dns-result-order=[set default value of verbatim in dns.lookup]: :(ipv4first ipv6first verbatim)' \ '--enable-etw-stack-walking[provides heap data to ETW Windows native tracing]' \ '--enable-fips[enable FIPS crypto at startup]' \ '--enable-source-maps[source map support for stack traces]' \ '--entry-url[treat the entrypoint as a URL]' \ '*--env-file=[set environment variables from supplied file]:envfile:_files' \ '*--env-file-if-exists=[set environment variables from supplied file if exists]:envfile:_files' \ '(- 1 *)'{-e,--eval}'[evaluate script]:inline JavaScript' \ '--experimental-addon-modules[enable experimental import support for addons]' \ '--experimental-config-file=[set config file from supplied file]:file:_files' \ '--experimental-default-config-file[set config file from default config file]' \ '--experimental-eventsource[enable experimental EventSource API]' \ '--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \ '--experimental-inspector-network-resource[experimental load network resources via the inspector]' \ '(--loader --experimental-loader)'{--loader,--experimental-loader}'=[Specify the module of a custom ECMAScript Module loader]: :_files' \ '--experimental-network-inspection[enable experimental network inspection support]' \ '--experimental-print-required-tla[print pending top-level await]' \ '--experimental-sea-config=[generate a blob that can be embedded into the single executable application]: :_files' \ '--experimental-storage-inspection[experimental storage inspection support]' \ '--experimental-test-coverage[enable code coverage in the test runner]' \ '--experimental-test-module-mocks[enable module mocking in the test runner]' \ '--experimental-transform-types[enable transformation of TypeScript-onlysyntax into JavaScript code]' \ '--experimental-vm-modules[experimental ES Module support in vm module]' \ '--experimental-worker-inspection[experimental worker inspection support]' \ '--expose-gc[expose gc extension]' \ '--force-context-aware[disable loading non-context-aware addons]' \ '--force-fips[force FIPS crypto]' \ '--force-node-api-uncaught-exceptions-policy[enforces "uncaughtException" event on Node API asynchronous callbacks]' \ '--frozen-intrinsics[experimental frozen intrinsics support]' \ '--heap-prof[Start the V8 heap profiler on start up]' \ '--heap-prof-dir=[Directory where the V8 profiles generated by --heap-prof]: :_files -/' \ '--heap-prof-interval=[sampling interval in bytes for the V8 heap profile]:number' \ '--heap-prof-name=[file name of the V8 heap profile generated]: :_files' \ '--heapsnapshot-near-heap-limit=[Generate heapsnapshots whenever V8 is approaching the heap limit]:limit' \ '--heapsnapshot-signal=[Generate heap snapshot on specified signal]:signals:_signals -s' \ '--icu-data-dir=[set ICU data load path to dir (overrides NODE_ICU_DATA) note: linked-in ICU data is present]: :_directories' \ '--import=[ES module to preload]:module:_node_files' \ '--input-type=[set module type for string input]:module type :(commonjs module)' \ '--insecure-http-parser[Use an insecure HTTP parser that accepts invalid HTTP headers]' \ '--inspect=-[activate inspector on host:port (default: 127.0.0.1:9229)]:host_port' \ '--inspect-brk=-[activate inspector on host:port and break at start of user script]:host_port' \ '(--debug-port --inspect-port)'{--debug-port,--inspect-port}'=[set host:port for inspector]:host_port' \ '--inspect-publish-uid=[comma separated list of destinations for inspector uid]' \ '--inspect-wait=-[activate inspector on host:port and wait for debugger to be attached]::host_port' \ {-i,--interactive}'[always enter the REPL even if stdin does not appear to be a terminal]' \ '--interpreted-frames-native-stack[help system profilers to translate JavaScript interpreted frames]' \ '--jitless[Disable runtime allocation of executable memory]' \ '--localstorage-file=[file used to persist localStorage data]:file:_files' \ '--max-http-header-size=[set the maximum size of HTTP headers]:number' \ "--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \ '--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \ '--no-addons[disable loading native addons]' \ '--no-async-context-frame[improve AsyncLocalStorage performance with AsyncContextFrame]' \ '--no-deprecation[silence deprecation warnings]' \ '--no-experimental-detect-module[when ambiguous modules fail to evaluate, try again to evaluate them as ES modules]' \ '--no-experimental-global-navigator[expose experimental Navigator API on the global scope]' \ '--no-experimental-repl-await[disable experimental await keyword support in REPL]' \ '--no-experimental-sqlite[disable experimental node sqlite module]' \ '(--no-strip-types --no-experimental-strip-types)'{--no-strip-types,--no-experimental-strip-types}'[disable type-stripping for TypeScript files]' \ '--no-experimental-websocket[experimental WebSocket API (currently set)]' \ '--no-extra-info-on-fatal-exception[hide extra information on fatal exception that causes exit]' \ '--no-force-async-hooks-checks[disable checks for async_hooks]' \ '--no-global-search-paths[disable global module search paths]' \ '(--no-network-family-autoselection --enable-network-family-autoselection)'{--no-network-family-autoselection,--enable-network-family-autoselection}'[disable network address family autodetection algorithm]' \ '(--require-module --no-require-module --no-experimental-require-module)'{--no-require-module,--no-experimental-require-module}'[disable support for loading a synchronous ES module graph in require()]' \ '--no-warnings[silence all process warnings]' \ '(--no-webstorage --no-experimental-webstorage)'{--no-webstorage,--no-experimental-webstorage}'[disable Web Storage API]' \ '--node-memory-debug[run with extra debug checks for memory leaks in Node.js itself]' \ '--openssl-config=[load OpenSSL configuration from the specified file (overrides OPENSSL_CONF)]:file:_files' \ '--openssl-legacy-provider[enable OpenSSL 3.0 legacy provider]' \ '--openssl-shared-config[enable OpenSSL shared configuration]' \ '--permission[enable the permission system]' \ '--permission-audit[enable audit only for the permission system]' \ '--pending-deprecation[emit pending deprecation warnings]' \ '--preserve-symlinks[preserve symbolic links when resolving]' \ '--preserve-symlinks-main[preserve symbolic links when resolving the main module]' \ '(- 1 *)'{-p,--print}'[evaluate script and print result]:inline JavaScript' \ '--prof[generate V8 profiler output]' \ '--prof-process[process V8 profiler output generated using --prof]' \ '--redirect-warnings=[write warnings to file instead of stderr]: :_files' \ '--report-compact[output compact single-line JSON]' \ '--report-exclude-env[exclude environment variables when generating report]' \ '--report-directory=[custom report path]: :_files -/' \ '--report-exclude-network[exclude network interface diagnostics(default: false)]' \ '--report-filename=[custom report file name]: :_files' \ '--report-on-fatalerror[generate diagnostic report on fatal (internal) errors]' \ '--report-on-signal=[generate diagnostic report upon receiving signals]' \ '--report-signal=[causes diagnostic report to be produced on provided signal]:signals:_signals -s' \ '--report-uncaught-exception[generate diagnostic report on uncaught exceptions]' \ '(--require-module --no-require-module --no-experimental-require-module)--require-module[support for loading a synchronous ES module graph in require()]' \ '*'{-r,--require}'[module to preload (option can be repeated)]: :_node_files' \ '--run=[run a script specified in package.json]:script:_node_scripts' \ '--secure-heap=[total size of the OpenSSL secure heap]:number' \ '--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \ '--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \ '--test[launch test runner on startup]' \ '--test-concurrency=[specify test runner concurrency]:concurrency' \ '--test-coverage-branches=[the branch coverage minimum threshold]:threshold' \ '--test-coverage-exclude=[exclude files from coverage report that match this glob pattern]:pattern' \ '--test-coverage-functions=[the function coverage minimum threshold]:threshold' \ '--test-coverage-include=[include files from coverage report that match this glob pattern]:pattern' \ '--test-coverage-lines=[the line coverage minimum threshold]:threshold' \ '--test-force-exit[force test runner to exit upon completion]' \ '--test-global-setup=[specify the path to the global setup file]:file:_files' \ '--test-isolation=[configurations the type of test isolation used in the test runner]:isolation' \ '--test-name-pattern=[run tests whose name matches this regular expression]:pattern' \ '--test-only[run tests with "only" option set]' \ '*--test-reporter=[report test output using the given reporter]:reporter:(tap spec dot)' \ '*--test-reporter-destination=[report given reporter to the given destination]:destination:_files' \ '--test-rerun-failures=[specify the path to the rerun state file]:state file:_files' \ '--test-shard=[run test at specific shard]:shard' \ '--test-skip-pattern=[run tests whose name do not match this regular expression]' \ '--test-timeout=[specify test runner timeout]' \ '--test-update-snapshots[regenerate test snapshots]' \ '--throw-deprecation[throw an exception on deprecations]' \ '--title=[the process title to use on startup]:process title' \ '--tls-cipher-list=[use an alternative default TLS cipher list]:cipher list string' \ '--tls-keylog=[log TLS decryption keys to named file for traffic analysis]: :_files' \ '(--tls-max-v1.3)--tls-max-v1.2[set default TLS maximum to TLSv1.2]' \ '(--tls-max-v1.2)--tls-max-v1.3[set default TLS maximum to TLSv1.3]' \ '(--tls-min-v1.1 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.0[set default TLS minimum to TLSv1.0]' \ '(--tls-min-v1.0 --tls-min-v1.2 --tls-min-v1.3)--tls-min-v1.1[set default TLS minimum to TLSv1.1]' \ '(--tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.3)--tls-min-v1.2[set default TLS minimum to TLSv1.2]' \ '(--tls-max-v1.2 --tls-min-v1.0 --tls-min-v1.1 --tls-min-v1.2)--tls-min-v1.3[set default TLS minimum to TLSv1.3]' \ '--trace-deprecation[show stack traces on deprecations]' \ '--trace-env[print accesses to the environment variables]' \ '--trace-env-js-stack[print accesses to the environment variables and the JavaScript stack trace]' \ '--trace-env-native-stack[print accesses to the environment variables and the native stack trace ]' \ '--trace-event-categories[comma separated list of trace event categories to record]: :{_values -s , categories node node.async_hooks node.bootstrap node.perf node.perf.usertiming node.perf.timerify node.fs.sync node.vm.script v8}' \ '--trace-event-file-pattern[Template string specifying the filepath for the trace-events data, it supports ${rotation} and ${pid} log-rotation id. %2$u is the pid.]:template string' \ '--trace-exit[show stack trace when an environment exits]' \ '--trace-promises[show stack traces on promise initialization and resolution]' \ '--trace-require-module=[print access to require(esm)]:option:(all no-node-modules)' \ '--trace-sigint[prints a stack trace on SIGINT]' \ '--trace-sync-io[show stack trace when use of sync IO is detected after the first tick]' \ '--trace-tls[prints TLS packet trace information to stderr]' \ '--trace-uncaught[show stack traces for the throw behind uncaught exceptions]' \ '--trace-warnings[show stack traces on process warnings]' \ '--track-heap-objects[track heap object allocations for heap snapshots]' \ '--unhandled-rejections=[define unhandled rejections behavior]:rejection behavior:(strict warn none throw warn-with-error-code)' \ '--use-bundled-ca[use bundled CA store (default)]' \ '--use-env-proxy[parse proxy settings from HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars]' \ '--use-largepages=[re-map the Node.js static code to large memory pages at startup]:mode:(off on silent)' \ "--use-openssl-ca[use OpenSSL's default CA store]" \ "--use-system-ca[Use system's CA store]" \ '(- 1 *)--v8-options[print v8 command line options]' \ "--v8-pool-size=[set v8's thread pool size]:number" \ "--watch[run in watch mode]" \ '--watch-kill-signal=[kill signal to send to the process on watch mode restarts]:signal:_signals -s' \ "--watch-path=[path to watch]: :_node_files" \ '--watch-preserve-output[preserve outputs on watch mode restart]' \ '--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' && ret=0 return ret } _node "$@" # 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 ================================================ FILE: src/_nvm ================================================ #compdef nvm # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 nvm v0.40.3 (https://github.com/nvm-sh/nvm). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Changwoo Park (https://github.com/pismute) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ __nvm() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '--help[show help message]' \ '--no-color[suppress colored output]' \ '--version[print out the installed version of nvm]' \ '1: :__nvm_subcommands' \ '*::arg:->args' && ret=0 case "$state" in args) case $words[1] in (install) _arguments -C \ '-s[Skip binary download, install from source only]' \ '-b[Skip source download, install from binary only]' \ '--reinstall-packages-from=[When installing, reinstall packages installed in node]:version' \ '--lts=[When installing, only select from LTS versions]::lts_name' \ '--skip-default-packages[When installing, skip the default-packages file if it exists]' \ '--latest-npm[After installing, attempt to upgrade to the latest working npm on the given node version]' \ '--no-progress[Disable the progress bar on any downloads]' \ '--alias=[After installing, set the alias specified to the version specified]' \ '--default[After installing, set default alias to the version specified]' \ '--save[After installing, write the specified version to .nvmrc]' \ '1::version:__nvm_versions' \ && ret=0 ;; (uninstall) _arguments \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '1: :__nvm_installed_versions' \ && ret=0 ;; (use) _arguments \ '--silent[Silences stdout/stderr output]' \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '1: :__nvm_installed_versions' \ '*: :_normal' \ && ret=0 ;; (exec) _arguments \ '--silent[Silences stdout/stderr output]' \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '1: :__nvm_installed_versions' \ '*: :_normal' \ && ret=0 ;; (run) _arguments \ '--silent[Silences stdout/stderr output]' \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '1: :__nvm_installed_versions' \ '*: :_normal' \ && ret=0 ;; (ls) _arguments \ '--no-colors[Suppress colored output]' \ '--no-alias[Suppress `nvm alias` output]' \ && ret=0 ;; (ls-remote) _arguments \ '--silent[Silences stdout/stderr output]' \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '--no-colors[Suppress colored output]' \ && ret=0 ;; (version-remote) _arguments \ '--lts=-[When installing, only select from LTS versions]::lts_name' \ '1: :__nvm_versions' \ && ret=0 ;; (deactivate) _arguments \ '--silent[Silences stdout/stderr output]' \ && ret=0 ;; (alias) _arguments \ '1:name' \ '2:version:__nvm_installed_versions' \ && ret=0 ;; (unalias) _arguments \ '1:version:__nvm_installed_versions' \ && ret=0 ;; (reinstall-package) _arguments \ '--silent[Silences stdout/stderr output]' \ '1: :__nvm_installed_versions' \ && ret=0 ;; (which) _arguments \ '--silent[Silences stdout/stderr output when a version is omitted]' \ '1: : _alternative "version:version:__nvm_installed_versions" "current: :(current)"' \ && ret=0 ;; (cache) _arguments \ '1: :__nvm_cache_subcommands' \ && ret=0 ;; *) (( ret )) && _message 'no more arguments' ;; esac ;; esac return ret } __nvm_subcommands() { local -a commands=( 'help:Show this message' 'install:Download and install a ' 'uninstall:Uninstall a ' 'use:Modify PATH to use ' 'exec:Run on ' 'run:Run with as arguments' 'current:Display currently activated version of Node' 'ls:List installed [versions]' 'ls-remote:List remote versions available for install' 'version:Show current node version' 'version-remote:Resolve the given description to a single remote version' 'deactivate:Undo effects of NVM on current shell' 'alias:Set an alias named pointing to . Show all aliases beginning with [].' 'unalias:Deletes the alias named ' 'install-latest-npm:Attempt to upgrade to the latest working npm on the current node version' 'reinstall-packages:Reinstall global npm packages contained in to current version' 'unload:Unload `nvm` from shell' 'which:Display path to installed node version' 'cache:Show cache directory/Clear cache' 'set-colors:Set five text colors using format "yMeBg"' ) _describe -t commands 'command' commands "$@" } __nvm_aliases() { local aliases if [[ -d $NVM_DIR/alias ]]; then aliases=$(echo $NVM_DIR/alias/*(:t)) fi echo "$aliases" } __nvm_versions() { # nvm ls-remote is slow if [[ ${#__nvm_node_version_cache[@]} == 0 ]]; then __nvm_node_version_cache=(${(@f)"$(nvm ls-remote --no-colors | awk '{print $1}')"}) fi _describe -t versions 'version' __nvm_node_version_cache "$@" } __nvm_installed_versions() { local -a versions if (( $+functions[nvm_ls] )); then versions=(${(f)"$(nvm_ls)"}) fi versions=($versions $(__nvm_aliases)) _describe -t versions 'version' versions "$@" } __nvm_cache_subcommands() { local -a commands=( 'dir:Display path to the cache directory for nvm' 'clear:Empty cache directory for nvm' ) _describe -t commands 'command' commands "$@" } __nvm "$@" # 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 ================================================ FILE: src/_openssl ================================================ #compdef openssl # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 OpenSSL 3.5.3 (https://www.openssl-library.org/) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Aaron Schrab # * Dimitris Apostolou # * Shohei Yoshida # # ------------------------------------------------------------------------------ _openssl() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 local -a openssl_tls_flags=( '-ssl3[enable SSL3 protocol]' '-no_ssl3[disable SSL3 protocol]' '-tls1[enable TLS1 protocol]' '-no_tls1[disable TLS1 protocol]' '-tls1_1[enable TLS1.1 protocol]' '-no_tls1_1[disable TLS1.1 protocol]' '-tls1_2[enable TLS1.2 protocol]' '-no_tls1_2[disable TLS1.2 protocol]' '-tls1_3[enable TLS1.3 protocol]' '-no_tls1_3[disable TLS1.3 protocol]' ) local -a openssl_dtls_flags=( '-dtls[use DTLS instead of TLS]' '-dtls1[use DTLS1 instead of TLS]' '-dtls2[use DTLS2 instead of TLS]' ) local -a openssl_extended_verification_flags=( '-xkey[extra private key file]:file:_files' '-xcert[extra certificate file]:file:_files' '-xchain[extra certificate chain file]:file:_files' '-xchain_build[build the certificate chain for the extra certificates]' '-xcertform[extra certificate format]:format:(DER PEM P12)' ) local -a openssl_supported_commands_flags=( '-bugs[set various bug workarounds]' '(-comp -no_comp)-no_comp[disable support for SSL/TLS compression]' '(-comp -no_comp)-comp[enable support for SSL/TLS compression]' '-no_ticket[disable support for session tickets]' '-serverpref[use server and not client preference order when determining cipher suite]' '-client_renegotiation[allow servers to accept client-initiated renegotiation]' '-legacy_renegotiation[permit the use of unsafe legacy renegotiation]' '-no_renegotiation[disable all attempts at renegotiation in (D)TLSv1.2 and earlier]' '-no_resumption_on_reneg[set SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION]' '(-legacy_server_connect -no_legacy_server_connect)-legacy_server_connect[permit unsafe legacy renegotiation]' '(-legacy_server_connect -no_legacy_server_connect)-no_legacy_server_connect[prohibit unsafe legacy renegotiation]' '-prioritize_chacha[prioritize ChaCha ciphers when the client has a ChaCha20 cipher]' '-allow_no_dhe_kex[allow a non-(ec)dhe based key exchange mode on resumption]' '-strict[enable strict mode protocol handling]' '-sigalgs[set signature algorithms for TLSv1.2 and TLSv1.3]:alg:_openssl_signature_algorithms' '-client_sigalgs[set signature algorithms for client authentication for TLSv1.2 and TLSv1.3]:alg:_openssl_signature_algorithms' '-groups[set the supported groups(colon separated NIST name or OpenSSL OID name)]:groups:_openssl_groups' '-curves[set the curves groups]:groups:_openssl_groups' '-named_curve[set the temporary curve for ephemeral ECDH modes]:curve' '-cipher[set the TLSv1.2 and below ciphersuite list to ciphers]:ciphers' '-ciphersuites[set the available ciphersuites for TLSv1.3]:ciphers' '-min_protocol[minimum supported protocol]:protocol:_openssl_tls_protocols' '-max_protocol[maximum supported protocol]:protocol:_openssl_tls_protocols' '-record_padding[padding length for TLSv1.3 records]:padding' '-no_middlebox[turn of middlebox compatibility]' ) local -a openssl_provider_options=( '-provider[provider ID to be loaded and initialized]:provider' '-provider-path[search path that is to be used for looking for providers]:path:_files -/' '*-provparam[configuration parameter key to value val in provider name]:key_value' '-propquery[property query clause to be used when fetching algorithms from the loaded providers]:query' ) local -a openssl_trusted_certificate_options=( '-CAfile[load the specified file which contains a certificate or several of them]:file:_files' '-no-CAfile[do not load the default file of trusted certificates]' '-CApath[directory as a collection of trusted certificates]:dir:_files -/' '-no-CApath[do not use the default directory of trusted certificates]' '-CAstore[URI as a store of CA certificates]:uri' '-no-CAstore[do not use the default store of trusted CA certificates]' ) local -a openssl_random_state_options=( '-rand[file containing random data used to seed the random number generator]:file:_files' '-writerand[file to be written the seed data]:file:_files' ) local -a openssl_verification_options=( '-allow_proxy_certs[allow the verification of proxy certificates]' '-attime[perform validation checks using time specified by timestamp and not current system time]:time' '-no_check_time[suppresses checking the validity period of certificates and CRLs against the current time]' '-check_ss_sig[verify the signature of the last certificate in a chain if the certificate is supposedly self-signed]' '-crl_check[checks end entity certificate validity by attempting to look up a valid CRL]' '-crl_check_all[checks the validity of all certificates in the chain by attempting to look up valid CRL]' '-explicit_policy[set policy variable require-explicit-policy]' '-extended_crl[enable extended CRL features]' '-ignore_critical[ignore critical extensions]' '-inhibit_any[set policy variable inhibit-any-policy]' '-inhibit_map[set policy variable inhibit-policy-mapping]' '-partial_chain[allow verification to succeed if an incomplete chain can be built]' '-policy[enable policy processing and add arg to the user-initial-policy-set]:policy' '-policy_check[enables certificate policy processing]' '-policy_print[print out diagnostics related to policy processing]' '-purpose[a high-level specification of the intended use of the target certificate]:purpose' '-suiteB_128[enable the Suite B mode operation at 128 bit Level of Security]' '-suiteB_128_only[enable only the Suite B mode operation at 128 bit Level of Security]' '-suiteB_192[enable the Suite B mode operation at 192 bit Level of Security]' '-use_deltas[enable support for delta CRLs]' '-auth_level[set the certificate chain authentication security level]:level' '-verify_depth[limit the certificate chain to num intermediate CA certificates]:depth' '-verify_email[verify the email address in Subject Alternative Name or the email]:email' '-verify_hostname[verify hostname in Subject Alternative Name or Common Name]:hostname' '-verify_ip[verify IP addresses in Subject Alternative Name of the subject certificate]:ip' '-x509_strict[disables non-compliant workarounds for broken certificates]' ) _arguments -C -A "-*" \ '(- *)-help[show help]' \ '(- *)-version[show version]' \ '1: :_openssl_subcommands' \ '*::arg:->args' \ && ret=0 case "$state" in (args) local subcmd=${words[1]} if (( $+functions[_openssl_${subcmd}] )); then _openssl_${subcmd} && ret=0 else local -a cipher_flags=($(openssl enc -list | tail -n +2 )) local -a ciphers=() for flag in $cipher_flags[@] do ciphers+=(${flag:1}) done if (( $ciphers[(I)$subcmd] )); then _openssl_enc 1 && ret=0 else local -a digest_flags=($(openssl dgst -list | tail -n +2 )) local -a digests=() for flag in $digest_flags[@] do digests+=(${flag:1}) done if (( $digests[(I)$subcmd] )); then _openssl_dgst 1 && ret=0 fi fi fi ;; esac return ret } _openssl_subcommands() { local -a commands=( 'asn1parse:Parse an ASN.1 sequence' 'ca:Certificate Authority Management' 'ciphers:Cipher Suite Description Determination' 'cmp:Certificate Management Protocol(CMP) application' 'cms:Cryptographic Message Syntax command' 'crl:Certificate Revocation List Management' 'crl2pkcs7:CRL to PKCS#7 Conversion' 'dgst:Message Digest calculation' 'dhparam: Generation and Management of Diffie-Hellman Parameters' 'dsa: DSA Data Management' 'dsaparam:DSA Parameter Generation and Management' 'ec:Elliptic curve key processing' 'ecparam:EC parameter manipulation and generation' 'enc:Encryption, decryption, and encoding' 'engine:Engine (loadable module) information and manipulation' 'errstr:Error Number to Error String Conversion' 'fipsinstall:FIPS configuration installation' 'gendsa:Generation of DSA Private Key from Parameters' 'genpkey:Generation of Private Key or Parameters' 'genrsa:Generation of RSA Private Key' "help:Display information about a command's options" 'info:Display diverse information built into the OpenSSL libraries' 'list:List algorithms and features' 'mac:Message Authentication Code Calculation' 'nseq:Create or examine a Netscape certificate sequence' 'ocsp:Online Certificate Status Protocol command' 'passwd:Generation of hashed passwords' 'pkcs12:PKCS#12 Data Management' 'pkcs7:PKCS#7 Data Management' 'pkcs8:PKCS#8 format private key conversion command' 'pkey:Public and private key management' 'pkeyparam:Public key algorithm parameter management' 'pkeyutl:Public key algorithm cryptographic operation command' 'prime:Compute prime numbers' 'rand:Generate pseudo-random bytes' 'rehash:Create symbolic links to certificate and CRL files named by the hash values' 'req:PKCS#10 X.509 Certificate Signing Request Management' 'rsautl:RSA command for signing, verification, encryption, and decryption' 's_client:SSL/TLS client program' 's_server:SSL/TLS server program' 's_time:SSL Connection Timer' 'sess_id:SSL Session Data Management' 'smime:S/MIME mail processing' 'speed:Algorithm Speed Measurement' 'spkac:SPKAC printing and generating command' 'srp:Maintain SRP password file(deprecated)' 'storeutl:Command to list and display certificates, keys, CRLs, etc' 'ts:Time Stamping Authority command' 'verify:X.509 Certificate Verification' 'version:OpenSSL Version Information' 'x509:X.509 Certificate Data Management' # Message Digest Commands 'blake2b512:BLAKE2b-512 Digest' 'blake2s256:BLAKE2s-256 Digest' 'md2:MD2 Digest' 'md4:MD4 Digest' 'md5:MD5 Digest' 'mdc2:MDC2 Digest' 'rmd160:RMD-160 Digest' 'sha1:SHA-1 Digest' 'sha224:SHA-2 224 Digest' 'sha256:SHA-2 256 Digest' 'sha384:SHA-2 384 Digest' 'sha512:SHA-2 512 Digest' 'sha3-224:SHA-3 224 Digest' 'sha3-256:SHA-3 256 Digest' 'sha3-384:SHA-3 384 Digest' 'sha3-512:SHA-3 512 Digest' 'keccak-224:KECCAK 224 Digest' 'keccak-256:KECCAK 256 Digest' 'keccak-384:KECCAK 384 Digest' 'keccak-512:KECCAK 512 Digest' 'shake128:SHA-3 SHAKE128 Digest' 'shake256:SHA-3 SHAKE256 Digest' 'sm3:SM3 Digest' # Encryption, Decryption, and Encoding Commands 'aes128:AES-128 Cipher' 'aes-128-cbc:AES-128 CBC Cipher' 'aes-128-cfb:AES-128 CFB Cipher' 'aes-128-ctr:AES-128 CTR Cipher' 'aes-128-ecb:AES-128 ECB Cipher' 'aes-128-ofb:AES-128 OFB Cipher' 'aes192:AES-192 Cipher' 'aes-192-cbc:AES-192 CBC Cipher' 'aes-192-cfb:AES-192 CFB Cipher' 'aes-192-ctr:AES-192 CTR Cipher' 'aes-192-ecb:AES-192 ECB Cipher' 'aes-192-ofb:AES-192 OFB Cipher' 'aes256:AES-256 Cipher' 'aes-256-cbc:AES-256 CBC Cipher' 'aes-256-cfb:AES-256 CFB Cipher' 'aes-256-ctr:AES-256 CTR Cipher' 'aes-256-ecb:AES-256 ECB Cipher' 'aes-256-ofb:AES-256 OFB Cipher' 'aria128:Aria-128 Cipher' 'aria-128-cbc:Aria-128 CBC Cipher' 'aria-128-cfb:Aria-128 CFB Cipher' 'aria-128-ctr:Aria-128 CTR Cipher' 'aria-128-ecb:Aria-128 ECB Cipher' 'aria-128-ofb:Aria-128 OFB Cipher' 'aria192:Aria-192 Cipher' 'aria-192-cbc:Aria-192 CBC Cipher' 'aria-192-cfb:Aria-192 CFB Cipher' 'aria-192-ctr:Aria-192 CTR Cipher' 'aria-192-ecb:Aria-192 ECB Cipher' 'aria-192-ofb:Aria-192 OFB Cipher' 'aria256:Aria-256 Cipher' 'aria-256-cbc:Aria-256 CBC Cipher' 'aria-256-cfb:Aria-256 CFB Cipher' 'aria-256-ctr:Aria-256 CTR Cipher' 'aria-256-ecb:Aria-256 ECB Cipher' 'aria-256-ofb:Aria-256 OFB Cipher' 'base64:Base64 Encoding' 'bf:Blowfish Cipher' 'bf-cbc:Blowfish CBC Cipher' 'bf-cfb:Blowfish CFB Cipher' 'bf-ecb:Blowfish ECB Cipher' 'bf-ofb:Blowfish OFB Cipher' 'camellia128:Camellia-128 Cipher' 'camellia-128-cbc:Camellia-128 CBC Cipher' 'camellia-128-cfb:Camellia-128 CFB Cipher' 'camellia-128-ctr:Camellia-128 CTR Cipher' 'camellia-128-ecb:Camellia-128 ECB Cipher' 'camellia-128-ofb:Camellia-128 OFB Cipher' 'camellia192:Camellia-192 Cipher' 'camellia-192-cbc:Camellia-192 CBC Cipher' 'camellia-192-cfb:Camellia-192 CFB Cipher' 'camellia-192-ctr:Camellia-192 CTR Cipher' 'camellia-192-ecb:Camellia-192 ECB Cipher' 'camellia-192-ofb:Camellia-192 OFB Cipher' 'camellia256:Camellia-256 Cipher' 'camellia-256-cbc:Camellia-256 CBC Cipher' 'camellia-256-cfb:Camellia-256 CFB Cipher' 'camellia-256-ctr:Camellia-256 CTR Cipher' 'camellia-256-ecb:Camellia-256 ECB Cipher' 'camellia-256-ofb:Camellia-256 OFB Cipher' 'cast:CAST Cipher' 'cast-cbc:CAST CBC Cipher' 'cast5-cbc:CAST5 CBC Cipher' 'cast5-cfb:CAST5 CFB Cipher' 'cast5-ecb:CAST5 ECB Cipher' 'cast5-ofb:CAST5 OFB Cipher' 'chacha20:Chacha20 Cipher' 'des:DES Cipher' 'des-cbc:DES CBC Cipher' 'des-cfb:DES CFB Cipher' 'des-ecb:DES ECB Cipher' 'des-ede:DES EDE Cipher' 'des-ede-cbc:DES EDE CBC Cipher' 'des-ede-cfb:DES EDE CFB Cipher' 'des-ede-ofb:DES EDE OFB Cipher' 'des-ofb:DES OFB Cipher' 'des3:Triple-DES Cipher' 'desx:Triple-DES X Cipher' 'des-ede3:Triple-DES EDE Cipher' 'des-ede3-cbc:Triple-DES EDE CBC Cipher' 'des-ede3-cfb:Triple-DES EDE CFB Cipher' 'des-ede3-ofb:Triple-DES EDE OFB Cipher' 'idea:IDEA Cipher' 'idea-cbc:IDEA CBC Cipher' 'idea-cfb:IDEA CFB Cipher' 'idea-ecb:IDEA ECB Cipher' 'idea-ofb:IDEA OFB Cipher' 'rc2:RC2 Cipher' 'rc2-cbc:RC2 CBC Cipher' 'rc2-cfb:RC2 CFB Cipher' 'rc2-ecb:RC2 ECB Cipher' 'rc2-ofb:RC2 OFB Cipher' 'rc4:RC4 Cipher' 'rc5:RC5 Cipher' 'rc5-cbc:RC5 CBC Cipher' 'rc5-cfb:RC5 CFB Cipher' 'rc5-ecb:RC5 ECB Cipher' 'rc5-ofb:RC5 OFB Cipher' 'seed:SEED Cipher' 'seed-cbc:SEED CBC Cipher' 'seed-cfb:SEED CFB Cipher' 'seed-ecb:SEED ECB Cipher' 'seed-ofb:SEED OFB Cipher' 'sm4:SM4 Cipher' 'sm4-cbc:SM4 CBC Cipher' 'sm4-cfb:SM4 CFB Cipher' 'sm4-ctr:SM4 CTR Cipher' 'sm4-ecb:SM4 ECB Cipher' 'sm4-ofb:SM4 OFB Cipher' ) _describe -t commands 'command' commands "$@" } # # Commands # _openssl_asn1parse() { _arguments \ '(- *)-help[display this summary]' \ '-inform[input format]:format:(DER PEM B64)' \ '-in[input file]:file:_files' \ '-out[output file(output format is always DER)]:file:_files' \ '-noout[do not produce any output]' \ '-offset[offset into file]:number' \ '-length[length of section in file]:number' \ '-i[indents the output]' \ '-oid[file of extra oid definitions]:file:_files' \ '-dump[unknown data in hex form]' \ '-dlimit[dump the first arg bytes of unknown data in hex form]:bytes' \ '-strparse[a series of these can be used to "dig"]:offset' \ '-genstr[string to generate ASN1 structure from]:val' \ '-genconf[file to generate ASN1 structure from]:file:_files' \ '-strictpem[strict PEM]' \ '-item[item to parse and print]:val' } _openssl_ca() { _arguments \ '(- *)-help[print out a usage message]' \ '-verbose[prints extra details about the operations being performed]' \ '-quiet[prints fewer details about the operations being performed]' \ '-config[specifies the configuration file to use]:file:_files' \ '(-name -section)'{-name,-section}'[specifies the configuration file section to use]:section' \ '-in[input filename containing a single certificate request to be signed by the CA]:file:_files' \ '-inform[format to use when loading certificate request (CSR) input files]:type:(DER PEM)' \ '-ss_cert[single self-signed certificate to be signed by the CA]:file:_files' \ '-spkac[file containing a single Netscape signed public key and challenge to be signed by the CA]:file:_files' \ '-infiles[all subsequent arguments are taken as the names f files containing certificate requests]' \ '-out[output file to output certificates to]:file:_files' \ '-outdir[directory to output certificates to]:dir:_files -/' \ '-cert[CA certificate]:file:_files' \ '-certform[format of the data in certificate input files]:format:(DER PEM P12)' \ '-keyfile[CA private key to sign certificate requests with]:file_or_uri:_files' \ '-keyform[format of the private key input file]:format:(DER PEM P12 ENGINE)' \ '-sigopt[pass options to the signature algorithm during sign operations]:option' \ '-vfyopt[pass options to the signature algorithm during verify operations]:option' \ '-key[The password used to encrypt the private key]:password' \ '-passin[key password source for key files and certificate PKCS#12 files]:arg' \ '-selfsign[certificates are to be signed with the key given with -keyfile]' \ '-notext[do not output the text form of a certificate to the output file]' \ '-dateopt[specify the date output format]:format:(rfc_822 iso_8601)' \ '(-startdate -not_before)'{-startdate,-not_before}'[start date to be explicitly set]:date' \ '(-enddate -not_after)'{-enddate,-not_after}'[expiry date to be explicitly set]:date' \ '-days[number of days from today to certify the certificate for]:days' \ '-md[message digest to use]:algorithm:(sha256 sha1 md5)' \ '-policy[CA policy to use]:policy' \ '-preserveDN[preserve DN order of a certificate]' \ '-noemailDN[remove EMAIL field from the certificate]' \ '-batch[enable batch mode]' \ '-extensions[section of the configuration file to be added when certificate is issued]:section' \ '-extfile[additional configuration file to read certificate extensions from]:file:_files' \ '-subj[supersedes subject name given in the request]:subject' \ '-utf8[field values to be interpreted as UTF8 string]' \ '-create_serial[creates a new random serial to be used as next serial number]' \ '-rand_serial[generate a large random number to use as the serial number]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-gencrl[generates a CRL based on information in the index file]' \ "-crl_lastupdate[allows the value of the CRL's lastUpdate field to be explicitly set]:time" \ "-crl_nextupdate[allows the value of the CRL's nextUpdate field to be explicitly set]:time" \ '-crldays[number of days before the next CRL is due]:days' \ '-crlhours[number of hours before the next CRL is due]:hours' \ '-crlsec[number of seconds before the next CRL is due]:seconds' \ '-revoke[filename containing a certificate to revoke]:file:_files' \ '-valid[filename containing a certificate to add a Valid certificate entry]:file:_files' \ '-status[displays the revocation status of the certificate with the specified serial number]:serial' \ '-updatedb[updates the database index to purge expired certificates]' \ '-crl_reason[revocation reason]:reason:(unspecified keyCompromise CACompromise affiliationChanged superseded cessationOfOperation certificateHold removeFromCRL)' \ '-crl_hold[sets the CRL revocation reason code to certificateHold and the hold instruction]:insn:(holdInstructionCallIssuer holdInstructionReject)' \ '-crl_compromise[sets the revocation reason to keyCompromise and the compromise time]:time' \ '-crl_CA_compromise[same as crl_compromise except the revocation reason is set to CACompromise]:time' \ '-crlexts[section of the configuration file containing CRL extensions to include]:section' \ '*:: :_files' } _openssl_ciphers() { _arguments \ '(- *)-help[print help message]' \ $openssl_provider_options[@] \ '-s[only list supported ciphers]' \ '-psk[include cipher suites which require PSK]' \ '-srp[include cipher suites which require SRP]'\ '-v[verbose output]' \ '-V[like -v but include the official cipher suites values in hex]' \ '-ssl3[list ciphers which could be used in SSL3 protocol negotiation]' \ '-tls1[list ciphers which could be used in TLS1 protocol negotiation]' \ '-tls1_1[list ciphers which could be used in TLS1.1 protocol negotiation]' \ '-tls1_2[list ciphers which could be used in TLS1.2 protocol negotiation]' \ '-tls1_3[list ciphers which could be used in TLS1.3 protocol negotiation]' \ '-stdname[precede each cipher suite by its standard name]' \ '-convert[connvert a standard cipher name to its OpenSSL name]:name' \ '-ciphersuites[sets the list of TLSv1.3 ciphersuites]:suites' \ '*:cipher_suite:_openssl_list_ciphers' } _openssl_cmp() { local -a info_types=(signKeyPairTypes caCerts rootCaCert certReqTemplate crlStatusList) local -a mac_algorithms=( hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384 hmacWithSHA512 hmac-sha1 ) _arguments \ '(- *)-help[print help message]' \ '-config[configuration file]:file:_files' \ '-section[sections names to use within config file defining CMP options]:names' \ '-verbosity[level of verbosity]:level:_openssl_cmp_verbosity_level' \ '-cmd[CMP command to execute]:command:_openssl_cmp_commands' \ '-infotype[InfoType name to use for requesting specific info in gem]:type:(($info_types))' \ '-profile[name of a certificate profile in the PKIHeader generalInfo field]:name' \ '-geninfo[a comma-separated list of InfoTypeAndValue]:values' \ '-template[file to save any CRMF certTemplate in DER format]:file:_files' \ '-keyspec[file to save any keySpec]:file:_files' \ '-newkey[private or public key file or URI to be requested]:file_or_uri:_files' \ '-newkeypass[pass phrase source for the key given with -newkey option]:source:_openssl_pass_phrase_options' \ '-centralkeygen[request central key generation for certificate enrollment]' \ '-newkeyout[file to save centrally generated private key in PEM format]:file:_files' \ '-subject[X.509 Distinguished Name(DN) to use as subject field in requested certificate]:name' \ '-days[number of days new certificate is requested to be valid for]:days' \ '-reqexts[name of section in OpenSSL config file defining certificate request extensions]:name' \ '-sans[addresses, email addresses, DNS names, URIS to add as SAN certificate request extension]:spec' \ '-san_nodefault[disable to be copied from the reference certificate]' \ '-policies[name of section to be set as certificate request extension]:name' \ '-policy_oids[one or more OIDs to add as certificate policies request extension]:names' \ '-policy_oids_critical[set policies given with -policy_oids as critical]' \ '-popo[Proof-of-possession(POPO) method to use for IR/CR/KUR]:number:(0 1 2)' \ '-csr[PKCS#10 CSR containing a certificate request]:file:_files' \ '-out_trusted[trusted certificate file or URI to use for validating newly enrolled certificate]:file_or_uri:_files' \ '-implicit_confirm[request implicit confirmation of newly enrolled certificates]' \ '-disable_confirm[do not send certificate confirmation message for newly enrolled certificate]' \ '-certout[file where any newly enrolled certificate should be saved]:file:_files' \ '-chainout[file where the chain of any newly enrolled certificate should be saved]:file:_files' \ '-oldcert[certificate file or URI to be updated message or to be revoked in RR messages]:file_or_uri:_files' \ '-issuer[X.509 Distinguished Name(ND) to place as the issuer field]:name' \ '-serial[serial number of certificate to be revoked in revocation request]:number' \ '-revreason[CRLReason number to be included in revocation request]:reason:_openssl_cmp_revocation_reasons' \ '-server[domain name or IP address and optionally port of CMP server to connect]:domain_or_ip' \ '-proxy[proxy server to use for reaching CMP server]:domain_or_ip' \ '-no_proxy[list of IP addresses and/or DNS names not to use proxy for]:addresses' \ '-recipient[Distinguished Name(DN) to use in recipient field of CMP request message headers]:name' \ '-path[HTTP path at CMP server to use for POST requests]:path' \ '-keep_alive[keep alive type]:value:(0 1 2)' \ '-msg_timeout[seconds a CMP request-response message round trip is allowed to take]:seconds' \ '-total_timeout[maximum total seconds a transaction may take]:seconds' \ '-trusted[certificate files or uris to use as trust anchors]:file_or_uri:_files' \ '-untrusted[non-trusted intermediate CA certificate files or URIs]:file_or_uri:_files' \ '-srvcert[CMP server certificate file or URI to expect and directly trust]:file_or_uri:_files' \ '-expect_sender[Distinguished Name(DN) expected in the sender field of incoming CMP messages]:name' \ '-ignore_keyusage[ignore key usage restrictions in CMP signer certificates]' \ '-unprotected_errors[accept missing or invalid protection of negative responses from server]' \ '-no_cache_extracerts[do not cache certificates in extraCerts field of CMP messages received]' \ '-srvcert[file where to save successfully validated certificate]:file:_files' \ '-extracertsout[file where to save the list of certificates contained in extraCert field]:file:_files' \ '-cacertsout[file where to save the list of CA certificates contained in caPubs field]:file:_files' \ '-oldwithold[root CA certificate to include in a genm request of infoType "rootCaCert"]:file:_files' \ '-newwithnew[file to save newWithNew certificate received in a genp message]:file:_files' \ '-newwithold[file to save any newWithOld certificate received in a genp message]:file:_files' \ '-oldwithold[file to save any oldWithNew certificate received in a genp message]:file:_files' \ '-crlcert[certificate to derive CRL issuer data for the source field]:file:_files' \ '-oldcrl[CRL to obtain an update for in a genm request with infoType "crlStatusList"]:file:_files' \ '-crlout[file to save any CRL received in a genp message of infoType "crls"]:file:_files' \ '-ref[reference number/string/value to use as fallback senderKID]:value' \ '-secret[source of a secret value to use with MAC-based message protection]:source:_openssl_pass_phrase_options' \ "-cert[client's current CMP signer certificate file or URI]:file_or_uri:_files" \ '-own_trusted[list of certificates to be used as trusted anchors]:file_or_uri:_files' \ "-key[private key file or URI for the client's current certificate]:file_or_uri:_files" \ '-keypass[pass pharse source for the private key]:source:_openssl_pass_phrase_options' \ '-digest[digest to use in MSG_SIG_ALG and as the on-way function(OWF) in MSG_MAC_ALG]:digest:_openssl_digests' \ '-mac[MAC algorithm in MSG_MAC_ALG]:alg:(($mac_algorithms))' \ '-extracerts[certificates files or URIs to append in extraCerts field]:file_or_uri:_files' \ '-unprotected_errors[send request messages without CMP-level protection]' \ '-certform[file format to use when saving a certificate]:format:(PEM DER)' \ '-crlform[file format to use when saving a CRL]:format:(PEM DER)' \ '-keyform[format of the key input]:format:(PEM DER P12 ENGINE)' \ '-otherpass[pass phrase source for certificate]:source:_openssl_pass_phrase_options' \ $openssl_provider_options[@] \ $openssl_random_state_options[@] \ '-tls_used[make the CMP client use TLS for message exchange]' \ "-tls_cert[client's TLS certificate file or URI for authenticating to TLS server]:file_or_uri:_files" \ "-tls_key[private key for client's TLS certificate]:file_or_uri:_files" \ "-tls_keypass[pass phrase source for client's private TLS key]:source:_openssl_pass_phrase_options" \ '-tls_extra[extra certificates file or URI to provite to TLS server during handshake]:file_or_uri:_files' \ '-tls_trusted[trusted certificates to use for validating TLS server certificate]:file_or_uri:_files' \ '-tls_host[address to be checked during hostname validation]:name' \ '-batch[do not interactively prompt for input]' \ '-repeat[number of times to invoke the command with the same parameters]:number' \ '-reqin[files to take the sequence of CMP requests to send to server]:files:_files' \ '-reqin_new_tid[use a fresh transaction ID for CMP request messages]' \ '-reqout[file to save the sequence of CMP requests]:file:_files' \ '-reqout_only[file to save the first CMP requests created by client]:file:_files' \ '-rspin[files to save sequence of CMP responses]:file:_files' \ '-rspout[file to save sequence of actually used CMP responses]:files:_files' \ '-use_mock_srv[test the client using the internal CMP server mock-up at API level]' \ '-port[port number of CMP mock-up server]:number' \ '-max_msgs[maximum number of CMP messages that mock-up server should handle]:number' \ '-srv_ref[reference value to use as snderKID of server]:value' \ '-srv_secret[password source for server authentication with a pre-shared key]:arg' \ '-srv_cert[certificate file or URI of the server]:file_or_uri:_files' \ '-srv_cert[private key file or URI by the server for signing messages]:file_or_uri:_files' \ '-srv_keypass[server private key file pass phrase source]:arg' \ '-srv_trusted[trusted certificates for client authentication]:file_or_uri:_files' \ '-srv_untrusted[untrusted intermediate CA certs files or URIs]:file_or_uri:_files' \ '-ref_cert[certificate file or URI to be expected for RR messages]:file_or_uri:_files' \ '-rsp_cert[certificate file or URI to be returned as mock enrollment result]:file_or_uri:_files' \ '-rsp_key[private key to be returned as central key generation result]:file_or_uri:_files' \ '-rsp_keypass[pass phrase source for rsp_cert and rsp_key]:arg' \ '-rsp_crl[CRL file or URI to be returned in genp of type "crls"]:file_or_uri:_files' \ '-rsp_extracerts[extra certificates to be include in mock certification responses]:file_or_uri:_files' \ '-rsp_capubs[CA certificates to be included in mock Initialization Response message]:file_or_uri:_files' \ '-rsp_newwithnew[certificate to be returned in newWithNew field of genp]:file_or_uri:_files' \ '-rsp_newwithold[certificate to be returned in newWithPld field of genp]:file_or_uri:_files' \ '-rsp_oldwithnew[certificate to be returned in oldWithNew field of genp]:file_or_uri:_files' \ '-poll_count[number of times the client must poll before receiving a certificate]:number' \ '-check_after[checkAfter value to include in poll response]:number' \ '-grant_implicitconf[grant implicit confirmation of newly enrolled certificate]' \ '-pkistatus[PKIStatus to be include in server response]:number' \ '-failure[a single failure info bit number to be include in server response]:number' \ '-failurebits[number representing failure bits to be include in server response]:number' \ '-statusstring[text to be include as status string in server response]:str' \ '-send_error[force server to reply with error message]' \ '-send_unprotected[send reponse message without CMP-level protection]' \ '-send_unprot_err[server shall send unprotected error message]' \ '-accept_unprotected[accept missing or invalid protection of requests]' \ '-accept_unprot_err[accept unprotected error messages from client]' \ '-accept_raverified[accept RAVERIFIED as proof of possession(POPO)]' \ $openssl_verification_options[@] } _openssl_cmp_verbosity_level() { local -a levels=( '0:EMERG' '1:ALERT' '2:CRIT' '3:ERR' '4:WARN' '5:NOTE' '6:INFO(Default)' '7:DEBUG' '8:TRACE' ) _describe -t levels 'levels' levels "$@" } _openssl_cmp_commands() { local -a commands=( "ir:Initialization Request" "cr:Certificate Request" "p10cr:PKCS#10 Certification Request (for legacy support)" "kur:Key Update Request" "rr:Revocation Request" "genm:General Message" ) _describe -t commands 'commands' commands "$@" } _openssl_cmp_revocation_reasons() { local -a reasons=( '0:unspecified' '1:keyCompromise' '2:cACompromise' '3:affiliationChanged' '4:superseded' '5:cessationOfOperation' '6:certificateHold' '8:removeFromCRL' '9:privilegeWithdrawn' '10:aACompromise' ) _describe -t reasons 'reasons' reasons "$@" } _openssl_cms() { local -a ciphers=($(openssl enc -list | tail -n +2 )) local -a cipher_flags=() for cipher in $ciphers[@] do cipher_flags+=("($ciphers)${cipher}[use ${cipher:1:u} to encrypt]") done _arguments \ '(- *)-help[print help message]' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-config[config file]:file:_files' \ '-encrypt[encrypt data for the given recipient certificates]' \ '-decrypt[decrypt data using the supplied certificate and private key]' \ '-sign[sign data using the supplied certificate and private key]' \ '-verify[verify signed data]' \ '-resign[resign a message]' \ '-sign_receipt[generate and output a signed receipt for the supplied message]' \ '-verify_receipt[verify a signed receipt in file receipt]:receipt:_files' \ '-digest[digest in hexadecimal form instead of computing it]:digest' \ '-digest_create[create a CMS DigestedData type]' \ '-digest_verify[verify a CMS DigestedData type and output the content]' \ '-compress[create a CMS CompressedData type]' \ '-uncompress[uncompress a CMS CompressedData type and output the content]' \ '-EncryptedData_encrypt[encrypt content using supplied symmetric key and algorithm]' \ '-EncryptedData_decrypt[decrypt content using supplied symmetric key and algorithm]' \ '-data_create[create a CMS Data type]' \ '-data_out[Data type and output the content]' \ '-cmsout[take an input message and write out a PEM encoded CMS structure]' \ '-inform[input format of the CMS structure]:format:(DER PEM SMIME)' \ '-outform[output format of the CMS structure]:format(DER PEM SMIME)' \ '-rctform[signed receipt format for use with the -receipt_verify]:format:(DER PEM SMIME)' \ '(-stream -indef -noindef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \ '(-stream -indef -noindef)-noindef[disable streaming I/O for encoding operations]' \ '-binary[do not convert to canonical format]' \ '-crlfeol[use CRLF instead of LF as end of line]' \ '-asciicrlf[strip trailing whitespace from all lines, delete trailing blank lines at EOF]' \ '-pwri_password[password for recipient]' \ '-secretkey[symmetric key to use]:key' \ '-secretkeyid[key identifier for the supplied symmetric key for KEKRecipientInfo type]:id' \ '-inkey[private key file or URI to use when signing or decrypting]:file_or_uri:_files' \ '-passin[private key password source]:option:_openssl_pass_phrase_options' \ '*-keyopt[options for signing and encryption]:option' \ '-keyform[format of the private key file]:format:(DER PEM P12 ENGINE)' \ $openssl_provider_options[@] \ $openssl_random_state_options[@] \ '-originator[originator of the encrypted message]:file:_files' \ '-recip[recipient of the certificate when decrypting a message]:file:_files' \ $cipher_flags[@] \ '-wrap[cipher algorithm to use for key wrap]:cipher:_openssl_cipher_algorithms' \ '-debug_decrypt[set the CMS_DEBUG_DECRYPT flag]' \ '-md[digest algorithm to use when signing or resigning]:digest:_openssl_digests' \ '-signer[a signing certificate]:file:_files' \ '-certfile[additional certificates]:file:_files' \ '-cades[add an ESS signingCertificate or ESS signingCertificateV2 attributes to the SignerInfo]' \ '-nodetach[use opaque signing]' \ '-nocerts[do not include signers certificate when signing]' \ '-noattr[do not include any signed attributes]' \ '-nosmimecap[exclude list of supported algorithms from signed attributes]' \ '-no_signing_time[exclude the signing time from signed attributes]' \ '-receipt_request_all[requests should be provided by all recipient]' \ '-receipt_request_first[requests should be provided by first tier recipients]' \ '-receipt_request_from[add an explicit email address where receipts should be supplied]:email_address' \ '-receipt_request_to[add an explicit email address where signed receipts should be sent to]:email_address' \ '-signer[signer certificate file]:file:_files' \ '-content[supply or override content for detached signature]:file:_files' \ '-no_content_verify[do not verify signed content signatures]' \ '-no_attr_verify[do not verify signed attribute signatures]' \ '-nosigs[do not verify message signature]' \ '-noverify[do not verify the signers certificate of a signed message]' \ '-nointern[do not search certificates in message for signer]' \ '-cades[require and check signer certificate digest]' \ '-verify_retcode[exit non-zero on verification failure]' \ $openssl_trusted_certificate_options[@] \ '-keyid[subject key identifier to identify certificates instead of issuer name and serial number]' \ '-econtent_type[encapsulated content type]:type' \ '-text[add plain text MIME headers to the supplied message]' \ '-certsout[output file name to any certificates contained in the input message]:file:_files' \ '-to[TO email header]:to' \ '-from[FROM email header]:from' \ '-subject[SUBJECT email header]:subject' \ '-noout[do not output the parsed CMS structure]' \ '-print[print out all fields of the CMS structure]' \ '-nameopt[printing options for string fields]:nameopt:_openssl_name_display_options' \ '-receipt_request_print[print out the contents of any signed receipt requests]' \ $openssl_verification_options[@] \ '*::recipient_cert:_files' } _openssl_crl() { _arguments \ '(- *)-help[print help message]' \ '-inform[CRL input format]:format:(DER PEM)' \ '-outform[CRL output format]:format:(DER PEM)' \ '-key[private key to be used to sign the CRL]:key:_files' \ '-keyform[format of private key file]:format:(DER PEM P12)' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-gendelta[output a comparison of the main CRL and this file]:file:_files' \ '-badsig[corrupt the signature before writing it]'\ '-dateopt[date output format]:format:(rfc_822 iso_8601)' \ '-text[print out the CRL in text form]' \ '-verify[verify the signature in the CRL]' \ '-noout[do not output the encoded version of the CRL]' \ '-fingerprint[output the fingerprint of the CRL]' \ '-crlnumber[output the number of the CRL]' \ '-hash[output a hash of the issuer name]' \ '-hash_old[output the hash of the CRL issuer name using the older algorithm]' \ '-issuer[output the issuer name]' \ '-lastupdate[output the lastUpdate field]' \ '-nextupdate[output the nextUpdate field]' \ '-nameopt[specify how the subject or issuer names are displayed]:option:_openssl_name_display_options' \ $openssl_trusted_certificate_options[@] \ $openssl_provider_options[@] } _openssl_crl2pkcs7() { _arguments \ '(- *)-help[print help message]' \ '-inform[input format of the CRL]:format:(DER PEM)' \ '-outform[output format of the PKCS#7 object]:format:(DER PEM)' \ '-in[input file name to read a CRL from]:file:_files' \ '-out[output file name to write the PKCS#7 structure]:file:_files' \ '-certfile[file containing one or more certificates in PEM format]:file:_files' \ '-nocrl[no CRL is included in the output file]' \ $openssl_provider_options[@] } _openssl_dgst() { local not_need_digest_flags=$1 local -a digest_flags=() if (( not_need_digest_flags != 1 )); then local -a digests=($(openssl dgst -list | tail -n +2)) for digest in $digests[@] do digest_flags+=("${digest}[use ${digest:1} message digest algorithm]") done fi _arguments \ '(- *)-help[print help message]' \ $digest_flags[@] \ '(- *)-list[print out a list of supported message digests]' \ '-c[print out the digest in two digit groups separated by colons]' \ '(-d --debug)'{-d,--debug}'[print out BIO debugging information]' \ '-hex[digest is to be output as a hex dump]' \ '-binary[output the digest or signature in binary form]' \ '-xoflen[output length for XOF algorithms]:length' \ '-r[output the digest in the "coreutils" format]' \ '-out[output file name]:file:_files' \ '-sign[private key file or URI to sign the digest]:file_or_uri:_files' \ '-keyform[format of the key to sign with]:format:(DER PEM P12 ENGINE)' \ '-sigopt[options of signature algorithms during sign or verify operations]:options' \ '-passin[private key password source]:source:_openssl_pass_phrase_options' \ '-verify[public key file to verify the signature]:file:_files' \ '-prverify[private key file to verify the signature]:file:_files' \ '-signature[actual signature file to verify]:file:_files' \ '-hmac[key to create a hashed MAC]:key' \ '-mac[MAC algorithm]:alg:_openssl_mac_algorithms' \ '-macopt[options of MAC algorithm]:options' \ '-fips-fingerprint[compute HMAC using a specific key for certain OpenSSL-FIPS operations]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '*::file:_files' } _openssl_dhparam() { _arguments \ '(- *)-help[print help message]' \ '-inform[input format(default is PEM)]:format:(DER PEM)' \ '-outform[output format(default is PEM)]:format:(DER PEM)' \ '-in[input file name to read a CRL from]:file:_files' \ '-out[output file name to write the PKCS#7 structure]:file:_files' \ '-dsaparam[read or create DSA parameters]' \ '-check[perform numerous checks to see]' \ '(-2 -3 -5)-2[generator use 2]' \ '(-2 -3 -5)-3[generator use 3]' \ '(-2 -3 -5)-5[generator use 5]' \ '-noout[inhibit the output of the encoded version of the parameters]' \ '-text[print out the DH parameters in human readable form]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-quiet[suppress the output of progress messages]' \ '*::numbits' } _openssl_dsa() { _arguments \ '(- *)-help[print help message]' \ '-inform[key input format]:format:(DER PEM)' \ '-outform[key output format(default: PEM)]:format:(DER PEM)' \ '-in[input file name]:file:_files' \ '-out[output file name to write a key]:file:_files' \ '-passin[password source for input file]:source:_openssl_pass_phrase_options' \ '-passout[password source for output file]:source:_openssl_pass_phrase_options' \ '-aes128[encrypt the private key with aes128 before outputting it]' \ '-aes192[encrypt the private key with aes192 before outputting it]' \ '-aes256[encrypt the private key with aes256 before outputting it]' \ '-aria128[encrypt the private key with aria128 before outputting it]' \ '-aria192[encrypt the private key with aria192 before outputting it]' \ '-aria256[encrypt the private key with aria256 before outputting it]' \ '-camellia128[encrypt the private key with camellia128 before outputting it]' \ '-camellia192[encrypt the private key with camellia192 before outputting it]' \ '-camellia256[encrypt the private key with camellia256 before outputting it]' \ '-des[encrypt the private key with des before outputting it]' \ '-des3[encrypt the private key with des3 before outputting it]' \ '-idea[encrypt the private key with idea before outputting it]' \ '-text[print out the public, private key components and parameters]' \ '-noout[prevent output of the encoded version of the key]' \ '-modulus[print out the value of the public key component of the key]' \ '-pubin[read public key instead of private key]' \ '-pubout[output public key instead of private key]' \ '-pvk-strong[enable "Strong" PVK encoding level]' \ '-pvk-weak[enable "Weak" PVK encoding level]' \ '-pvk-none[do not enforce PVK encoding]' \ $openssl_provider_options[@] } _openssl_dsaparam() { _arguments \ '(- *)-help[print help message]' \ '-inform[DSA parameters input format]:format:(DER PEM)' \ '-outform[DSA parameters output format]:format:(DER PEM)' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-noout[inhibit the output of the encoded version of the parameters]' \ '-text[print out the DSA parameters in human readable form]' \ '-genkey[generate a DSA either using the specified or generated parameters]' \ '-verbose[print extra details about the operations being performed]' \ '-quiet[print fewer details about the operations being performed]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '1:numbits' \ '2:numqbits' } _openssl_ec() { _arguments \ '(- *)-help[print help message]' \ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \ '-outform[key output format]:format:(DER PEM)' \ '-in[input file name or input URI]:file_or_uri:_files' \ '-out[output file name]:file:_files' \ '-passin[passowrd source for input file]:source:_openssl_pass_phrase_options' \ '-passout[passowrd source for output file]:source:_openssl_pass_phrase_options' \ '-des[encrypt the private key with DES]' \ '-des3[encrypt the private key with DES3]' \ '-idea[encrypt the private key with IDEA]' \ '-text[print out the public, private key components and parameters]' \ '-noout[prevents output of the encoded version of the key]' \ '-param_out[print the elliptic curve parameters]' \ '-pubin[read public key from the input instead of private key]' \ '-pubout[output public key instead of private key]' \ '-conv_form[how to convert points on the elliptic curve]:how:(compressed uncompressed hybrid)' \ '-param_enc[how to encode the elliptic curve parameters]:how:(named_curve explicit)' \ '-no_public[omit the public key components from the private key output]' \ '-check[check the consistency of an EC private or public key]' \ $openssl_provider_options[@] } _openssl_ecparam() { local -a short_names=($(openssl ecparam -list_curves | awk -F: '/^\s+\S+\s*:/{ print $1 }')) _arguments \ '(- *)-help[print help message]' \ '-inform[EC parameters input format]:format:(DER PEM)' \ '-outform[EC parameters output format]:format:(DER PEM)' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-noout[inhibit the output of the encoded version of the parameters]' \ '-text[print out the EC parameters in human readable form]' \ '-check[validate the elliptic curve parameters]' \ '-check_named[validate the elliptic name curve parameters]' \ '-name[use the EC parameters with the specified short name]:name:(($short_names))' \ '-list_curves[print out a list of all currently implemented EC parameters name]' \ '-conv_form[specify how the points on the elliptic curve are converted into octet strings]:type:(compressed uncompressed hybrid)' \ '-param_enc[specify the how the elliptic curve parameters are encoded]:type:(named_curve explicit)' \ '-no_seed[inhibit that the seed for the parameter generation]' \ '-genkey[generate an EC private key]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } _openssl_enc() { local not_need_cipher_flags=$1 local -a cipher_flags=() if (( not_need_cipher_flags != 1 )); then local -a ciphers=($(openssl enc -list | tail -n +2 )) for cipher in $ciphers[@] do cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]") done fi _arguments \ '(- *)-help[print help message]' \ '(- *)'{-list,-ciphers}'[list all supported ciphers]' \ $cipher_flags[@] \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-pass[password source]:source:_openssl_pass_phrase_options' \ '-e[encrypt the input data(default behavior)]' \ '-d[decrypt the input data]' \ '(-a -base64)'{-a,-base64}'[Base64 proess the data]' \ '-A[base64 encoding produces output without any newline character]' \ '-k[password to derive the key from]:password' \ '-kfile[file to read the password from the first line]:file:_files' \ '-md[digest to create the key from the passphrase]:digest:(md2 md5 sha1 shar256)' \ '-iter[interation count on the password in deriving the encryption key]:count' \ '-pbkdf2[use PBKDF2 algorithm with a default iteration count of 10000]' \ '-saltlen[salt length to use when using th -pbkdf2 option]:length' \ '-nosalt[do not use a salt in the key derivation routines]' \ '-salt[use salt when encrypting]' \ '-S[actual salt to use]:salt' \ '-K[actual key to use]:key' \ '-iv[actual IV to use]:iv' \ '-p[print out the key and IV used]' \ '-P[print out the key and IV used then immediately exit]' \ '-bufsize[buffer size of I/O]:size' \ '-nopad[disable standard block padding]' \ '-v[verbose print]' \ '-debug[debug the BIOs used for I/O]' \ '-z[compress or decompress encrypted data using zlib after encrypting or before decryption]' \ '-none[use NULL cipher]' \ '-skeymgmt[name of the EVP_SKEYMGMT to be used]:name' \ '-skeyopt[opaque symmetric key options]:options' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } _openssl_errstr() { _arguments \ '(- *)-help[print help message]' \ '*:error_code' } _openssl_fipsinstall() { _arguments \ '(- *)-help[print help message]' \ '-module[file name of the FIPS module]:file:_files' \ '-out[file name to output configuration data to]:file:_files' \ '-in[input file name to load configuration data from]:file:_files' \ '-verify[verify the input configuration file]' \ '-provider_name[name of the provider inside the configuration file(default: "fips")]:name' \ '-section_name[name of the section inside the configuration file(default: "fips_sect")]:name' \ '-mac_name[name of a supported MAC algorithm]:name:_openssl_mac_algorithms' \ '-macopt[options of the MAC algorithm]:option' \ '-noout[disable logging of the self tests]' \ '-pedantic[strictly FIPS compliant]' \ '-no_conditional_errors[not enter an error state]' \ '-no_security_checks[not perform run-time security checks]' \ '-ems_check[enable a run-time Extended Master Secret]' \ '-no_short_mac[not allow short MAC outputs]' \ '-hmac_key_check[not allow small keys sizes when using HMAC]' \ '-kmac_key_check[not allow small keys sizes when using KMAC]' \ '-no_drbg_truncated_digests[not allow truncated digests with Hash and HMAC DRBGs]' \ '-signature_digest_check[enforce signature algorithms to use digests]' \ '-tls13_kdf_digest_check[enable a run-time digest check when deriving a key by TLS13 KDF]' \ '-tls1_prf_digest_check[enable a run-time digest check when deriving a key by TLS_PRF]' \ '-sshkdf_digest_check[enable a run-time digest check when deriving a key by SSHKDF]' \ '-x963kdf_digest_check[enable a run-time digest check when deriving a key by X963KDF]' \ '-dsa_sign_disabled[not allow DSA signing]' \ '-tdes_encrypt_disabled[not allow Triple-DES encryption]' \ '-rsa_pkcs15_padding_disabled[not allow PKCS#1 version 1.5 padding]' \ '-rsa_pss_saltlen_check[enable a run-time salt length check]' \ '-rsa_sign_x931_disabled[not allow X9.31 padding]' \ '-hkdf_key_check[enable a run-time short key-derivation key check when deriving a key by HKDF]'\ '-kbkdf_key_check[enable a run-time short key-derivation key check when deriving a key by KBKDF]'\ '-tls13_kdf_key_check[enable a run-time short key-derivation key check when deriving a key by TLS13 KFD]'\ '-tls1_prf_key_check[enable a run-time short key-derivation key check when deriving a key by TLS_PRF]'\ '-sshkdf_key_check[enable a run-time short key-derivation key check when deriving a key by SSHKDF]'\ '-sskdf_key_check[enable a run-time short key-derivation key check when deriving a key by SSKDF]'\ '-x963kdf_key_check[enable a run-time short key-derivation key check when deriving a key by X963KDF]'\ '-x942kdf_key_check[enable a run-time short key-derivation key check when deriving a key by X942KDF]'\ '-no_pbkdf2_lower_bound_check[not perform run-time lower bound check for PBKDF2]' \ '-ecdh_cofactor_check[enable a run-time check that ECDH uses the EC curves cofactor value]' \ '-self_test_onload[do not write two fields related to "test status indicator" and "MAC status indicator"]' \ '-self_test_oninstall[ write two fields related to "test status indicator" and "MAC status indicator]' \ '-quiet[do not output pass/fail messages]' \ '-corrupt_desc[currupt description to be used to test failure]:description' \ '-corrupt_type[currupt type to be used to test failure]:type' \ '-config[configuration file]:file:_files' } _openssl_gendsa() { _arguments \ '(- *)-help[print help message]' \ '-out[output file name]' \ '-passout[passphrase used for the output file]:option:_openssl_pass_phrase_options'\ '-aes128[encrypt the private key with aes128 before outputting it]' \ '-aes192[encrypt the private key with aes192 before outputting it]' \ '-aes256[encrypt the private key with aes256 before outputting it]' \ '-aria128[encrypt the private key with aria128 before outputting it]' \ '-aria192[encrypt the private key with aria192 before outputting it]' \ '-aria256[encrypt the private key with aria256 before outputting it]' \ '-camellia128[encrypt the private key with camellia128 before outputting it]' \ '-camellia192[encrypt the private key with camellia192 before outputting it]' \ '-camellia256[encrypt the private key with camellia256 before outputting it]' \ '-des[encrypt the private key with des before outputting it]' \ '-des3[encrypt the private key with des3 before outputting it]' \ '-idea[encrypt the private key with idea before outputting it]' \ '-verbose[print extra details about the operations being performed]' \ '-quiet[print fewer details about the operations being performed]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '*:paramfile:_files' } _openssl_genpkey() { local -a builtin_algorithms=( RSA DSA DH DHX EC RSA RSA-PSS EC X25519 X448 ED25519 ED448 ML-DSA-44 ML-DSA-5 ML-DSA-87 ML-KEM-512 ML-KEM-768 ML-KEM-1024 ) local -a ciphers=($(openssl enc -list | tail -n +2 )) local -a cipher_flags=() for cipher in $ciphers[@] do cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]") done _arguments \ '(- *)-help[print help message]' \ '-out[output private key file]:file:_files' \ '-outpubkey[output public key file]:file:_files' \ '-outform[output format]:format:(DER PEM)' \ '-verbose[output "status dots" while generating keys]' \ '-quiet[do not output "status dots" while generating keys]' \ '-pass[output file password source]:source:_openssl_pass_phrase_options' \ $cipher_flags[@] \ '-algorithm[public key algorithm]:alg:(($builtin_algorithms))' \ '-pkeyopt[public key algorithm option]:option' \ '-genparam[generate a set of parameters instead of a private key]' \ '-paramfile[file to supply public key parameters]:file:_files' \ '-text[print an (unencrypted) text representation of private and public keys and parameters]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-config[configuration file]:file:_files' } _openssl_genrsa() { _arguments \ '(- *)-help[print help message]' \ '-out[output key file name]:file:_files' \ '-passout[output file password source]:source:_openssl_pass_phrase_options' \ '-aes128[encrypt the private key with AES128]' \ '-aes192[encrypt the private key with AES192]' \ '-aes256[encrypt the private key with AES256]' \ '-aria128[encrypt the private key with ARIA128]' \ '-aria192[encrypt the private key with ARIA192]' \ '-aria256[encrypt the private key with ARIA256]' \ '-camellia128[encrypt the private key with CAMELLIA128]' \ '-camellia192[encrypt the private key with CAMELLIA192]' \ '-camellia256[encrypt the private key with CAMELLIA256]' \ '-des[encrypt the private key with DES]' \ '-des3[encrypt the private key with DES3]' \ '-idea[encrypt the private key with IDEA]' \ '(-F4 -f4)'{-F4,-f4}'[use 65537 as public exponent]' \ '-primes[specify the number of primes to use while generating the RSA key]:num' \ '-verbose[print extra details about the operations being performed]' \ '-quiet[print fewer details about the operations being performed]' \ '-traditional[write the key using the traditional PKCS#1 format]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '::numbits' } _openssl_help() { local -a commands=( # Standard commands asn1parse ca ciphers cmp cms crl crl2pkcs7 dgst dhparam dsa dsaparam ec ecparam enc engine errstr fipsinstall gendsa genpkey genrsa help info kdf list mac nseq ocsp passwd pkcs12 pkcs7 pkcs8 pkey pkeyparam pkeyutl prime rand rehash req rsa rsautl s_client s_server s_time sess_id skeyutl smime speed spkac srp storeutl ts verify version x509 # Message Digest commands (see the `dgst' command for more details) blake2b512 blake2s256 md4 md5 rmd160 sha1 sha224 sha256 sha3-224 sha3-256 sha3-384 sha3-512 sha384 sha512 sha512-224 sha512-256 shake128 shake256 sm3 # Cipher commands (see the `enc' command for more details) aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc aes-256-ecb aria-128-cbc aria-128-cfb aria-128-cfb1 aria-128-cfb8 aria-128-ctr aria-128-ecb aria-128-ofb aria-192-cbc aria-192-cfb aria-192-cfb1 aria-192-cfb8 aria-192-ctr aria-192-ecb aria-192-ofb aria-256-cbc aria-256-cfb aria-256-cfb1 aria-256-cfb8 aria-256-ctr aria-256-ecb aria-256-ofb base64 bf bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc camellia-128-ecb camellia-192-cbc camellia-192-ecb camellia-256-cbc camellia-256-ecb cast cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb des-ofb des3 desx rc2 rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 rc4-40 seed seed-cbc seed-cfb seed-ecb seed-ofb sm4-cbc sm4-cfb sm4-ctr sm4-ecb sm4-ofb zlib zstd ) _values commands $commands } _openssl_info() { _arguments \ '(- *)-help[print help message]' \ '-configdir[outputs the default directory for OpenSSL configuration files]' \ '-enginesdir[outputs the default directory for OpenSSL engine modules]' \ '-modulesdir[outputs the default directory for OpenSSL dynamically loadable modules]' \ '-dsoext[outputs the DSO extension OpenSSL uses]' \ '-dirnamesep[outputs the separator character between a directory specification and a filename]' \ '-listsep[outputs the OpenSSL list separator character]' \ '-seeds[outputs the randomness seed sources]' \ '-cpusettings[outputs the OpenSSL CPU settings info]' \ '-windowscontext[outputs the Windows install context]' } _openssl_list() { _arguments \ '(- *)-help[print help message]' \ '-verbose[displays extra information]' \ '-select[only list algorithms that match this name]:name' \ '-1[list the commands, digest-commands, or cipher-commands in a single column]' \ '-all-algorithms[display lists of all algorithms]' \ '-commands[display a list of standard command]' \ '-standard-commands[display list of standard commands]' \ '-digest-commands[display a list of message digest commands(deprecated)]' \ '-cipher-commands[display a list of cipher commands(deprecated)]' \ '-cipher-algorithms[display a list of symmetric cipher algorithms]' \ '-digest-algorithms[display a list of digest algorithms]' \ '-kdf-algorithms[display a list of kdf algorithms]' \ '-mac-algorithms[display a list of mac algorithms]' \ '-random-instances[list the primary, public and private random number generator details]' \ '-random-generators[display a list of random number generators]' \ '-encoders[display a list of encoders]' \ '-decoders[display a list of decoders]' \ '-public-key-algorithms[display a list of public key algorithms]' \ '-public-key-methods[display a list of public key methods]' \ '-key-managers[display a list of key managers]' \ '-skey-managers[display a list of symmetric key managers]' \ '-key-exchange-algorithms[display a list of key exchange algorithms]' \ '-kem-algorithms[display a list of key encapsulation algorithms]' \ '-tls-groups[display a list of the IANA names of all available TLS groups]' \ '-all-tls-groups[display a list of the names of all available TLS groups]' \ '-tls1_2[list TLS groups compatible with TLS 1.2]'\ '-tls1_3[list TLS groups compatible with TLS 1.3]'\ '-signature-algorithms[display a list of signature algorithms]' \ '-tls-signature-algorithms[display the list of signature algorithms available for TLS handshakes]' \ '-asymcipher-algorithms[display a list of asymmetric cipher algorithms]' \ '-store-loaders[display a list of store loaders]' \ '-providers[display a list of all loaded providers with their names, version and status]' \ '-disabled[display a list of disabled features]' \ '-objects[display a list of built in objects]' \ '-options[output a two-column list of the options accepted by the specified command]:command:_openssl_help' \ $openssl_provider_options[@] } _openssl_mac() { local -a cbc_or_gcm_ciphers=( AES-128-CBC AES-192-CBC AES-256-CBC AES-128-GCM AES-192-GCM AES-256-GCM ) _arguments \ '(- *)-help[print help message]' \ '-in[input file name to calculate a MAC]:file:_files' \ '-out[output file name]:file:_files' \ '-binary[output the MAC in binary form]' \ '-cipher[specify the cipher algorithm]:ciper:(($cbc_or_gcm_ciphers))' \ '-digest[use HMAC as an alphanumeric string]:name:_openssl_digests' \ '-macopt[options to the MAC algorithm]:options:_openssl_macopts' \ $openssl_provider_options[@] \ '*:mac_name:_openssl_mac_algorithms' } _openssl_nseq() { _arguments \ '(- *)-help[print help message]' \ '-in[input file name to read]:file:_files' \ '-out[output file name]:file:_files' \ '-toseq[output Netscape certificate sequence]' \ $openssl_provider_options[@] } _openssl_ocsp() { local -a digests=($(openssl dgst -list | tail -n +2)) local -a digest_flags=() for digest in $digests[@] do digest_flags+=("${digest}[use ${digest:1} message digest algorithm]") done _arguments \ '(- *)-help[print help message]' \ '-out[output file name]:file:_files' \ '-issuer[specify the current issuer certificate]:file:_files' \ '-cert[certificate file name to request]:file:_files' \ '-no_certs[do not include any certificates in signed request]' \ '-serial[serial number of certificate]:num' \ '-signer[signer to sign the OSCP request]:file:_files' \ '-signkey[private key to sign the OCSP request]:file:_files' \ '-sign_other[additional certificates to include in the signed request]:file:_files' \ '(-nonce -no_nonce)-nonce[add an OCSP nonce extension to a request]' \ '(-nonce -no_nonce)-no-nonce[disable OCSP nonce addition]' \ '-req_text[print out the text form of the OCSP request]' \ '-resp_text[print out the text form of the OCSP response]' \ '-text[print out the text form of the OCSP both request and response]' \ '-reqout[write out the DER-encoded OCSP request to file]:file:_files' \ '-respout[write out the DER-encoded OCSP response to file]:file:_files' \ '-reqin[read OCSP request from file]:file:_files' \ '-respin[read OCSP response from file]:file:_files' \ '-url[responder host and optionally port and path via a URL]:url:_urls' \ '-host[host and port to be sent the OCSP request]:host' \ '-path[HTTP path to be sent the OCSP request]:path' \ '-proxy[HTTP(S) proxy server to use for reaching the OCSP server]:address' \ '-no_proxy[list of IP addresses and DNS names of servers not to use an HTTP(S) proxy for]:addresses' \ '*-head[add the header name with the specified value to the OCSP request]:key_value' \ '-timeout[connection timeout to the OCSP responder in seconds]:seconds' \ '-verify_other[file or URI containing additional certificates to search for signer]:file:_files' \ '-trust_other[do not verify additional certificates]' \ '-VAfile[file or URI containing explicitly trusted responder certificates]:file:_files' \ '-noverify[do not attempt to verify the OCSP response signature or the nonce values]' \ '-no_intern[ignore certificates contained in the OCSP response]' \ '-no_signature_verify[do not check the signature on the OCSP response]' \ '-no_cert_verify[do not verify the OCSP response signers certificate at all]' \ '-no_chain[do not use certificates in the response as additional untrusted CA certificates]' \ '-no_explicit[do not explicitly trust the root CA]' \ '-no_cert_checks[do not perform any additional checks on the OCSP response signers certificate]' \ '-validity_period[acceptable error range in seconds]:nsec' \ '-status_age[maximum status age in seconds]:seconds: ' \ '-rcid[digest algorithm to use for certificate identification in the OCSP response]:digest:_openssl_digests' \ $digest_flags[@] \ $openssl_trusted_certificate_options[@] \ $openssl_verification_options[@] \ $openssl_provider_options[@] \ '-index[index file parameter]:file:_files' \ '-CA[index file of CA certificate corresponding to the revocation information]:file:_files' \ '-rsigner[certificate to sign OCSP responses with]:file:_files' \ '-rkey[private key to sign OCSP responses with]:file:_files' \ '-passin[private key password source]:source:_openssl_pass_phrase_options' \ '-rother[additional certificates to include in the OCSP response]:file:_files' \ '-rsigopt[pass options to the signature algorithm when signing OCSP responses]:option' \ '-rmd[digest to use when signing the reponse]:digest:_openssl_digests' \ '-badsig[corrupt the response signature before writing it]' \ '-resp_no_certs[do not include any certificates in the OCSP response]' \ '-resp_key_id[identify the signer certificate using the key ID]'\ '-port[port to listen for OCSP requests on]:port' \ '-ignore_err[ignore malformed requests or responses]' \ '-nrequest[request number that OCSP server will exit after this number of requests]:number' \ '-multi[run the specified number of OCSP responder child processes]:process_count' \ '-nmin[number of minites when fresh revocation information]:minites' \ '-nmin[number of days when fresh revocation information]:minites' } _openssl_passwd() { _arguments \ '(- *)-help[print help message]' \ '-1[use the MD5 based BSD password algorithms(default)]' \ '-apr[use the apr1 algorithms(Apache variant of the BSD algorithm)]' \ '-aixmd5[use the AIX MD5 algorithm]' \ '-5[use the SHA256 based algorithms defined by Ulrich Drepper]' \ '-6[use the SHA512 based algorithms defined by Ulrich Drepper]' \ '-salt[use the specified salt]:salt' \ '-in[read passwords from file]:file' \ '-stdin[read passwords from stdin]' \ '-noverify[do not verify when reading a password from the terminal]' \ '-quiet[do not output warnings when passwords given at the command line are truncated]' \ '-table[format output as table]' \ '-reverse[when the -table -option is used, reverse the order of cleartext and hash]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '*::password' } _openssl_pkcs12() { _arguments \ '(- *)-help[print help message]' \ '-passin[input password source]:source:_openssl_pass_phrase_options' \ '-passout[output password source]:source:_openssl_pass_phrase_options' \ '-password[password source]:source:_openssl_pass_phrase_options' \ '-twopass[prompt for separate integrity and encryption passwords]' \ '-nokeys[no private keys will be output]' \ '-nocerts[no certificates will be output]' \ '-noout[inhibit all credentials output]' \ '-legacy[use legacy mode of operation and automatically load the legacy provider]' \ $openssl_provider_options[@] \ $openssl_random_state_options[@] \ '-in[input file name or URI]:file_or_uri:_files' \ '-out[output file name]:file:_files' \ '-info[output additional information about the PKCS#12]' \ '-nomacver[do not attempt to verify the integrity MAC]' \ '-clcerts[only output client certificates]' \ '-cacerts[only output CA certificates]' \ '-aes128[encrypt the private key with AES128]' \ '-aes192[encrypt the private key with AES192]' \ '-aes256[encrypt the private key with AES256]' \ '-aria128[encrypt the private key with ARIA128]' \ '-aria192[encrypt the private key with ARIA192]' \ '-aria256[encrypt the private key with ARIA256]' \ '-camellia128[encrypt the private key with CAMELLIA128]' \ '-camellia192[encrypt the private key with CAMELLIA192]' \ '-camellia256[encrypt the private key with CAMELLIA256]' \ '-des[encrypt the private key with DES]' \ '-des3[encrypt the private key with DES3]' \ '-idea[encrypt the private key with IDEA]' \ '-noenc[do not encrypt private keys at all]' \ '-export[create PKCS#12 file rather than parsed]' \ '-inkey[private key input file or URI for PKCS12 output]:file_or_uri:_files' \ '-certfile[extra certificates input file]:file:_files' \ '-passcerts[password source for certificate input]:source:_openssl_pass_phrase_options' \ '-chain[certificate chain is built and included in the PKCS#12 output file]' \ '-untrusted[untrusted certificates input file]:file:_files' \ $openssl_trusted_certificate_options[@] \ '-name["friendly name" for the certificates and private key]:name' \ '-caname["friendly name" for other certificates]:name' \ '-CSP[name as a Microsoft CSP name]:name' \ '-LMK[add the "Local Key Set" identifier to the attributes]' \ '-keyex[private key is to be used for key exchange]' \ '-keysig[private key is to be used for just signing]' \ '-keypbe[algorithm used to encrypt the private key]:alg:_openssl_cipher_algorithms' \ '-certpbe[algorithm used to encrypt certificates]:alg:_openssl_cipher_algorithms' \ '-descert[encrypt the certificates using triple DES]' \ '-macalg[MAC digest algorithm]:digest:_openssl_digests' \ '-pbmac1_pbkdf2[use PBMAC1 with PBKDF2 for MAC protection]' \ '-pbmac1_pbkdf2_md[PBKDF2 KDF digest algorithm]:alg:_openssl_digests' \ '-iter[iteration count for the encryption key and MAC]:count' \ '-noiter[set iteration count to 1 for encryption]' \ '-nomaciter[set iteration count to 1 for MAC]' \ '-macsaltlen[salt length in bytes for the MAC]:length' \ '-nomac[do not attempt to provide the MAC integrity]' \ '-jdktrust[export pkcs12 file in a foormat compatible with Java keystore usage]:usage:(anyExtendedKeyUsage)' } _openssl_pkcs7() { _arguments \ '(- *)-help[print help message]' \ '-inform[input format]:format:(DER PEM)' \ '-outform[output format]:format:(DER PEM)' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-print[print out the full PKCS7 object]' \ '-print_certs[print out any certificates or CRLs contained in the file]' \ '-quiet[print out just the PEM-encoded certificates without any other output]' \ '-text[print out certificate details in full]' \ '-noout[do not output the encoded version of the PKCS#7 structure]' \ $openssl_provider_options[@] } _openssl_pkcs8() { local -a prf_algorithms=( hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384 hmacWithSHA512 ) _arguments \ '(- *)-help[print help message]' \ '-topk8[read a private key and write a PkCS#8 format key]' \ '-inform[input format]:format:(DER PEM)' \ '-outform[output format]:format:(DER PEM)' \ '-traditional[traditional format]' \ '-in[input file name]:file:_files' \ '-passin[input password source]:source:_openssl_pass_phrase_options' \ '-passout[output password source]:source:_openssl_pass_phrase_options' \ '-out[output file name]:files:_files' \ '-iter[number of iterations to create PKCS#8 containers]:count' \ '-noiter[use 1 as iteration count]' \ '-nocrypt[output unencrypted PrivateKeyInfo structure]' \ '-v2[algorithm for PKCS#5 v2.0]:alg:_openssl_cipher_algorithms' \ '-v2prf[PRF algorithm to use with PKCS#5 v2.0]:alg:(($prf_algorithms))' \ '-v1[algorithm for PKCS#5 v1.5 or PKCS#12]:alg:_openssl_cipher_algorithms' \ '-scrypt[use the script algorithm for private key encryption]' \ '-scrypt_N[scrypt "N" parameter]:n' \ '-scrypt_r[scrypt "r" parameter]:r' \ '-scrypt_p[scrypt "p" parameter]:p' \ '-saltlen[length of the salt to use for the PBE algorithm]:length' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } _openssl_pkey() { _arguments \ '(- *)-help[print help message]' \ $openssl_provider_options[@] \ '-check[check the consistency of a key pair for both public and private components]' \ '-pubcheck[check the correctness of either a public key or the public components of a key pair]' \ '-in[input file or URI]:file_or_uri:_files' \ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \ '-passin[password source for the key input]:source:_openssl_pass_phrase_options' \ '-pubin[read public key instead of private key]' \ '-out[output file name]' \ '-outform[key output format]:format:(DER PEM)' \ '-cipher[cipher to encrypt the PEM encoded private key]:cipher:_openssl_ciphers' \ '-passout[password source for the output file]:source:_openssl_pass_phrase_options' \ '-traditional[use older "traditional" format]' \ '-pubout[output the public components]' \ '-noout[do not output the key in encoded form]' \ '-text[output the various key components in plain text]' \ '-text_pub[output only the public key components in text form]' \ '-ec_conv_form[specify how the points on the elliptic-curve curve are converted into octet strings]:type:(compressed uncompressed hybrid)' \ '-ec_param_enc[specify how the elliptic curve parameters are encoded]:type:(named_curve explicit)' } _openssl_pkeyparam() { _arguments \ '(- *)-help[print help message]' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-text[print out the parameters in plain text]' \ '-noout[do not output the encoded version of the parameters]' \ '-check[check the correctness of parameters]' \ $openssl_provider_options[@] } _openssl_pkeyutl() { _arguments \ '(- *)-help[print help message]' \ '-in[input file name]:file:_files' \ '-rawin[indicate that signature or verification input data is raw data]' \ '-digest[digest algorithm to be used to hash the input data]:digest:_openssl_digests' \ '-out[output file name]:file:_files' \ '-secret[shared-secret output file name]:file:_files' \ '-sigfile[signature file]:file:_files' \ '-inkey[input key file name or URI]:file_or_uri:_files' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-passin[input key password source]:source:_openssl_pass_phrase_options' \ '-pubin[read public key instead of private key]' \ '-certin[input is a certificate containing a public key]' \ '-rev[reverse the order of the input buffer]' \ '-sign[sign the input data and output the signed result]' \ '-verify[verify the input data against the signature]'\ '-verifyrecover[verify the given signature and output the recovered data]' \ '-encrypt[encrypt the input data using a public key]' \ '-decrypt[decrypt the input data using a private key]' \ '-derive[derive a shared secret using own private (EC)DH key and peer key]' \ '-peerkey[file containing the peer public or private (EC)DH key]:file:_files' \ '-peerform[peer key format]:format:(DER PEM P12 ENGINE)' \ '-encap[use a Key Encapsulation Mechanism to encapsulate a shared-secret]' \ '-decap[decode an encapsulated secret with a private key]' \ '-kemop[specify KEM mode for key algorithm]:mode' \ '-kdf[key derivation function algorithm]:algorithm:(TLS1-PRF HKDF)' \ '-kdflen[output length for KDF]:length' \ '-pkeyopt[public key options]:options' \ '-pkeyopt_passin[public key option from stdin or a password source]:option:_openssl_pass_phrase_options' \ '-hexdump[hex dump the output data]' \ '-asn1parse[parse the ASN.1 output data to check its DER encoding]'\ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-config[configuration file]:file:_files' } _openssl_prime() { _arguments \ '(- *)-help[print help message]' \ '-hex[generate hex output]' \ '-generate[generate a prime number]' \ '-bits[how many bits to generate a prime]:num' \ '-safe[generates a safe prime]' \ $openssl_provider_options[@] \ '*::number:' } _openssl_rand() { _arguments \ '(- *)-help[print help message]' \ '-out[output file name]:file:_files' \ '-base64[perform base64 encoding on the output]' \ '-hex[show the output as a hex string]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '*:num' } _openssl_rehash() { _arguments \ '(- *)-help[print help message]' \ '-old[use old-tyle hashing for generating links]' \ '-n[do not remove existing links]' \ '-compat[generate links for both old-style(MD5) and new-style(SHA1) hashing]' \ '-v[print messages about old links removed and new links created]' \ $openssl_provider_options[@] \ '*::dir:_files -/' } _openssl_req() { local -a digests=($(openssl dgst -list | tail -n +2)) local -a digest_flags=() for digest in $digests[@] do digest_flags+=("($digests)${digest}[use ${digest:1} message digest algorithm]") done local -a cipher_flags=($(openssl enc -list | tail -n +2 )) local -a ciphers=() for flag in $cipher_flags[@] do ciphers+=("${flag:1}") done _arguments \ '(- *)-help[print help message]' \ '-inform[CSR input file format]:format:(DER PEM)' \ '-outform[output format]:format:(DER PEM)' \ '-cipher[cipher to use]:cipher:(($ciphers))' \ '-in[input file name]:file:_files' \ '-sigopt[options of the signature algorithm during sign operations]:options' \ '-vfyopt[options of the signature algorithm during verify operations]:options' \ '-passin[password source for private key and certificate input]:source:_openssl_pass_phrase_options' \ '-passout[password source for the output file]:source:_openssl_pass_phrase_options' \ '-out[output file name]:file:_files' \ '-text[print out the certificate request in text form]' \ '-subject[print out the certificate request subject]' \ '-pubkey[print out the public key]' \ '-noout[prevent output of the encoded version of the certificate request]' \ '-modules[print out the value of the modulus of the public key]' \ '-verify[verify the self-signed on the request]' \ '-new[generate a new certificate request]' \ '-newkey[generate a new private key]:arg' \ '-pkeyopt[option of public key algorithm]:option' \ '-key[private key file or URI]:file_or_uri:_files' \ '-keyform[format of the private key]:format:(DER PEM P12 ENGINE)' \ '-keyout[output private key file name]:file:_files' \ '-noenc[create private key it will not be encrypted]' \ $digest_flags[@] \ '-config[config file name]:file:_files' \ '-section[section name]:section' \ '-subj[subject name for new request or superseded the subject name]:subject' \ '-x509[output certificate instead of a certificate request]' \ '-x509v1[request generation of certificates with X.509 version 1]' \ '-CA["CA" certificate file or URI]:file_or_uri:_files' \ '-CAkey["CA" private key file or URI]:file_or_uri:_files' \ '-not_before[start date to be explicitly set]:date'\ '-not_after[expiry date to be explicitly set]:date'\ '-days[the number of days from today to certify the certificate for]:days' \ '-set_serial[serial number to use when outputting a self-signed certificate]:serial' \ '-copy_extensions[how X.509 extensions in certificate requests should be handled]:type:(none copy copyall)' \ '-extensions[specify certificate extension section (override value in config file)]:section' \ '-reqexts[specify request extension section (override value in config file)]:section ' \ '-addext[add a specific extension to the certificate]:ext' \ '-precert[add poison extension to the certificate]' \ '-utf8[interpret field values as UTF8 strings]' \ '-reqopt[options to customize the printing format]:option:_openssl_text_printing_options' \ '-newhdr[add the word NEW to the PEM file header and footer lines]' \ '-batch[non-interactive mode]' \ '-verbose[print extra details about the operations being performed]' \ '-quiet[print fewer details about the operations being performed]' \ '-keygen_engine[engine for key generation operations]:id' \ '-nameopt[how subject or issuer names are displayed]:option:_openssl_name_display_options' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } _openssl_rsa() { _arguments \ '(- *)-help[print help message]' \ '-inform[key input format]:format:(DER PEM P12 ENGINE)' \ '-outform[key output format]:format:(DER PEM)' \ '-traditional[use the traditional PKCS#1 format instead of PKCS#8 format]' \ '-in[input file or URI]:file_or_uri:_files' \ '-passin[input password source]:source:_openssl_pass_phrase_options' \ '-passout[output password source]:source:_openssl_pass_phrase_options' \ '-out[output file name]:file:_files' \ '-aes128[encrypt the private key with AES128]' \ '-aes192[encrypt the private key with AES192]' \ '-aes256[encrypt the private key with AES256]' \ '-aria128[encrypt the private key with ARIA128]' \ '-aria192[encrypt the private key with ARIA192]' \ '-aria256[encrypt the private key with ARIA256]' \ '-camellia128[encrypt the private key with CAMELLIA128]' \ '-camellia192[encrypt the private key with CAMELLIA192]' \ '-camellia256[encrypt the private key with CAMELLIA256]' \ '-des[encrypt the private key with DES]' \ '-des3[encrypt the private key with DES3]' \ '-idea[encrypt the private key with IDEA]' \ '-text[print out the various public or private key components in plain text]' \ '-noout[prevent output of the encoded version of the key]' \ '-module[print out the value of the modules of the key]'\ '-check[check the consistency of an RSA private key]' \ '-pubin[read public key instead of private key]' \ '-pubout[output public key instead of private key]' \ '-RSAPublicKey_in[read RSA public key instead of private key]' \ '-RSAPublicKey_out[output RSA public key instead of private key]' \ '-pvk-strong[enable "Strong" PVK encoding level(default)]' \ '-pvk-weak[enable "Weak" PVK encoding level]' \ '-pvk-none[do not enforce PVK encoding]' \ $openssl_provider_options[@] } _openssl_rsautl() { _arguments \ '(- *)-help[print help message]' \ '-in[input file name]:file:_files' \ '-passin[pass phrase option]:option:_openssl_pass_phrase_options' \ '-rev[reverse the order of the input]' \ '-out[output file name]:file:_files' \ '-inkey[input key file or URI]:file_or_uri:_files' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-pubin[read public key instead of private key]' \ '-certin[input is a certificate containing an RSA public key]' \ '-sign[sign the input data and output the signed result]' \ '-verify[verify the input data and output the recovered data]' \ '-encrypt[encrypt the input data using an RSA public key]' \ '-decrypt[decrypt the input data using an RSA private key]' \ '-pkcs[use PKCS#1 for padding]' \ '-oaep[use OAEP for padding]' \ '-x931[use ANSI X9.31 for padding]' \ '-raw[do not use padding]' \ '-hexdump[hex dump the output data]' \ '-asn1parse[parse the ASN.1 output data]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } _openssl_s_client() { local tls_start_protocols=(smtp pop3 imap ftp xmpp xmpp-server irc postgres mysql lmtp nntp sieve ldap) _arguments \ '(- *)-help[print help message]' \ '-ssl_config[section of the configuration file to configure the SSL_CTX object]:section' \ '-connect[host and optional port to connect to]:host_port' \ '-host[host to connect to]:host' \ '-port[port to connect to]:port' \ '-bind[host address and port to bind as the source for the connection]:host_port' \ '-proxy[proxy host and port]:host_port' \ '-proxy_user[proxy user for basic(base64) authenticate]' \ '-proxy_pass[proxy password source]:option:_openssl_pass_phrase_options' \ '-unix[connect over the specified Unix-domain socket]:path:_files' \ '(-4 -6)-4[use IPv4 only]' \ '(-4 -6)-6[use IPv6 only]' \ '-quic[connect using the QUIC protocol]' \ '-servername[set the TLS SNI extension in the ClientHello to the given value]:name' \ '-noservername[suppress sending of the SNI extension in the ClientHello message]' \ '-cert[client certificate path]:file:_files' \ '-certform[client certificate file format]:format:(DER PEM P12)' \ '-cert_chain[file or URI of untrusted certificates to build the certificate chain]:file_or_uri:_files' \ '-build_chain[whether the application build build the client certificate chain]' \ "-CRL[CRL file to use to check the server's certificate]" \ '-CRLform[CRL file format]:format:(DER PEM)' \ '-crl_download[download CRL from distribution points in the certificate]' \ '-key[client private key to use(file or URI)]:file_or_uri:_files' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-pass[private key and certificate file password source]:option:_openssl_pass_phrase_options' \ '-verify[verify depth]:depth' \ '-verify_return_error[returns verification error instead of continuing]' \ '-verify_quiet[limit verify output to only errors]' \ '-verifyCAfile[file in PEM format containing trusted certificates to verify]:file:_files' \ '-verifyCApath[directory containing trusted certificates to verify]:dir:_files -/' \ '-verifyCAstore[URI of a tstore containing trusted certificatesto verify]:uri:_urls' \ '-chainCAfile[file in PEM format containing certificates to build client certificate chain]:file:_files' \ '-chainCApath[directory containing trusted certificates for building client certificate chain]:dir:_files -/' \ '-chainCAstore[URI of a store containing trusted certificate to build client certificate chain]:uri:_urls' \ '-requestCAfile[file containing a list of certificates to be sent to the server]:file:_files' \ '-dane_tlsa_domain[enable DANE TLSA authentication and specify the TLSA base domain]:domain' \ '-dane_tlsa_rrdata[use one or more times to specify the RRDATA fields of the DANE TLSA RRset]:rrdata' \ '-dane_ee_no_namechecks[disable server name checks when authenticating via DANE-EE TLSA records]' \ '-reconnect[reconnect to the same server 5 time using the same sess_id ID]' \ '-showcerts[display the server certificate list as sent by the server]' \ '-prexit[print session information when the program exits]' \ '-no-interactive[run the client in a non-interactive mode]' \ '-state[print out the SSL session states]' \ '-debug[print extensive debugging information including a hex dump of all traffic]' \ '-nocommands[do not use interactive command letters]' \ '-adv[use advanced command mode]' \ '-security_debug[enable security debug messages]' \ '-security_debug_verbose[output more security debug output]' \ '-msg[show protocol messages]' \ '-timeout[enable send/receive timeout on DTLS connections]' \ '-mtu[set MTU of the link layer]:size' \ '-no_ems[disable Extended master secret negotiation]' \ '-keymatexport[export keying materials using the specified label]:label' \ '-keymatexportlen[export the specified number of bytes of keying material(default 20)]:len' \ '-trace[show verbose trace output of protocol messages]' \ '-msgfile[file to send output of -msg or -trace to]:file:_files' \ '-nbio_test[test nonblocking I/O]' \ '-nbio[turn on nonblocking I/O]' \ '-crlf[translate a line feed from the terminal into CF+LF]' \ '-ign_eof[inhibit shutting down the connection when end of file is reached in the input]' \ '-quiet[inhibit printing of session and certificate information]' \ '-no_ign_eof[shut down the connection when end of file is reached in the input]' \ '-psk_identity[PSK identity when using a PSK cipher suite]:identity' \ '-psk[PSK key when using a PSK cipher suite]:key' \ '-psk_session[use the pem encoded SSL_SESSION data stored in file as the basic of a PSK]:file:_files' \ '-sctp[use SCTP for the transport protocol instead of UDO in DTLS]' \ '-sctp_label_bug[use the incorrect behaviour of older OpenSSL implementations for DTLS/SCTP]' \ '-fallback_scsv[send TLS_FALLBACK_SCSV in the ClientHello]' \ '-async[switch on asynchronous mode]' \ '-maxfraglen[enable Maximum Fragment Length Negotiation]:len:(512 1024 2048 4096)' \ '-max_send_frag[maximum size of data fragment to send]:size' \ '-split_send_frag[size used to split data for encrypt pipelines]:size' \ '-max_pipelines[maximum number of encrypt/decrypt pipelines]:number' \ '-read_buf[default read buffer size for connections]:size' \ '-ignore_unexpected_eof[enable the peer does not need to send the close_notify alert]' \ '-no_tx_cert_comp[disable support for sending TLSv1.3 compressed certificates]' \ '-no_rx_cert_comp[disable support for receiving TLSv1.3 compressed certificate]' \ '-brief[only provide a brief summary of connections parameters]' \ '-starttls[send the protocol-specific message to switch to TLS for communication]:protocol:(($tls_start_protocols))' \ '-xmpphost[host for the "to" attribute of the stream element]:host' \ '-name[hostname information for various protocols]:hostname' \ '-tlsextdebug[print out a hex dump of any TLS extensions received from the server]' \ '-sess_out[output SSL session to file]:file:_files' \ '-sess_in[load SSL session from this file]:file:_files' \ '-serverinfo[list of comma-separated TLS Extension Types]:types' \ '-status[send a certificate status request to the server(OCSP stapling)]' \ '-alpn[enable Application-Layer Protocol Negotiation]:protocols' \ '-nextprotoneg[enable Next Protocol Negotiation extension]:protocols' \ '(-ct -noct)-ct[enable Certificate Transparency]' \ '(-ct -noct)-noct[disable Certificate Transparency]' \ '-ctlogfile[file containing a list of known Certificate Transparency]' \ '-keylogfile[keylog file for appending TLS secrets]:file:_files' \ '-early_data[file to read the content and attempt to send it as early data]:file:_files' \ '-enable_pha[send the Post-Handshake Authentication extension]' \ '-use_srtp[offer SRTP key management]:value' \ '-ktls[enable kernel TLS for sending and receiving]' \ '-tfo[enable creation of connections via TCP fast open]' \ $openssl_tls_flags[@] \ $openssl_dtls_flags[@] \ '-nameopt[how the subject or issuer names are displayed]:option:_openssl_name_display_options' \ $openssl_extended_verification_flags[@] \ $openssl_trusted_certificate_options[@] \ $openssl_supported_commands_flags[@] \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-ssl_client_engine[specified engine to be used for client certificate operations]:id' \ $openssl_verification_options[@] \ '-enable_server_rpk[enable support for receiving raw public keys from the server]' \ '-enable_client_rpk[enable support for sending raw public keys to the server]' \ '*::host_port' } _openssl_s_server() { _arguments \ '(- *)-help[print help message]' \ '-port[TCP port to listen on for connections(default: 4433)]:port' \ '-accept[optional TCP host and port to listen on for connections(default: *:4433)]:host_port' \ '-unix[Unix domain socket path]:path:_files' \ '(-4 -6)-4[use IPv4 only]' \ '(-4 -6)-6[use IPv6 only]' \ '-unlink[for -unix, unlink any existing socket first]' \ '-context[SSL context ID]:id' \ '(-verify -Verify)'{-verify,-Verify}'[verify depth]:depth' \ '-cert[certificate file]:file:_files' \ '-cert2[certificate file to use for servername(default: server2.pem)]:file:_files' \ '-certform[server certificate file format]:format:(DER PEM P12)' \ '-cert_chain[file or URI of untrusted certificates to build the certificate chain]:file_or_uri:_files' \ '-build_chain[application should build the server certificate chain]' \ '-serverinfo[file containing one or more blocks of PEM data]:file:_files' \ '-key[private key file or URI]:file_or_uri:_files' \ '-key2[private key file or URI to use for servername]:file_or_uri:_files' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-pass[private key and certificate file password source]:source:_openssl_pass_phrase_options' \ '-dcert[additional certificate file]:file:_files' \ '-dkey[additional private key file or URI]:file_or_uri:_files' \ '-dcert_chain[file or URI of untrusted certificates to build the server certificate chain]:file_or_uri:_files' \ '-dcertform[format of the additional certificate file]:format:(DER PEM P12)' \ '-dkeyform[format of the additional private key]:format:(DER PEM P12 ENGINE)' \ '-dpass[passphrase for the additional private key and certificate]:pass:_openssl_pass_phrase_options' \ '-nbio_test[test non blocking I/O]' \ '-crlf[translate a line feed from the terminal into CR+LF]' \ '-debug[print extensive debugging information including a hex dump of all traffic]' \ '-security_debug[print output from SSL/TLS security framework]' \ '-security_debug_verbose[print more output from SSL/TLS security framework]' \ '-msg[show all protocol messages with hex dump]' \ '-msgfile[file to send output of -msg or -trace to]:file:_files' \ '-state[print the SSL session states]' \ '-CRL[CRL file]:file:_files' \ '-CRLform[CRL file format]:format:(DER PEM)' \ '-crl_download[download CRLs from distribution points]' \ '-verifyCAfile[file in PEM format CA containing trusted certificates to verify client certificates]:file:_files' \ '-verifyCApath[directory containing trusted certificates to verify client certificates]:dir:_files -/' \ '-verifyCAstore[URI of a store containing trusted certificates to verify client certificates]:uri:_urls' \ '-chainCAfile[file in PEM format containing trusted certificates to build the server certificate chain]:file:_files' \ '-chainCApath[directory containing trusted certificates for building server certificate chain]:dir:_files -/' \ '-chainCAstore[URI of a store containing trusted certificates for building server certificate chain]:uri:_urls' \ '-nocert[no certificate is used]' \ '-quiet[inhibit printing of session and certificate information]' \ '-no_resume_ephemeral[disable caching and tickets if ephemeral (EC)DH is used]' \ '-tlsextdebug[print a hex dump of any TLS extensions received from the server]' \ '-www[send a status message back to the client when it connects]' \ '(-WWW -HTTP)'{-WWW,-HTTP}'[emulate a simple web server]' \ '-http_server_binmode[acting as web-server open files in binary mode]' \ '-no_ca_names[disable TLS Extension CA Names]' \ '-ignore_unexpected_eof[peer does not need to send the close_notify alert]' \ '-servername[servername for HostName TLS extension]' \ '-servername_fatal[send fatal alert on servername mismatch]' \ '-id_prefix[generate SSL/TLS session IDs prefixed by this ID]:id' \ '-keymatexport[export keying material using label]:label' \ '-keymatexportlen[export the given number of bytes of keying material(default: 20)]:length' \ '-no_cache[disable session cache]' \ '-ext_cache[disable internal cache]' \ '-verify_return_error[close the connection when verification errors occur]' \ '-verify_quiet[no verify output except verify errors]' \ '(-no_ign_eof -ign_eof)-ign_eof[ignore input EOF]' \ '(-no_ign_eof -ign_eof)-no_ign_eof[do not ignore input EOF]' \ '-no_ems[disable Extended master secret negotiation]' \ '-status[enable certificate status request support]' \ '-status_verbose[enable certificate status request support and verbose output of OCSP response]' \ '-status_timeout[set the timeout for OCSP reponse to the given seconds]:seconds' \ '-proxy[HTTP(S) proxy server]:proxy' \ '-no_proxy[list of IP addresses and/or DNS names not to use an HTTP(S) proxy for]:addresses' \ '-status_url[set a fallback responder URL]:url:_urls' \ '-status_file[status file]:file:_files' \ '-ssl_config[configure SSL_CTX using the given configure value]:config' \ '-trace[show verbose trace output of protocol messages]' \ '-brief[provide a brief summary of connection parameters]' \ '-rev[simple echo server that sends back received text reserved]' \ '-async[switch on asynchronous mode]' \ '-max_send_frag[maximum size of data fragment to send]:size' \ '-split_send_frag[size used to split data for encrypt pipelines]:size' \ '-max_pipelines[maximum number of encrypt/decrypt pipelines]:number' \ '-naccept[server will exit after receiving the specified number of connections(default: unlimited)]:number' \ '-read_buf[default read buffer size for connections]:size' \ '-no_tx_cert_comp[disable support for sending TLSv1.3 compressed certificates]' \ '-no_rx_cert_comp[disable support for receiving TLSv1.3 compressed certificates]' \ '-no_comp[disable negotiation of TLS compression]' \ '-num_tickets[control the number of tickets that will be sent to the client after a full handshake in TLSv1.3]' \ '-dhparam[DH parameter file to use]:file:_files' \ '-nbio[turn on non blocking I/O]' \ '-timeout[enable timeout]' \ '-mtu[set link-layer MTU]:size' \ '-psk_identity[PSK identify when using a PSK cipher suite]:id' \ '-psk_hint[PSK identity hint when using a PSK cipher suite]:hint' \ '-psk[PSK key when using a PSK cipher suite]:key' \ '-psk_session[file contains pem encoded SSL_SESSION data]:file:_files' \ '-srpvfile[verifier file for SRP]:file:_files' \ '-listen[listen on a UDP port for incoming connections]' \ '-sctp[use SCTP for the transport protocol instead of UDP in DTLS]' \ '-sctp_label_bug[allow communication with older broken implementations]' \ '-use_srtp[offer SRTP key management with a colon-separated profile list]:list' \ '-no_dhe[no DH parameters will be loaded]' \ '-alpn[enable the Application-Layer Protocol Negotiation extension]:protocol' \ '-nextprotoneg[enable the Next Protocol Negotiation extension]:protocol' \ '-ktls[enable kernel TLS for sending and receiving]' \ '-sendfile[SSL_sendfile will be used instead of BIO_write to send response]' \ '-zerocopy_sendfile[SSL_sendfile will use the zerocopy TX mode]' \ '-keylogfile[append TLS secrets to the specified keylog file]:file:_files' \ '-max_early_data[change the default maximum early data bytes for new sessions and incoming early data]:size' \ '-recv_max_early_data[hard limit on the maximum number of early data bytes that will be accepted]:bytes' \ '-early_data[accept early data where possible]' \ '-stateless[require TLSv1.3 cookies]' \ '(-anti_replay -no_anti_replay)-anti_replay[switch replay protection on]' \ '(-anti_replay -no_anti_replay)-no_anti_replay[switch replay protection off]' \ '-tfo[enable acceptance of TCP fast Open connections]' \ '-cert_comp[pre-compresses certificates that will be sent during the handshake]' \ '-nameopt[how the subject or issuer names are displayed]:how:_openssl_name_display_options' \ $openssl_tls_flags[@] \ $openssl_dtls_flags[@] \ $openssl_supported_commands_flags[@] \ $openssl_extended_verification_flags[@] \ $openssl_trusted_certificate_options[@] \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ $openssl_verification_options[@] \ '-enable_server_rpk[enable support for sending raw public keys to the client]' \ '-enable_client_rpk[enable support for receiving raw public keys from the client]' } _openssl_s_time() { _arguments \ '(- *)-help[print help message]' \ '-connect[host and optional port to connect to]:host_port' \ '-www[page to GET from the server. "/" gets the index.html page]:page' \ '-cert[certificate to use]:certificate' \ '-key[private key to use]:key:_files' \ '-verify[verify depth to use]:depth' \ '-new[performs the timing test using a new session ID for each connection]' \ '-reuse[performs the timing test using the same session ID]' \ '-bugs[enable various workaround for known SSL and TLS implementations]' \ '-cipher[allow TLSv1.2 and cipher list sent by the client to be modified]:ciperlist:_openssl_list_ciphers' \ '-ciphersuites[allow the TLSv1.3 ciphersuites sent by the client to be modified]:val' \ '-time[specify how long seconds this command should establish connections]:seconds' \ '-nameopt[specify how the subject or issuer names are displayed]:option:_openssl_nameopts' \ $openssl_trusted_certificate_options[@] \ $openssl_provider_options[@] \ $openssl_tls_flags[@] } _openssl_sess_id() { _arguments \ '(- *)-help[print help message]' \ '-context[set the session ID context]:id' \ '-in[input file(default stdin)]:file:_files' \ '-inform[input format(default PEM)]:format:(DER PEM)' \ '-out[output file(default stdout)]:file:_files' \ '-outform[output format(default PEM)]:format:(PEM DER NSS)' \ '-text[print ssl session id details]' \ '-cert[output certificate]' \ '-noout[do not output the encoded session info]' } _openssl_smime() { local -a ciphers=($(openssl enc -list | tail -n +2 )) local -a cipher_flags=() for cipher in $ciphers[@] do cipher_flags+=("($ciphers)${cipher}[use ${cipher:1}]") done _arguments \ '(- *)-help[print help message]' \ '-encrypt[encrypt message]' \ '-decrypt[decrypt message]' \ '-sign[sign message using the supplied certificate and private key]' \ '-resign[resign a message]' \ '-verify[verify signed message]' \ '-pk7out[write out a PEM encoded PKCS#7 structure]' \ '-in[input message file]:file:_files' \ '-out[output file name]:file:_files' \ '-inform[input format]:format:(DER PEM SMIME)' \ '-outform[output format]:format:(DER PEM SMIME)' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '(-stream -indef)'{-stream,-indef}'[enable streaming I/O for encoding operations]' \ '-noindef[disable streaming I/O]' \ '-content[file containing the detached content]:file:_files' \ '-text[add plain text MIME headers to the supplied message]' \ '-md[digest algorithm to use when signing or resigning]:digest:(sha256 sha1 md5)' \ $cipher_flags[@] \ '-nointern[use only the certificate in the -certificate]' \ '-noverify[do not verify the signers certificate of a signed message]' \ '-nochain[do not do chain verifier of signers certificates]' \ '-nosigs[do not try to verify the signatures on the message]' \ '-nocerts[reduce the size of the signed message]' \ '-noattr[do not include attributes in the mssage]' \ '-nodetach[use opaque signing]' \ '-nosmimecap[do not include the SMIMECapabilities attribute]' \ '-binary[do not convert message to "canonical" format]' \ '-crlfeol[use CRLF instead of LF as end of line in output file]' \ '-certfile[additional certificate file]:file:_files' \ '*-signer[signing certificate]:file:_files' \ '-recip[recipients certificate when decrypting a message]:file:_files' \ '-inkey[private key file or URI for signing or decrypting]:file_or_uri:_files' \ '-passin[private key password source]:source:_openssl_pass_phrase_options' \ '-to["To" mail header]:addr' \ '-from["From" mail header]:addr' \ '-subject["Subject" mail header]:subject' \ $openssl_verification_options[@] \ $openssl_trusted_certificate_options[@]\ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-config[config file]:file:_files' \ '*::recip_rert:_files' } _openssl_speed() { # NOTE extract algorithms from speed.c and check if 'openssl speed -seconds 1 $alg' succeed local -a speed_algorithms=( md2 mdc2 md4 md5 hmac sha1 sha256 sha512 whirlpool ripemd rmd160 ripemd160 rc4 des-cbc des-ede3 aes-128-cbc aes-192-cbc aes-256-cbc camellia-128-cbc camellia-192-cbc camellia-256-cbc rc2-cbc rc2 rc5-cbc rc5 idea-cbc idea seed-cbc seed bf-cbc blowfish bf cast-cbc cast cast5 ghash rand kmac128 kmac256 dsa1024 dsa2048 rsa512 rsa1024 rsa2048 rsa3072 rsa4096 rsa7680 rsa15360 ffdh2048 ffdh3072 ffdh4096 ffdh6144 ffdh8192 ecdsap160 ecdsap192 ecdsap224 ecdsap256 ecdsap384 ecdsap521 ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571 ecdsab163 ecdsab233 ecdsab283 ecdsab409 ecdsab571 ecdsabrp256r1 ecdsabrp256t1 ecdsabrp384r1 ecdsabrp384t1 ecdsabrp512r1 ecdsabrp512t1 ecdhp160 ecdhp192 ecdhp224 ecdhp256 ecdhp384 ecdhp521 ecdhk163 ecdhk233 ecdhk283 ecdhk409 ecdhk571 ecdhb163 ecdhb233 ecdhb283 ecdhb409 ecdhb571 ecdhbrp256r1 ecdhbrp256t1 ecdhbrp384r1 ecdhbrp384t1 ecdhbrp512r1 ecdhbrp512t1 ecdhx25519 ecdhx448 curveSM2 ) _arguments \ '(- *)-help[print help message]' \ '-config[configuration file]:file:_files' \ '-elapsed[use wall-clock time instead of CPU user time as divisor]' \ '-evp[use specified cipher or message digest algorithm via the EVP interface]:alg: _alternative "ciphers\:cipher\:_openssl_cipher_algorithms" "digests\:digest\:_openssl_digests"' \ '-multi[run multiple operations in parallel]:number' \ '-async_jobs[enable async mode and start specified number of jobs]:number' \ '-misalign[misalign the buffers by the specified number of bytes]:number' \ '-hmac[time the HMAC algorithm using the given message digest]:digest:_openssl_digests' \ '-cmac[time the CMAC algorithm using the given cipher]:cipher:_openssl_cipher_algorithms' \ '-decrypt[time the decryption instead of encryption]' \ '-mb[enable multi-block mode on EVP-named cipher]' \ '-aead[benchmark EVP-named AEAD cipher in TLS-like sequence]' \ '-kem-algorithms[benchmark KEM algorithms]' \ '-signature-algorithms[benchmark signature algorithms]' \ '-primes[generate n prime RSA key and use it to run the benchmarks]:number' \ '-seconds[run benchmarks for the given seconds]:number' \ '-bytes[run benchmarks on num-byte buffers]:bytes' \ '-mr[produce the summary in a machine-readable format]' \ '-mlock[lock memory into RAM for more determining measurements]' \ '-testmode[run the speed command in testmode]' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '*::alg:(($speed_algorithms))' } _openssl_spkac() { _arguments \ '(- *)-help[print help message]' \ '-in[input file name]:file:_files' \ '-out[output file name]:file:_files' \ '-digest[digest to sign a created SPKAC file]:digest:_openssl_digests' \ '-key[private key file or URI to create an SPKAC file]:file_or_uri:_files' \ '-keyform[key format]:format:(DER PEM P12 ENGINE)' \ '-passin[input file password source]:option:_openssl_pass_phrase_options' \ '-challenge[challenge string]:string' \ '-spkac[alternative name form the variable containing the SPKAC(default "SPKAC")]:name' \ '-spksect[allow an alternative name form the section containing the SPKAC]:section' \ '-noout[do not output the text version of the SPKAC]' \ '-pubkey[output the public key of an SPKAC]' \ '-verify[verify the digital signature on the supplied SPKAC]' \ $openssl_provider_options[@] } _openssl_srp() { _arguments \ '(- *)-help[print help message]' \ '-verbose[generate verbose output while processing]' \ '(-add -modify -delete -list)-add[add a user and SRP verifier]' \ '(-add -modify -delete -list)-modify[modify the SRP verifier of an existing user]' \ '(-add -modify -delete -list)-delete[delete user from verifier file]' \ '(- *)-list[list users]' \ '-name[particular SRP definition to use]:name' \ '-srpvfile[srp verifier file name]:file:_files' \ '-gn[specify the "g" and "N" value]:g_and_N' \ '-userinfo[additional information to add when adding or modifying a user]:info' \ '-passin[password source for input file]:option:_openssl_pass_phrase_options' \ '-passout[password source for output file]:option:_openssl_pass_phrase_options' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] \ '-config[config file]:file:_files' \ '*::user' } _openssl_storeutl() { _arguments \ '(- *)-help[print help message]' \ '-out[output file name]:file:_files' \ '-noout[prevent output of the PEM data]' \ '-passin[key password source]:option:_openssl_pass_phrase_options' \ '-text[print out the objects in text form]' \ '-r[fetch objects recursively when possible]'\ '-certs[only select the certificates from the given URI]' \ '-keys[only select the keys from the given URI]' \ '-crls[only select the CRLs from the given URI]' \ '-subject[search for an object having the subject name arg]:arg' \ '-issuer[search for an object having the given issuer name]:name' \ '-serial[search for an object having the given serial number]:serial_number' \ '-alias[search for an object having the given alias]:alias' \ '-fingerprint[search for an object having the given fingerprint]:fingerprint' \ '-digest[digest that was used to compute the fingerprint given with -fingerprint]' \ $openssl_provider_options[@] \ '*:uri:_urls' } _openssl_ts() { if [[ CURRENT -eq 2 ]]; then _arguments \ '(- *)-help[print help message]' \ '-query[generate a TS query]' \ '-reply[generate a TS reply]' \ '-verify[verify a TS response]' else local -a digests=($(openssl dgst -list | tail -n +2)) local -a digest_flags=() for digest in $digests[@] do digest_flags+=("${digest}[use ${digest:1} message digest algorithm]") done case $words[2] in (-query) _arguments \ '-config[configuration file]:file:_files' \ '-data[data file for creating timestamp request]:file:_files' \ '-digest[message imprint in a hexadecimal format]:digest' \ $digest_flags[@] \ '-tspolicy[policy that the client expects the TSA for creating the timestamp token]:oid' \ '-no_nonce[no nonce instead of 64bit long pseudo-random nonce]' \ '-cert[TSA is expected to include its signing certificates in the response]' \ '-in[previously created timestamp request]:file:_files' \ '-out[output file name]:file:_files' \ '-text[output human-readable text format instead of DER]' \ $openssl_random_state_options[@] ;; (-reply) _arguments \ '-config[configuration file]:file:_files' \ '-section[name of the config file section for the response generation]:section' \ '-queryfile[file containing a DER encoded timestamp request]:file:_files' \ '-passin[password source for the private key of the TSA]:source:_openssl_pass_phrase_options' \ '-signer[signer certificate of the TSA in PEM format]:file:_files' \ '-inkey[signer private key file or URI of the TSA in PEM format]:file_or_uri:_files' \ $digest_flags[@] \ '-chain[certificate chain]:file:_files' \ '-tspolicy[policy to use for the response]:oid' \ '-in[previously created timestamp response or timestamp token]:file:_files' \ '-token_in[input is a DER encoded timestamp token instead of a timestamp response]' \ '-out[output file name to write the response]:file:_files' \ '-token_out[output is a timestamp token instead of timestamp response]' \ '-text[output human-readable text format instead of DER]' \ $openssl_provider_options[@] ;; (-verify) _arguments \ '-data[file to hash to be verified against response or token]:file_to_hash:_files' \ '-digest[message digest to be verified against reponse or token]:bytes' \ '-queryfile[original timestamp request file in DER format]:file:_files' \ '-in[timestamp response file in DER format]:file:_files' \ '-token_in[input is a DER encoded timestamp token instead of a timestamp response]' \ '-untrusted[set of additional untrusted certificates files or URIs]:file_or_uri:_files' \ $openssl_trusted_certificate_options[@] \ $openssl_verification_options[@] ;; esac fi } _openssl_verify() { _arguments -S \ '(- *)-help[print help message]' \ '-CRLfile[file or URL should contains one or more CRLs in PEM or DER format]:file_or_uri:_files' \ '-crl_download[attempt to download CRL information for certificates via their CDP entries]' \ '-show_chain[display information about the certificate chain that has been built]' \ '-verbose[print extra information about the operations being performed]' \ '-trusted[file or URI of trusted certificates]:file_or_uri:_files' \ '-untrusted[file or URI of untrusted certificates to use for chain building]:file_or_uri:_files' \ '-vfyopt[pass options to the signature algorithms during verify operations]:options' \ '-nameopt[specify how the subject or issuer names are displayed]:nameopt:_openssl_nameopts' \ $openssl_trusted_certificate_options[@] \ $openssl_verification_options[@] \ $openssl_provider_options[@] \ '*::certificate:_files' } _openssl_version() { _arguments \ '(- *)-help[print help message]' \ '-a[all information]' \ '-v[current OpenSSL version]' \ '-b[date the current version of OpenSSL was built]' \ '-o[option information, options set when the library was built]' \ '-f[compilation flags]' \ '-p[platform setting]' \ '-d[OPENSSLDIR setting]' \ '-e[ENGINESDIR settings]' \ '-m[MODULESDIR settings]' \ '-r[random number generator source settings]' \ '-c[OpenSSL CPU settings info]' \ '-w[OPENSSL OSSL_WINCTX build time variable]' } _openssl_x509() { local -a digests=($(openssl dgst -list | tail -n +2)) local -a digest_flags=() for digest in $digests[@] do digest_flags+=("${digest}[use ${digest:1} message digest algorithm]") done _arguments \ '(- *)-help[print help message]' \ '(-in -new)-in[input file or URI for reading a certificate request]:file_or_uri:_files' \ '-passin[key and certificate file password source]:source:_openssl_pass_phrase_options' \ '(-in -new)-new[generate a certificate from scratch]' \ '-x509toreq[output a PKCS#10 certificate request]' \ '-req[expect a PKCS#10 certificate request]' \ '-copy_extensions[how to handle X.509 extensions when converting from a certificate to a request]:how:(none copy copyall)' \ '-inform[input file format]:format:(DER PEM)' \ '-vfyopt[options of the signature algorithm during verify operations]:option' \ '(-key -signkey)'{-key,-signkey}'[private key file or URI for a new certificate or certificate request]:file_or_uri:_files' \ '-keyform[key input format]:format:(DER PEM P12 ENGINE)' \ '-out[output file name]:file:_files' \ '-outform[output format]:format:(DER PEM)' \ '-nocert[do not output a certificate]' \ '-noout[prevent output except for printing as requested]' \ '-dataopt[data output format(default: rfc_822)]:format:(rfc_822 iso_8601)' \ '-text[print out the certificate in text form]' \ '-certopt[option to customize the print format used with -text]:option:_openssl_text_printing_options' \ '-fingerprint[calculate and print the digest of the DER encoded version of the entire certificate]' \ '-alias[print the certificate "alias"(nickname) if any]' \ '-serial[print the certificate serial number]' \ '-startdate[print out the start date of the certificate]' \ '-enddate[print out the expiry date of the certificate]' \ '-dates[print out the start and expiry dates of a certificate]' \ '-subject[print the subject name]' \ '-issuer[print the issuer name]' \ '-nameopt[how the subject or issuer names are displayed]:option:_openssl_nameopts' \ '-email[print the email address(es) if any]' \ '(-hash -subject_hash)'{-hash,-subject_hash}'[print the "hash" of the certificate subject name]' \ '-subject_hash_old[print the "hash" of the certificate subject name using the older algorithm]' \ '-issuer_hash[print the "hash" of the certificate issuer name]' \ '-issuer_hash_old[print the "hash" of the certificate issuer name using the older algorithm]' \ '-ext[print out the certificate extensions in text form]:extensions:_openssl_certificate_extensions' \ '-ocspid[print the OCSP hash values for the subject name and public key]' \ '-ocsp_uri[print the OCSP responder address(es) if any]' \ '-purpose[perform tests on the certificate extensions and output the result]' \ "-pubkey[print the certificate's SubjectPublicKeyInfo block in PEM format]" \ '-modulus[print out the value of the modulus of the public key contained in the certificate]' \ '-checkend[check if the certificate expires within the given seconds]:seconds' \ '-checkhost[check that the certificate matches the specified host]:host' \ '-checkemail[check that the certificate matches the specified email address]:email' \ '-checkip[check that the certificate matches the specified IP address]:ip' \ '-set_serial[serial number to use]:serial_number' \ '-next_serial[serial to be one more than the number in the certificate]' \ '-not_before[start date to be explicitly set]:date' \ '-not_after[expiry date to be explicitly set]:date' \ '-days[the number of days from today until a newly generated certificate expires]:days' \ '-preserve_dates[preserve "notBefore" and "notAfter" dates of any input certificate]' \ '-set_issuer[issuer name for certicate created]:issuer' \ '(-set_subject -subj)'{-set_subject,-subj}'[subject name for certicate created]:subject' \ '-force_pubkey[public key file to be set in certicate created]:file:_files' \ '-clrext[prevents taking over any extensions from the source]' \ '-extfile[configuration file containing certificate and request X.509 extensions to add]:file:_files' \ '-extensions[section in the extfile to add X.509 extensions form]:section' \ '-sigopt[options to the signature algorithm during sign operations]:options' \ '-badsig[currupt the signature before writing it]' \ $digest_flags[@] \ '-CA["CA" certificate file or URI]:file_or_uri:_files' \ '-CAform[format for the CA certificate]:format:(DER PEM P12)' \ '-CAkey[CA private key file or URI to sign a certificate with]:file_or_uri:_files' \ '-CAkeyform[format for the CA key]:format:(DER PEM P12 ENGINE)' \ '-CAserial[CA serial number file to use]:file:_files' \ '-CAcreateserial[create CA serial number file if it does not exist]' \ '-trustout[mark any certificate PEM output as certificate rather than ordinary]' \ '-setalias[set the "alias" of the certificate]:alias' \ '-clrtrust[clear all the permitted or trusted uses of the certificate]' \ '-addtrust[add a trusted certificate use]:name:(clientAuth serverAuth emailProtection anyExtendedKeyUsage)' \ '-clrreject[clear all the prohibited or rejected use of the certificate]' \ '-addreject[add a prohibited trust anchor purpose]:arg:(clientAuth serverAuth emailProtection anyExtendedKeyUsage)' \ $openssl_random_state_options[@] \ $openssl_provider_options[@] } # # Utilities # _openssl_certificate_extensions() { # See x509v3_config document local -a extensions=( basicConstraints keyUsage extendedKeyUsage subjectKeyIdentifier authorityKeyIdentifier subjectAltName issuerAltName authorityInfoAccess crlDistributionPoints issuingDistributionPoint certificatePolicies policyConstraints inhibitAnyPolicy nameConstraints noCheck tlsfeature ) _values -s , extensions $extensions } _openssl_digests() { # openssl list -digest-commands is deprecated, use another command instead local -a digest_flags=($(openssl dgst -list | tail -n +2)) local -a digests=() for flag in $digest_flags[@] do digests+=(${flag:1}) done _values 'digests' ${digests} } _openssl_cipher_algorithms() { local -a encrypt_flags=($(openssl enc -list | tail -n +2)) local -a encrypts=() for flag in $encrypt_flags[@] do encrypts+=(${flag:1}) done _values 'encrypts' ${encrypts} } _openssl_groups() { local -a groups=(P-256 P-384 P-521 X25519 X448 ffdhe2048 ffdhe3072 ffdhe4096 ffdhe6144 ffdhe8192) _values -s ':' groups $groups } _openssl_list_ciphers() { # openssl ciphers local ciphers # add cipher suites ciphers=(${(@s/:/)"$(_call_program ciphers openssl ciphers)"}) # add static cipher strings ciphers=(${ciphers} \ 'DEFAULT[the default cipher list]' \ 'COMPLEMENTOFDEFAULT[the ciphers included in ALL but not enabled by default]' \ 'ALL[all cipher suites except the eNULL ciphers]' \ 'COMPLEMENTOFALL[the cipher suites not enabled by ALL]' \ 'HIGH["high" encryption cipher suites]' \ 'MEDIUM["medium" encryption cipher suites]' \ 'LOW["low" encryption cipher suites]' \ {EXP,EXPORT}'[export encryption algorithms]' \ 'EXPORT40[40 bit export encryption algorithms]' \ 'EXPORT56[56 bit export encryption algorithms]' \ {eNULL,NULL}'[ciphers offering no encryption]' \ 'aNULL[ciphers offering no authentication]' \ {kRSA,RSA}'[cipher suites using RSA key exchange]' \ 'kDHr[cipher suites using DH key agreement signed by CAs with RSA keys]' \ 'kDHd[cipher suites using DH key agreement signed by CAs with DSS keys]' \ 'kDH[cipher suites using DH key agreement]' \ {kDHE,kEDH}'[cipher suites using ephemeral DH key agreement, including anonymous cipher suites]' \ {DHE,EDH}'[cipher suites using authenticated ephemeral DH key agreement]' \ 'ADH[anonymous DH cipher suites, not including anonymous ECDH ciphers]' \ 'DH[cipher suites using DH, including anonymous DH, ephemeral DH and fixed DH]' \ 'kECDHr[cipher suites using fixed ECDH key agreement signed by CAs with RSA keys]' \ 'kECDHe[cipher suites using fixed ECDH key agreement signed by CAs with ECDSA keys]' \ 'kECDH[cipher suites using fixed ECDH key agreement]' \ {kECDHE,kEECDH}'[cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites]' \ {ECDHE,kEECDH}'[cipher suites using authenticated ephemeral ECDH key agreement]' \ 'AECDH[anonymous Elliptic Curve Diffie Hellman cipher suites]' \ 'ECDH[cipher suites using ECDH key exchange, including anonymous, ephemeral and fixed ECDH]' \ 'aRSA[cipher suites using RSA authentication]' \ {aDSS,DSS}'[cipher suites using DSS authentication]' \ 'aDH[cipher suites effectively using DH authentication]' \ 'aECDH[cipher suites effectively using ECDH authentication]' \ {aECDSA,ECDSA}'[cipher suites using ECDSA authentication]' \ 'TLSv1.2[TLSv1.2 cipher suites]' \ 'TLSv1[TLSv1.0 cipher suites]' \ 'SSLv3[SSLv3.0 cipher suites]' \ 'SSLv2[SSLv2.0 cipher suites]' \ 'AES128[cipher suites using 128 bit AES]' \ 'AES256[cipher suites using 256 bit AES]' \ 'AES[cipher suites using AES]' \ 'AESGCM[AES in Galois Counter Mode (GCM)]' \ 'CAMELLIA128[cipher suites using 128 bit CAMELLIA]' \ 'CAMELLIA256[cipher suites using 256 bit CAMELLIA]' \ 'CAMELLIA[cipher suites using CAMELLIA]' \ '3DES[cipher suites using triple DES]' \ 'DES[cipher suites using DES (not triple DES)]' \ 'RC4[cipher suites using RC4]' \ 'RC2[cipher suites using RC2]' \ 'IDEA[cipher suites using IDEA]' \ 'SEED[cipher suites using SEED]' \ 'MD5[cipher suites using MD5]' \ {SHA1,SHA}'[cipher suites using SHA1]' \ 'SHA256[cipher suites using SHA256]' \ 'SHA384[cipher suites using SHA284]' \ 'aGOST[cipher suites using GOST R 34.10 for authentication]' \ 'aGOST01[cipher suites using GOST R 34.10-2001 authentication]' \ 'aGOST94[cipher suites using GOST R 34.10-94 authentication]' \ 'kGOST[cipher suites, using VKO 34.10 key exchange]' \ 'GOST94[cipher suites, using HMAC based on GOST R 34.11-94]' \ 'GOST89MAC[cipher suites using GOST 28147-89 MAC instead of HMAC]' \ 'PSK[cipher suites using pre-shared keys (PSK)]' \ 'SUITEB128[suite B mode operation using 128 or 192 bit level of security]' \ 'SUITEB128ONLY[suite B mode operation using 128 bit level of security]' \ 'SUITEB192[suite B mode operation using 192 bit level of security]' \ ) # FIXME: support !, + and - before each cipher suite _values -s : 'cipher suite' ${ciphers} } _openssl_mac_algorithms() { # openssl list -mac-algorithms local algorithms=( BLAKE2BMAC BLAKE2SMAC CMAC HMAC KMAC128 KMAC256 SIPHASH POLY1305 ) _values algorithms $algorithms } _openssl_macopts() { local -a options=( 'key\:[MAC key as an alphanumeric string]' 'hexkey\:[MAC key in hexadecimal form]' 'iv\:[IV as an alphanumeric string to be used by GMAC]' 'hexiv\:[IV in hexadecimal form to be used by GMAC]' 'size\:[output length to be used by KMAC128 or KMAC256]' 'custom\:[customization string to be used by KMAC128 or KMAC256]' 'digest\:[digest]' 'cipher\:[cipher]' ) _values 'options' ${options} } _openssl_name_display_options() { local -a options=( 'compat:display the name using an old format from previous OpenSSL versions' 'RFC2253:display the name using the format defined in RFC 2253' 'oneline:display the name in one line more readable RFC 2253' 'multiline:display the name using multiple lines' 'esc_2253:escape the "special" characters in a field, as required by RFC 2253' 'esc_2254:escape the "special" characters in a field as required by RFC 2254 in a field' 'esc_ctrl:escape non-printable ASCII characters' 'esc_msb:escape any characters with the most significant bit set' 'use_quote:escapes some characters by surrounding the entire string with quotation marks' 'utf8:convert all strings to UTF-8 format first as required by RFC 2253' 'ignore_type:not attempt to interpret multibyte characters in any way' 'show_type:display the type of the ASN1 character string before the value' 'dump_der:output in hex format are displayed using the DER encoding of the field' 'dump_nostr:dump non-character strings, such as ASN.1 OCTET STRING' 'dump_all:dump all fields' 'dump_unknown:dump any field whose OID is not recognised by OpenSSL' 'sep_comma_plus:set comma as a separator' 'sep_comma_plus_space:set comma as a separator and put space after the separator' 'sep_semi_plus_space:set semi-colon as a separator and put space after the separator' 'sep_multiline:start each field on its own line' 'dn_rev:reverse the fields of the DN as required by RFC 2253' 'nofname:does not display the field at all' 'sname:use short name form' 'lname:use long name form' 'oid:represent the OID in numerical form' 'align:align field values' 'space_eq:place spaces round the equal sign' ) _values 'options' ${options} } _openssl_pass_phrase_options() { local -a options=( 'pass[actual password]:password' 'env[obtain password from the environment variable]:var:_parameters -g "*export*"' 'file[read the password from the file]:file:_files' 'fd[read the password from the file descriptor number]:number' 'stdin[read the password from standard input]' ) _values -S : 'options' ${options} } _openssl_signature_algorithms() { local -a algorithms=( RSA DSA ECDSA SHA1 SHA224 SHA224 SHA384 SHA512 ecdsa_secp256r1_sha256 ed25519 rsa_pss_pss_sha256 ) _values -s ':' algorithms $algorithms } _openssl_text_printing_options() { local -a options=( 'compatible[use the old format]' 'no_header[do not print header information]' 'no_version[do not print out the version number]' 'no_serial[do not print the serial number]' 'no_signame[do not print out the signature algorithm used]' 'no_validity[do not print the validity]' 'no_subject[do not print out the subject name]' 'no_issuer[do not print out the issuer name]' 'no_pubkey[do not print out the public key]' 'no_sigdump[do not give a hexadecimal dump of the certificate signature]' 'no_aux[do not print out certificate trust information]' 'no_extensions[do not print out any X509V3 extensions]' 'ext_default[retain default extension behavior]' 'ext_error[print an error message for unsupported certificate extensions]' 'ext_parse[ASN1 parse unsupported extensions]' 'ext_dump[Hex dump unsupported extensions]' 'ca_default[equivalent to no_issuer, no_pubkey, no_header and no_version]' ) _values -s , options $options } _openssl_tls_protocols() { local -a protocols=(SSLv3 TLSv1 TLSv1.1 TLSv1.2 TLSv1.3 DTLSv1 DTLSv1.2 None) _values protocols $protocols } _openssl "$@" # 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 ================================================ FILE: src/_openvpn3 ================================================ #compdef openvpn3 # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 openvpn 3 (https://github.com/openvpn/openvpn3) (https://openvpn.net/openvpn-client-for-linux/). # version: 13_beta-1 (Jul 1 2021) # openvpn 3/Linux git:makepkg:2031975261858750 (openvpn3) # openvpn core 3.git:HEAD:ce0c9963 linux x86_64 64-bit # # ------------------------------------------------------------------------------ # Author # ------- # # * undg (https://github.com/undg) # # ------------------------------------------------------------------------------ local sessions_configs_names=$(openvpn3 sessions-list | grep 'Config name:' | awk '{print $3}' | xargs) local sessions_paths=$(openvpn3 sessions-list | grep 'Path:' | awk '{print $2}' | xargs) local sessions_interfaces=$(openvpn3 sessions-list | grep 'Device:' | awk '{print $4}' | xargs) local sessions_users=$(openvpn3 sessions-list | grep 'Owner:' | awk '{print $2}' | xargs) local sessions_names=$(openvpn3 sessions-list | grep 'Session name:' | awk '{print $2}' | xargs) local configs_names=$(openvpn3 configs-list | awk 'count&&!--count; /\/net\/openvpn\//{count=2}' | awk '{print $1}' | xargs) local configs_paths=$(openvpn3 configs-list | grep '/net/openvpn/v3/configuration/' | xargs) _openvpn3_config-acl() { _arguments \ {-s,--show}"[Show the current access control lists]" \ {-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ {-S,--seal}"[Make the configuration profile permanently read-only]" \ {-R,--revoke}"[ Revoke this user access from this configuration profile]" \ {-G,--grant}"[ Grant this user access to this configuration profile]" \ "--public-access[ Set/unset the public access flag]" \ "--lock-down[ Set/unset the lock-down flag.Will disable config retrieval for users]: :(true false)" \ "--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" } _openvpn3_config-import() { _arguments \ {-p,--persistent}"[Make the configuration profile persistent through service restarts]" \ {-n,--name}"[NAME Provide a different name for the configuration (default: CFG-FILE)]" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CFG-FILE Configuration file to import]: :_files" } _openvpn3_config-manage() { _arguments \ {-s,--show}"[Show current configuration options]" \ {-r,--rename}"[NEW-CONFIG-NAME Renames the configuration]" \ {-o,--path}"[CONFIG-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ "--unset-override[ Removes the override]" \ "--tls-version-min[ Sets the minimal TLS version for the control channel]: :(tls_1_0 tls_1_1 tls_1_2 tls_1_3)" \ "--tls-cert-profile[ Sets the control channel tls profile]: :(legacy preferred suiteb)" \ "--server-override[ Replace the remote, connecting to this server instead the server specified in the configuration]" \ "--proxy-username[ HTTP Proxy username to authenticate as]" \ "--proxy-port[ HTTP Proxy port to connect on]" \ "--proxy-password[ HTTP Proxy password to use for authentication]" \ "--proxy-host[ HTTP Proxy to connect via, overrides configuration file http-proxy]" \ "--proxy-auth-cleartext[ Adds the boolean override proxy-auth-cleartext]: :(true false)" \ "--proto-override[ Overrides the protocol being used]: :(tcp udp)" \ "--port-override[ Replace the remote port, connecting to this port instead of the configuration value]" \ "--persist-tun[ Adds the boolean override persist-tun]: :(true false)" \ "--ipv6[ Sets the IPv6 policy of the client]: :(yes no default)" \ "--force-cipher-aes-cbc[ Adds the boolean override force-cipher-aes-cbc]: :(true false)" \ "--dns-sync-lookup[ Adds the boolean override dns-sync-lookup]: :(true false)" \ "--dns-setup-disabled[ Adds the boolean override dns-setup-disabled]: :(true false)" \ "--dns-fallback-google[ Adds the boolean override dns-fallback-google]: :(true false)" \ "--config-path[CONFIG-PATH Alias for --path]: :($configs_paths)" \ "--auth-fail-retry[ Adds the boolean override auth-fail-retry]: :(true false)" \ "--allow-compression[ Set compression mode]: :(no asym yes)" \ } _openvpn3_config-remove() { _arguments \ {-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ "--force[Force the deletion process without asking for confirmation]" \ "--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" } _openvpn3_config-show() { _arguments \ {-o,--path}"[OBJ-PATH Path to the configuration in the configuration manager]: :($configs_paths)" \ {-j,--json}"[Dump the configuration in JSON format]" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($configs_names)" \ "--config-path[OBJ-PATH Alias for --path]: :($configs_paths)" } _openvpn3_configs-list() { _arguments \ {-h,--help}"[This help screen]" } _openvpn3_help() { _arguments \ {-h,--help}"[This help screen]" } _openvpn3_log() { _arguments \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --session-path, where configuration profile name is used instead]: :($sessions_configs_names $configs_names)" \ {-I,--interface}"[INTERFACE Alternative to --session-path, where tun interface name is used instead]: :($sessions_interfaces)" \ "--session-path[SESSION-PATH Receive log events for a specific session]: :($sessions_paths)" \ "--log-level[LOG-LEVEL Set the log verbosity level of messages to be shown (default: 4)]" \ "--config-events[Receive log events issued by the configuration manager]" } _openvpn3_session-acl() { _arguments \ {-s,--show}"[Show the current access control lists]" \ {-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \ {-R,--revoke}"[ Revoke this user access from this session]" \ {-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \ {-G,--grant}"[ Grant this user access to this session]" \ "--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \ "--public-access[ Set/unset the public access flag]: :(true false)" \ "--allow-log-access[ Can users granted access also access the session log?]: :(true false)" } _openvpn3_session-manage() { _arguments \ {-o,--path}"[SESSION-PATH Path to the session in the session manager]: :($sessions_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \ {-R,--resume}"[Resumes a paused VPN session]" \ {-P,--pause}"[Pauses the VPN session]" \ {-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \ {-D,--disconnect}"[Disconnects a VPN session]" \ "--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" \ "--restart[Disconnect and reconnect a running VPN session]" \ "--cleanup[Clean up stale sessions]" } _openvpn3_session-start() { _arguments \ {-p,--config-path}"[CONFIG-PATH Configuration path to an already imported configuration]: :($configs_paths)" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-FILE Configuration file to start directly]: :_files" \ "--persist-tun[Enforces persistent tun/seamless tunnel (requires --config)]" } _openvpn3_session-stats() { _arguments \ {-o,--path}"[SESSION-PATH Path to the configuration in the configuration manager]: :($sessions_paths)" \ {-j,--json}"[Dump the configuration in JSON format]" \ {-h,--help}"[This help screen]" \ {-c,--config}"[CONFIG-NAME Alternative to --path, where configuration profile name is used instead]: :($sessions_configs_names)" \ {-I,--interface}"[INTERFACE Alternative to --path, where tun interface name is used instead]: :($sessions_interfaces)" \ "--session-path[SESSION-PATH Alias for --path]: :($sessions_paths)" } _openvpn3_sessions-list() { _arguments \ {-h,--help}"[This help screen]" } _openvpn3_shell-completion() { _arguments \ {-h,--help}"[This help screen]" \ "--list-commands[List all available commands]" \ "--list-options[COMMAND List all available options for a specific command]: :($(openvpn3 shell-completion --list-commands))" \ "--arg-helper[OPTION Used together with --list-options, lists value hint to an option]" } _openvpn3_version() { _arguments \ {-h,--help}"[This help screen]" } _openvpn3_command() { local -a openvpn3_cmds=( "config-acl: Manage access control lists for configurations" "config-import: Import configuration profiles" "config-manage: Manage configuration properties" "config-remove: Remove an available configuration profile" "config-show: Show/dump a configuration profile" "configs-list: List all available configuration profiles" "help: This help screen" "log: Receive log events as they occur" "session-acl: Manage access control lists for sessions" "session-manage: Manage VPN sessions" "session-start: Start a new VPN session" "session-stats: Show session statistics" "sessions-list: List available VPN sessions" "shell-completion: Helper function to provide shell completion data" "version: Show program version information" ) if ((CURRENT == 1)); then _describe -t commands 'openvpn3 commands' openvpn3_cmds else local curcontext="$curcontext" local cmd="${${openvpn3_cmds[(r)$words[1]:*]%%:*}}" if (($#cmd)); then if (( $+functions[_openvpn3_$cmd] )); then _openvpn3_$cmd else _message "no options for $cmd" fi else _message "no more options" fi fi } _arguments \ {-h,--help}"[that This help screen]" \ "*::openvpn3 commands:_openvpn3_command" \ # 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 ================================================ FILE: src/_optirun ================================================ #compdef optirun # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 the optirun command from bumblebee # (https://github.com/Bumblebee-Project/Bumblebee). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Christophe-Marie Duquesne # # ------------------------------------------------------------------------------ local -a arguments=( '--version[output version information]' '(-h --help)'{-h,--help}'[show help]' '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)' '--failsafe[run a program even if the nvidia card is unavailable]:boolean:(true false)' '--no-failsafe[do not run a program if the nvidia card is unavailable]' '--vgl-options[options to be passed to vglrun (example: +tr)]' '(-q --quiet --silent)'{-q,--quiet,--silent}'[suppress all logging messages]' '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]' '--debug[set the verbosity level to the maximum]' '(-b --bridge)'{-b,--bridge}'[specify bridge library to use: VirtualGL, Primus or auto]:method:(auto primus virtualgl none)' '(-d --display)'{-d,--display}'[the X display number to use]:display:_x_display' '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files' '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files -/' '--primus-ldpath[a colon-separated list of paths which are searched for the primus libGL.so.1]:file:_files' '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files' '--no-xorg[do not start secondary X server (implies -b none)]' '*::arguments: _normal' ) _arguments $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 ================================================ FILE: src/_patool ================================================ #compdef patool # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 patool (https://github.com/wummel/patool). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Sergei Eremenko (https://github.com/SmartFinn) # # ------------------------------------------------------------------------------ local state line ret=1 _arguments -C \ '(-h --help)'{-h,--help}'[show help message and exit]' \ '(--non-interactive)'--non-interactive'[do not query for user input]' \ '(-v --verbose)'{-v,--verbose}'[verbose operation]' \ '1:cmd:->cmds' \ '*:arg:->args' && ret=0 case $state in (cmds) local -a cmds cmds=( 'create:create an archive from given files' 'diff:show differences between two archives' 'extract:extract files from given archives' 'formats:show all supported archive formats' 'list:list files in archives' 'repack:repackage archive to a different format' 'recompress:recompress an archive to smaller size' 'search:search in archive contents for given pattern' 'test:test the given archives' ) _describe -t commands 'patool commands' cmds && ret=0 ;; (args) case $line[1] in (extract) _arguments \ '--outdir[extract to the given output directory]:select directory:_files -/' \ '*:files:_files' && ret=0 ;; (formats) _message 'no more arguments' && ret=0 ;; (search) _arguments \ '2:search pattern:' \ '*:files:_files' && ret=0 ;; (*) _arguments \ '*:files:_files' && ret=0 ;; esac ;; esac return $ret # 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 ================================================ FILE: src/_periscope ================================================ #compdef periscope # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for Periscope (https://code.google.com/archive/p/periscope/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # # ------------------------------------------------------------------------------ _arguments \ '(- : *)'{-h,--help}'[show help message and exit]' \ '(- : *)--version[show version number and exit]' \ '*'{-l,--language}'[wanted language]: :_language_codes ISO-639-1' \ '(-f --force)'{-f,--force}'[replace existing subtitle file]' \ '(-q --query)'{-q,--query}'[query to send to the subtitles website]:queries' \ '--list-plugins[list all plugins supported by periscope]' \ '--list-active-plugins[list all plugins used to search subtitles]' \ '--cache-folder[cache/config directory to use]: :_files -/' \ '--quiet[run in quiet mode (only show warn and error messages)]' \ '--debug[set the logging level to debug]' \ '*: :_files' # 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 ================================================ FILE: src/_phing ================================================ #compdef phing # ------------------------------------------------------------------------------ # Copyright (c) Igor M. Timoshenko # # 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 Phing 3.1.0 (https://www.phing.info/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Igor Timoshenko # # ------------------------------------------------------------------------------ _phing() { local context curcontext="$curcontext" state line ret=1 integer NORMARG typeset -A opt_args # Follow https://www.phing.info/guide/chunkhtml/sec.commandlineargs.html for more information _arguments -C \ '(-h -help)'{-h,-help}'[display the help screen]' \ '(-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' \ '-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 and exit]' \ '1: :->targets' \ '*:: :->args' \ && ret=0 case $state in (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 -a targets=($(sed -nE "/ # # ------------------------------------------------------------------------------ local -a command_options=( '--version[Show the program version and exit]' '--filter[Set the filter, e.g. installed]' "--root[Set the install root, e.g. '/' or '/mnt/ltsp']" '(-n --nowait)'{-n,--nowait}'[Exit without waiting for actions to complete]' '(-y --noninteractive)'{-y,--noninteractive}'[Install the packages without asking for confirmation]' '--background[Run the command using idle network bandwidth and also using less power]' '(-p --plain)'{-p,--plain}'[Print to screen a machine readable output, rather than using animated widgets]' '(-c --cache-age)'{-c,--cache-age}"[The maximum metadata cache age. Use -1 for 'never'.]" '(-h --help)'{-h,--help}'[Show help options.]' '(-v --verbose)'{-v,--verbose}'[Show debugging information for all files]' ) local -a actions=( 'accept-eula' 'get-roles' 'get-distro-upgrades' 'get-categories' 'get-actions' 'get-groups' 'get-filters' 'get-transactions' 'get-time' 'search' 'install' 'install-local' 'download' 'remove' 'update' 'refresh' 'resolve' 'get-updates' 'get-depends' 'get-requires' 'get-details' 'get-files' 'get-update-detail' 'get-packages' 'repo-list' 'repo-enable' 'repo-disable' 'repo-set-data' 'what-provides' 'upgrade-system' ) local context state line expl cmd local -A opt_args integer i=2 while (( i < $#words )); do case "$words[$i]" in -*) # skip option (( i++ )) continue ;; esac if [[ -z "$cmd" ]]; then cmd="$words[$i]" words[$i]=() (( CURRENT-- )) fi (( i++ )) done if [[ -z "$cmd" ]] then _arguments -s -w : $command_options \ ":action:($actions)" return fi case "$cmd" in search) _arguments : $command_options \ ':type:(name details group file)' \ ':data: :' ;; refresh) _arguments -s -w : $command_options \ '--force' ;; *) _arguments -s -w : $command_options ;; esac return 1 # 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 ================================================ FILE: src/_pm2 ================================================ #compdef pm2 # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for pm2 5.2.2 (https://pm2.keymetrics.io/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Myoungdo Park # * Shohei Yoshida # # ------------------------------------------------------------------------------ _pm2() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '(- *)'{-v,-V,--version}'[print pm2 version]' \ '(-s --silent)'{-s,--silent}'[hide all messages]' \ '--ext[watch only this file extension]:extension' \ '(-n --name)'{-n,--name}'[set a name for the process in the process list]:name' \ '(-m --mini-list)'{-m,--mini-list}'[display a compacted list without formatting]' \ '--interpreter[set a specific interpreter to use for executing app(default: node)]:prog' \ '(--interpreter-args --node-args)'{--interpreter-args,--node-args}'[set arguments to pass to the interpreter]:args' \ '(-o --output)'{-o,--output}'[specify log file for stdout]: :_files' \ '(-e --error)'{-e,--error}'[specify log file for stderr]: :_files' \ '(-l --log)'{-l,--log}'[specify log file which gathers both stdout and stderr]' \ '--filter-env[filter out outgoing global values that contain provided strings]:envs' \ '--log-type[specify log output style]: :(raw json)' \ '--log-date-format[specify log output style]:format' \ '--time[enable time logging]' \ '--disable-logs[disable all logs storage]' \ '*--env[specify which set of environment variables from ecosystem file must be injected]:env' \ '(-a --update-env)'{-a,--update-env}'[force and update of the environment with restart/reload]' \ '(-f --force)'{-f,--force}'[force actions]' \ '(-i --instances)'{-i,--instances}'[launch number instances]:num' \ '--parallel[number of parallel actions]:num' \ '--shutdown-with-message[shutdown an application with process.send("shutdown") instead of process.kill(pid, SIGINT)]' \ '(-p --pid)'{-p,--pid}'[specify pid file]: :_files' \ '(-k --kill-timeout)'{-k,--kill-timeout}'[delay before sending final SIGKILL signal to process]:delay' \ '--listen-timeout[listen timeout an application reload]:delay' \ '--max-memory-restart[restart the app if an amount of memory is exceeded (in bytes)]:bytes' \ '--restart-delay[specify a delay between restarts(in milliseconds)]:delay' \ '--exp-backoff-restart-delay[specify a delay between restarts(in milliseconds)]:delay' \ '(-x --execute-command)'{-x,--execute-command}'[execute a program using fork system]' \ '--max-restarts[only start the script COUNT times]:count' \ '(-u --user)'{-u,--user}'[define user when generating startup script]:username' \ '--uid[run target script with rights]:uid' \ '--gid[run target script with rights]:gui' \ '--namespace[start application within specified namespace]:namespace' \ '--cwd[run target script from path ]:cwd:_files -/' \ '--hp[define home path when generating startup script]: :_paths -/' \ '--wait-ip[override systemd script to wait for full internet connectivity to launch pm2]' \ '--service-name[define service name when generating startup script]' \ '(-c --cron --cron-restart)'{-c,--cron,--cron-restart}'[restart a running process based on a cron pattern]:pattern' \ '(-w --write)'{-w,--write}'[write configuration in local folder]' \ '--no-daemon[run pm2 daemon in the foreground if it does not exist already]' \ '(--disable-source-map-support --source-map-support)--source-map-support[force source map support]' \ '--only[with json declaration, allow to only act on one application]:app' \ '(--disable-source-map-support --source-map-support)--disable-source-map-support[force disable source map support]' \ '--wait-ready[ask pm2 to wait for ready event from your app]' \ '--merge-logs[merge logs from different instances but keep error and out separated]' \ '*--watch[watch application folder for changes]: :_files -/' \ '*--ignore-watch[list of paths to ignore]: :_files' \ '--no-color[skip colors]' \ '--no-vizion[start an app without vizion feature]' \ '--np-autorestart[start an app without automatic restart]' \ '--no-treekill[Only kill the main process, not detached children]' \ '--no-pmx[start an app without pmx]' \ '--no-automation[start an app without automation]' \ '(--disable-trace --trace)--trace[enable transaction tracing with km]' \ '(--disable-trace --trace)--disable-trace[disable transaction tracing with km]' \ "--sort[sort process according to field's]:field_name" \ '--attach[attach logging after your start/restart/stop/reload]' \ '--v8[enable v8 data collecting]' \ '--event-loop-inspector[enable event-loop-inspector dump in pmx]' \ '--deep-monitoring[enable all monitoring tools]' \ '(- *)'{-h,--help}'[output usage information]' \ '1: :_pm2_subcommands' \ '*:: :->subcmds' && return 0 case "$state" in (subcmds) case $words[1] in (start) _arguments \ '--watch[watch folder for changes]' \ '--fresh[Rebuild Dockerfile]' \ '--daemon[Run container in Daemon mode(debug purposes)]' \ '--container[Start application in container mode]' \ '--dist[--with-container; change local Dockerfile to containerize all files in current directory]' \ '--image-name[with --dist; set the exported image name]:name' \ '--node-version[with --container, set a specific major Node.js version]:version' \ '--dockerdaemon[for debugging purpose]' \ '(- *)'{-h,--help}'[output usage information]' \ '*: :_pm2_id_namespace_file' \ && ret=0 ;; (trigger) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '1: :_pm2_id_names' \ && ret=0 ;; (deploy|startOrRestart|startOrReload|startOrGracefulReload) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '1: :_files -g "*.json"' \ && ret=0 ;; (stop|restart) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--watch[Stop watching folder for changes]' \ '*: :_pm2_id_namespace_all' \ && ret=0 ;; (reload|delete|reset) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '*: :_pm2_id_namespace_all' \ && ret=0 ;; (module:install) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--tarball[is local tarball]' \ '--install[run yarn install before starting module]' \ '--docker[is docker container]' \ '--v1[install module in v1 manner(do not use it)]' \ '--safe[keep module backup, if new module fail = restore with previous]:time' \ && ret=0 ;; (publish|module:publish) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--npm[publish on npm]' \ '*: :_files -/' \ && ret=0 ;; (link) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--info-node[set url info node]:url' \ && ret=0 ;; (plus) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--info-node[set url info node]:url' \ '(-d --discrete)'{-d,--discrete}'[silent mode]' \ '(-a --install-all)'{-a,--install-all}'[install all modules (force yes)]' \ && ret=0 ;; (dump|save) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--force[force deletion of dump file even if empty]' \ && ret=0 ;; (send|attach|describe|env) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '1: :_pm2_id_names' \ && ret=0 ;; (slist|sysinfos) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--tree[show as tree]' \ && ret=0 ;; (logs) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--json[json log output]' \ '--format[formatted log output]' \ '--raw[raw output]' \ '--err[only shows error output]' \ '--out[only shows standard output]' \ '--line[output the last N lines, instead of the last 15 by default]:lines' \ '--timestamp[add timestamps(default format YYYY-MM-DD-HH:mm:ss)]:format' \ '--nostream[print logs without launching the log stream]' \ '*--highlight[highlights the given value]' \ '1: :_pm2_id_namespace' \ && ret=0 ;; (serve) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '--port[specify port to listen to]:port' \ '--spa[always serving index.html on inexistent sub path]' \ '--basic-auth-username[set basic auth username]:username' \ '--basic-auth-password[set basic auth password]:password' \ '--monitor[frontend app monitoring]:app' \ '*: :_files -/' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[output usage information]' \ '*: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_pm2_subcommands] )) || _pm2_subcommands() { local -a subcommands=( "start:start and daemonize an app" "trigger:trigger process action" "deploy:deploy your json" "startOrRestart:start or restart JSON file" "startOrReload:start or gracefully reload JSON file" "pid:return pid of [app_name] or all" "create:return pid of [app_name] or all" "startOrGracefulReload:start or gracefully reload JSON file" "stop:stop a process" "restart:restart a process" "scale:scale up/down a process in cluster mode depending on total_number param" "profile\:mem:Sample PM2 heap memory" "profile\:cpu:Profile PM2 cpu" "reload:reload processes (note that its for app using HTTP/HTTPS)" "id:get process id by name" "inspect:inspect a process" "delete:stop and delete a process from pm2 process list" "sendSignal:send a system signal to the target process" "ping:ping pm2 daemon - if not up it will launch it" "updatePM2:update in-memory PM2 with local PM2" "update:update in-memory PM2 with local PM2" "install:install or update a module and run it forever" "module\:install:install or update a module and run it forever" "module\:update:update a module and run it forever" "module\:generate:Generate a sample module in current folder" "uninstall:stop and uninstall a module" "module\:uninstall:stop and uninstall a module" "package:Check & Package TAR type module" "publish:Publish the module you are currently on" "module\:publish:Publish the module you are currently on" "set:sets the specified config " "multiset:multiset eg \"key1 val1 key2 val2\"" "get:get value for " "conf:get / set module config values" "config:get / set module config values" "unset:clears the specified config " "report:give a full pm2 report for https://github.com/Unitech/pm2/issues" "link:link with the pm2 monitoring dashboard" "unlink:unlink with the pm2 monitoring dashboard" "monitor:monitor target process" "unmonitor:unmonitor target process" "open:open the pm2 monitoring dashboard" "plus:enable pm2 plus" "login:Login to pm2 plus" "logout:Logout from pm2 plus" "dump:dump all processes for resurrecting them later" "save:dump all processes for resurrecting them later" "cleardump:Create empty dump file" "send:send stdin to " "attach:attach stdin/stdout to application identified by " "resurrect:resurrect previously dumped processes" "unstartup:disable the pm2 startup hook" "startup:enable the pm2 startup hook" "logrotate:copy default logrotate configuration" "ecosystem:generate a process conf file" "init:generate a process conf file" "reset:reset counters for process" "describe:describe all parameters of a process" "desc:describe all parameters of a process" "info:describe all parameters of a process" "show:describe all parameters of a process" "env:list all environment variables of a process id" "list:list all processes" "l:list all processes" "ps:list all processes" "status:list all processes" "jlist:list all processes in JSON format" "sysmonit:start system monitoring daemon" "slist:list system infos in JSON" "sysinfos:list system infos in JSON" "prettylist:print json in a prettified JSON" "monit:launch termcaps monitoring" "imonit:launch legacy termcaps monitoring" "dashboard:launch dashboard with monitoring and logs" "dash:launch dashboard with monitoring and logs" "flush:flush logs" "reloadLogs:reload all logs" "logs:stream logs file. Default stream all logs" "kill:kill daemon" "pull:updates repository for a given app" "forward:updates repository to the next commit for a given app" "backward:downgrades repository to the previous commit for a given app" "deepUpdate:performs a deep update of PM2" "serve:serve a directory over http via port" "autoinstall:auto install" "examples:display pm2 usage examples" ) _describe -t subcommands 'subcommand' subcommands "$@" } (( $+functions[_pm2_id_names] )) || _pm2_id_names() { local app_list=$(pm2 list -m) local -a names=(${(@f)"$(echo $app_list | awk '/^\+---/{sub("+--- ", ""); print}')"}) local -a ids=(${(@f)"$(echo $app_list | awk '/^pm2 id/{sub("pm2 id :", ""); print}')"}) if (( ${#ids} > 0 )); then local -a id_names for i in {1..${#ids}}; do id_names+=( "${ids[i]}:${names[i]}" ) done _describe 'id' id_names fi } (( $+functions[_pm2_namespaces] )) || _pm2_namespaces() { local -a namespaces=(${(@f)"$(pm2 list -m | awk '/^namespace :/{ print $3 }')"}) if (( ${#namespaces} > 0 )); then _values 'namespace' $namespaces fi } (( $+functions[_pm2_id_namespace] )) || _pm2_id_namespace() { _alternative \ 'ids:id:_pm2_id_names' \ 'namespaces:namespace:_pm2_namespaces' } (( $+functions[_pm2_id_namespace_all] )) || _pm2_id_namespace_all() { _alternative \ 'ids:id:_pm2_id_names' \ 'namespaces:namespace:_pm2_namespaces' \ 'all:all:(all)' } (( $+functions[_pm2_id_namespace_file] )) || _pm2_id_namespace_file() { _alternative \ 'ids:id:_pm2_id_names' \ 'namespaces:namespace:_pm2_namespaces' \ 'files:file:_files' } _pm2 "$@" # 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 ================================================ FILE: src/_port ================================================ #compdef port # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for MacPorts 2.12.1 (https://www.macports.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Matt Cable # * Sorin Ionescu # * Aljaž Srebrnič # ----------------------------------------------------------------------------- # License # ------- # # Copyright (c) 2016, Matt Cable, Sorin Ionescu, Aljaž Srebrnič # 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 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 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. # # ------------------------------------------------------------------------------ # global variable #_port_available_packages #_port_installed_packages _port() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 local port_prefix=${commands[port]%/bin/port} _arguments -s -C \ '-v[Verbose mode (generate verbose messages)]' \ '-d[Debug mode (generate debugging messages, implies -v)]' \ '-q[Quiet mode (suppress messages)]' \ '-N[Non-interactive mode]' \ "-n[Don't follow dependencies in upgrade (affects upgrade and install)]" \ "-R[Also upgrade dependents (only affects upgrade) ]" \ '-u[Uninstall inactive ports when upgrading and uninstalling]' \ '-y[Perform a dry run]' \ '-s[Source-only mode (build and install from source)]' \ '-b[Binary-only mode (build and install from binary archives)]' \ '-c[Autoclean mode (execute clean after install)]' \ "-k[Keep mode (don't autoclean after install)]" \ '-p[Despite any errors encountered, proceed to process multiple ports and commands]' \ '-o[Honor state files even if the Portfile has been modified since]' \ '-t[Enable trace mode debug facilities on platforms that support it]' \ '-f[Force mode, ignore state file]' \ '-D[Specify portdir]:dir:_files -/' \ '-F[Read and process the file of commands specified by the argument]:file:_files' \ "1:Port actions:_port_actions" \ '*::arg:->args' \ && ret=0 case "$state" in (args) local subcmd=$words[1] local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy zstyle ":completion:${curcontext}:" cache-policy ${cache_policy:-_port_caching_policy} local -a log_phases=('fetch' 'checksum' 'extract' 'patch' 'configure' 'build' 'destroot') local -a no_portname_commands=( 'help' 'diagnose' 'migrate' 'outdated' 'platform' 'provides' 'reclaim' 'restore' 'rev-upgrade' 'search' 'select' 'selfupdate' 'snapshot' 'sync' 'usage' ) local -a show_installed_package_commands=( uninstall upgrade activate deactivate dependents rdependents setrequested unsetrequested setunrequested space location contents ) local -a options=() case $subcmd in (activate|deactivate) options+=('--no-exec[Do not execute any stored pre- or post-uninstall procedures]') ;; (archivefetch) options+=('-p[Proceed even if a port fails to fetch]') ;; (fetch|checksum|extract|patch|configure|build|destroot|test) options+=('--no-mirrors[Only fetch files from URLs in master_sites]') ;; (bump) options+=('--patch[Create a Portfile.patch file instead of directly overwriting the Portfile]') ;; (clean) options+=( '--archive[Remove partially downloaded binary archives]' '--dist[Delete source code archives, the so-called distfiles]' '--logs[Delete log files]' '--work[Delete the work directory of a port]' '--all[Remove all temporary files]' ) ;; (contents) options+=( "--size[Enable printing a human-readable representation of the files' size]" '--units[Used in conjunction with --size to choose the unit in which the size is given]:units:_port_units' ) ;; (deps|rdeps) options+=( '--index[Do not read Portfiles, but instead rely solely on the PortIndex information]' '--no-build[Exclude dependencies only required at build time]' '--no-test[Exclude test dependencies]' ) if [[ $subcmd == "rdeps" ]]; then options+=('--full[Display all branches of the dependency tree instead of listing each dependency only once]') fi ;; (diagnose) options+=('--quiet[Only display warnings or errors]') ;; (edit) options+=('--editor[Use the specified editor]:editor') ;; (help|usage) options+=('1:action:_port_actions') ;; (info) options+=( '--index[Do not read the Portfile, but rely solely on the port index information]' '--line[Print a single line for each port]' '--pretty[Format the output in a convenient, human-readable fashion]' '(--category --categories)'{--category,--categories}'[List the categories of a port]' '--conflicts[List other ports that cannot be activate at the same time as the given port]' '--depends_fetch[List the fetch dependencies of a port]' '--depends_extract[List the extract dependencies of a port]' '--depends_build[List the build dependencies of a port]' '--depends_lib[List the lib dependencies of a port]' '--depends_run[List the run dependencies of a port]' '--depends[List the all dependencies of a port]' '(--description --long_description)--description[Print the short description of a port]' '(--description --long_description)--long_description[Print the long description of a port]' '--epoch[List the epoch components of a MacPorts]' '--version[List the version components of a MacPorts]' '--revision[List the revision components of a MacPorts]' '--fullname[Print name and the full MacPorts version tuple]' '--heading[Like --fullname but including the categories]' '--homepage[List the homepage of a port]' '--license[Print the license that applies to the source code of a port]' '(--maintainer --maintainers)'{--maintainer,--maintainers}"[List the email address(es) of a port's maintainer(s)]" '--name[Print the name of a port]' '--pathfiles[List the patches that will be applied to the port]' '(--platform --platforms)'{--platform,--platforms}'[List the platforms supported by a port]' "--portdir[Print the path to a port's directory]" '--replaced_by[List the name of the port that replaces a port]' "--subports[Print a list of subports defined by this port's Portfile]" '(--variant --variants)'{--variant,--variants}'[List the variants defined by a port by name]' ) ;; (install) options+=( '--allow-failing[Attempt installation even if the specified port is known to fail]' '--no-replace[Attempt to install specified port even if it is replaced by another port]' '--no-rev-upgrade[Do not run rev-upgrade after installation]' '--unrequested[Do not mark the installed ports as requested]' ) ;; (lint) options+=('--nitpick[Enable additional checks that are mostly whitespace-related and best practices]') ;; (log) options+=( '--level[Log level]:level:(error warn msg info debug)' '--phase[Only print messages that were generated in the given installation phase]:phase:($log_phases)' ) ;; (migrate) options+=( '--all[Migrate all ports including unrequested ones]' '--continue[Continue with migration of ports]' ) ;; (mirror) options+=('--new[Delete the existing database of mirrored files and re-create it from scratch]') ;; (provides) options+=('*::file:_files') ;; (reclaim) options+=( '--keep-build-deps[Consider build-time dependency ports to be considered needed]' '(--enable-reminders --disable-reminders)--enable-reminders[Enable regular reminders to run "port reclaim"]' '(--enable-reminders --disable-reminders)--disable-reminders[Disable reminders to run "port reclaim"]' ) ;; (restore) options+=( '--snapshot-id[Restore the snapshot with the specified ID]:id:_port_snapshot_ids' '--last[Restore the last created snapshot]' '--all[Restore all ports in the snapshot including unrequested ones]' ) ;; (rev-upgrade) options+=('--id-loadcmd-check[Check the ID load command in each library installed by MacPorts]') ;; (search) options+=( '--case-sensitive[Do not ignore case when searching for the given keyword]' '(--exact --glob --regex)--exact[Search for the given string exactly]' '(--exact --glob --regex)--glob[Treat the keyword(s) as wildcard]' '(--exact --glob --regex)--regex[Treat the given string as a Tcl regular expression]' '--line[Print one match per line]' '(--category --categories)'{--category,--categories}'[Search the category]' '--depends_fetch[Search the fetch dependencies of a port]' '--depends_extract[Search the extract dependencies of a port]' '--depends_build[Search the build dependencies of a port]' '--depends_lib[Search the lib dependencies of a port]' '--depends_run[Search the run dependencies of a port]' '--depends[Search the all dependencies of a port]' '(--description --long_description)--description[Test the search string against the description]' '(--description --long_description)--long_description[Test the search string against the long description]' '--homepage[Search for the keyword(s) in the homepage property]' '(--maintainer --maintainers)'{--maintainer,--maintainers}"[Search for maintainers]" '--name[Search in ports name]' "--portdir[Test the search string against the path of the directory that contains the port]" '(--variant --variants)'{--variant,--variants}'[Search for variant names]' ) ;; (select) options+=( '--summary[Display summary of selected options]' '--list[List available versions for the group]' '--set[Select the given version for the group]' '--show[Show which version is currently selected for the group (default if none given)]' '1:group:_port_select_groups' '2:variant:_port_select_variants' ) ;; (selfupdate) options+=( '--no-sync[Only check for updates and install if available]' '--migrate[Rebuild even if no new version is available]' '--rsync[Use the older rsync method for downloading the new version of MacPorts]' ) ;; (snapshot) options+=( '--create[Create a new snapshot that records the current active ports]' '--note[Label with the given note when creating a snapshot]:note' '--list[Display a list of all snapshots that currently exist]' '--diff[Display the differences between the given snapshot ID and currently installed ports]:id:_port_snapshot_ids' '--all[Consider all ports when displaying diffs]' '--delete[Delete the snapshot with the given ID number]:id:_port_snapshot_ids' '--export[Generate a JSON representation of the snapshot with the given ID number]:id:_port_snapshot_ids' '--import[Create a new snapshot from the information in the given file]:file:_files' '(- *)--help[Display brief usage information]' ) ;; (space) options+=( '--total[Only print the total amount of space used by all given ports]' '--units[Choose the unit in which the size is given]:unit:_port_units' ) ;; (uninstall) options+=( '--follow-dependents[Also uninstall all ports recursively depending directly or indirectly]' '--follow-dependencies[Also recursively uninstall all ports that the given port depends on]' '--no-exec[Do not execute any stored pre- or post-uninstall procedures]' ) ;; (upgrade) options+=( '--enforce-variants[Upgrade all given ports and their dependencies]' '--force[Ignore circumstances that would normally cause ports to be skipped]' '--no-replace[Do not automatically install ports that replace a new-obsolete port you have installed]' '--no-rev-upgrade[Do not run rev-upgrade after upgrading]' ) ;; (variants) options+=('--index[Do not read the Portfile]') ;; esac if (( $no_portname_commands[(Ie)$subcmd] )); then _arguments \ $options[@] \ && ret=0 else local -a pseudo_port_names=( all current active inactive actinact installed uninstalled outdated obsolete requested unrequested leaves rleaves ) local -a selectors=( 'variants:' 'variant:' 'description:' 'depends:' 'depends_lib:' 'depends_run:' 'depends_build:' 'depends_fetch:' 'depends_extract:' 'portdir:' 'homepage:' 'epoch:' 'platforms:' 'platform:' 'name:' 'long_description:' 'maintainers:' 'maintainer:' 'categories:' 'category:' 'version:' 'revision:' 'license:' 'depof:' 'rdepof:' 'rdepends:' 'dependentof:' 'rdependentof:' ) if (( $show_installed_package_commands[(Ie)$subcmd] )); then _port_update_cache "installed" _arguments \ $options[@] \ '1: :_port_installed_ports' \ '*: :_port_options' \ && ret=0 else _port_update_cache "all" _arguments \ $options[@] \ '1: :_port_available_ports' \ '*: :_port_options' \ && ret=0 fi fi ;; esac return ret } (( $+functions[_port_actions] )) || _port_actions() { local -a actions=( 'activate:Activate the given ports' 'archive:Archive the given ports, i.e. install the port image but do not activate' 'archivefetch:Fetch archive for the given ports' 'build:Build the given ports' 'bump:Update the outdated checksums of a Portfile' 'cat:Writes the Portfiles of the given ports to stdout' 'checksum:Compares the checksums for the downloaded files of the given ports' 'clean:Removes files associated with the given ports' 'configure:Configure the given ports' 'contents:Returns a list of files installed by given ports' 'deactivate:Deactivates the given ports' 'dependents:Returns a list of installed dependents for each of the given ports' 'deps:Display a dependency listing for the given ports' 'destroot:Destroot the given ports' 'diagnose:Detects common issues' 'dir:Returns the directories of the given ports' 'distcheck:Checks if the given ports can be fetched from all of its master_sites' 'distfiles:Returns a list of distfiles for the given port' 'dmg:Creates a dmg for each of the given ports' 'echo:Returns the list of ports the argument expands to' 'edit:Edit given ports' 'extract:Extract the downloaded files of the given ports' 'fetch:Downloaded distfiles for the given ports' 'file:Returns the path to the Portfile for each of the given ports' 'gohome:Opens the homepages of the given ports in your browser' 'help:Displays short help texts for the given actions' 'info:Returns information about the given ports ' 'install:Installs the given ports' 'installed:List installed versions of the given port, or all installed ports if no port is given' 'lint:Checks if the Portfile is lint-free for each of the given ports' 'list:List the available version for each of the given ports' 'livecheck:Checks if a new version of the software is available' 'load:Interface to launchctl(1) for ports providing startup items' 'location:Returns the install location for each of the given ports' 'log:Shows main log for given ports' 'logfile:Returns the log file path for each of the given ports' 'mdmg:Creates a dmg containing an mpkg for each of the given ports and their dependencies' 'migrate:Update MacPorts for a new platform' 'mirror:Fetches distfiles for the given ports' 'mpkg:Creates an mpkg for each of the given ports and their dependencies' 'notes:Displays informational notes for each of the given ports' 'outdated:Returns a list of outdated ports' 'patch:Applies patches to each of the given ports' 'pkg:Creates a pkg for each of the given ports' 'platform:Returns the current platform that port is running on' 'provides:Return which port provides each of the files given' 'rdependents:Recursive version of dependents' 'rdeps:Display a recursive dependency listing for the given ports' 'reclaim:Reclaims disk space' 'reload:Restart daemon' 'restore:Restore snapshots of installed ports' 'rev-upgrade:Scan for broken binaries in the installed ports and rebuild them as needed' 'search:Search for a port' 'select:Select between multiple versions of a versioned port' 'selfupdate:Upgrade MacPorts itself and run the sync target' 'setrequested:Marks each of the given ports as requested' 'setunrequested:Marks each of the given ports as unrequested' 'snapshot:Create and manage snapshots of installed ports' 'space:Show the disk space used by the given ports' 'sync:Synchronize the set of Portfiles' 'test:Run tests on each of the given ports' 'unarchive:Unarchive the destroot of the given ports from installed images' 'uninstall:Uninstall the given ports' 'unload:Interface to launchctl(1) for ports providing startup items' 'unsetrequested:Marks each of the given ports as unrequested' 'upgrade:Upgrades the given ports to the latest version' 'url:Returns the URL for each of the given ports' 'usage:Returns basic usage of the port command' 'variants:Returns a list of variants provided by the given ports, with descriptions if present' 'version:Returns the version of MacPorts' 'work:Returns the path to the work directory for each of the given ports' ) _describe -t actions 'actions' actions } (( $+functions[_port_options] )) || _port_options() { local current_arg=$words[CURRENT] # complete variants if [[ $current_arg == +* || $current_arg == -* ]]; then IPREFIX=$current_arg[1] PREFIX=$current_arg[2,-1] _port_variants $words[2] fi } (( $+functions[_port_available_ports] )) || _port_available_ports() { _alternative \ 'ports:Available ports:($_port_available_packages)' \ 'pseudo-common:Common Pseudo-portnames:($pseudo_port_names)' \ 'selectors:Pseudo portname selectors:($selectors)' } (( $+functions[_port_installed_ports] )) || _port_installed_ports() { _alternative \ "ports:Installed ports:($_port_installed_packages)" \ "pseudo-common:Common Pseudo-portnames:($pseudo_port_names)" \ "selectors:Pseudo portname selectors:($selectors)" } (( $+functions[_port_caching_policy] )) || _port_caching_policy() { local reg_time comp_time check_file zmodload -F zsh/stat b:zstat 2> /dev/null case "${1##*/}" in (PORT_INSTALLED_PACKAGES) check_file=$port_prefix/var/macports/registry/registry.db ;; (PORT_AVAILABLE_PACKAGES) check_file=${$(port dir MacPorts)%/*/*}/PortIndex ;; esac reg_time=$(zstat +mtime $check_file) comp_time=$(zstat +mtime $1) return $(( reg_time < comp_time )) } (( $+functions[_port_update_cache] )) || _port_update_cache() { local cache_type=$1 case "$cache_type" in (all) # Cache the list of all ports. if ( [[ ${+_port_available_packages} -eq 0 ]] || _cache_invalid PORT_AVAILABLE_PACKAGES ) && ! _retrieve_cache PORT_AVAILABLE_PACKAGES; then _port_available_packages=( $(_call_program path-all "port -q echo all") ) _store_cache PORT_AVAILABLE_PACKAGES _port_available_packages fi ;; (installed) if ( [[ ${+_port_installed_packages} -eq 0 ]] || _cache_invalid PORT_INSTALLED_PACKAGES ) && ! _retrieve_cache PORT_INSTALLED_PACKAGES; then _port_installed_packages=( $(_call_program path-all "port -q echo installed") ) _store_cache PORT_INSTALLED_PACKAGES _port_installed_packages fi ;; esac } (( $+functions[_port_select_groups] )) || _port_select_groups() { local -a groups=($port_prefix/etc/select/*(N:t)) _describe "Port select groups" groups } (( $+functions[_port_select_variants] )) || _port_select_variants() { local group=$words[2] local -a variants=("${(f)$(port select --list $group | awk '/^[ \t]+/{print $1}')}") _describe "Port select group $words[4] variants" variants } (( $+functions[_port_snapshot_ids] )) || _port_snapshot_ids() { local -a snapshot_ids=() if (( $+commands[perl] )); then local perl_expr='m{^\s+(\d+)\s+(.*)$} and printf "%s:%s\n", $1, $2' snapshot_ids=("${(f)$(port snapshot --list | perl -wln -e $perl_expr)}") else local awk_expr='NR > 2 { printf("%s:%s %s\n", $1, $2, $3) }' snapshot_ids=("${(f)$(port snapshot --list | awk $awk_expr)}") fi _describe "Port snapshot IDs" snapshot_ids } (( $+functions[_port_variants] )) || _port_variants() { local name=$1 if (( $+commands[perl] )); then local -a variants=($(port variants $name | perl -wln -e 'm{^(?:\s+|\[\+\])([^:]+):} and print $1')) if [[ ${#variants} != 0 ]]; then _values 'variant' $variants fi fi } (( $+functions[_port_units] )) || _port_units() { local -a units=( "B[List sizes in bytes]" {K,Ki,KiB}"[List sizes in KiB, 1024 bytes]" {Mi,MiB}'[List sizes in MiB, 1024 * 1024 bytes]' {Gi,GiB}'[List sizes in GiB, 1024 * 1024 * 1024 bytes]' {k,kB}'[List sizes in kB, 1000 bytes]' {M,MB}'[List sizes in kB, 1000 * 1000 bytes]' {G,GB}'[List sizes in kB, 1000 * 1000 * 1000 bytes]' ) _values 'unit' $units } _port "$@" # 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 ================================================ FILE: src/_pre-commit ================================================ #compdef pre-commit # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for pre-commit 4.2.0 (https://github.com/pre-commit/pre-commit/). # Modified from rejected https://github.com/pre-commit/pre-commit/pull/2506 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Wu Zhenyu # # ------------------------------------------------------------------------------ _pre_commit() { typeset -A opt_args local context state line curcontext="$curcontext" local ret=1 _arguments -C \ '(- *)'{-h,--help}'[show help message and exit]' \ '(- *)'{-V,--version}'[show version number and exit]' \ '1:command:_pre_commit_commands' \ '*:: :->args' \ && ret=0 case "$state" in (args) local -a options=( '(- : *)'{-h,--help}'[show this help message and exit]' "--color[Whether to use color in output(default: auto)]:color:(auto always never)" ) local -a hook_types=( commit-msg post-checkout post-commit post-merge post-rewrite pre-commit pre-merge-commit pre-push pre-rebase prepare-commit-msg ) local -a hook_stages=($hook_types[@] manual) case $words[1] in (help) _pre_commit_commands && ret=0 return ret (autoupdate|init-templatedir|install|install-hooks|migrate-config|run|uninstall) options+=( '(-c --config)'{-c,--config}'[Path to alternate config file]:config:_files -g "*.yaml"' ) ;| (init-templatedir|install|uninstall) options+=( '(-t --hook-type)'{-t,--hook-type}'[hook type]:type:($hook_types)' ) ;| (autoupdate) options+=( '--bleeding-edge[Update to the bleeding edge of 'HEAD' instead of the latest tagged version]' '--freeze[Store "frozen" hashes in "rev" instead of tag names]' '*--repo[Only update this repository -- may be specified multiple times]:repos' '(-j --jobs)'{-j,--jobs}'[Number of threads to use(default: 1)]:jobs' ) ;; (init-templatedir) options+=( '--no-allow-missing-config[Assume cloned repos should have a "pre-commit" config]' '*::dir:_files -/' ) ;; (install) options+=( '(-f --overwrite)'{-f,--overwrite}'[Overwrite existing hooks / remove migration mode]' '--install-hooks[Whether to install hook environments for all environments]' '--allow-missing-config[Allow a missing "pre-commit" configuration file]' ) ;; (run|try-repo) options+=( '(-v --verbose)'{-v,--verbose}'[verbose mode]' '(-a --all-files)'{-a,--all-files}'[Run on all the files in the repo]' '--files[Specific filenames to run hooks on]:file:_files' '--show-diff-on-failure[When hooks fail, run "git diff" directly afterward]' '--hook-stage[The stage during which the hook is fired]:stage:($hook_stages)' '--remote-branch[Remote branch ref used by "git push"]:remote_branch:_pre_commit_git_remote_branches' '--local-branch[Local branch ref used by "git push"]:local_branch:_pre_commit_git_local_branches' '(--from-ref --source -s)'{--from-ref,--source,-s}'[original ref in "from_ref..to_ref" diff expression]:ref:_pre_commit_git_refs' '(--to-ref --origin -o)'{--to-ref,--origin,-o}'[destination ref in "from_ref..to_ref" diff expression]:ref:_pre_commit_git_refs' '--pre-rebase-upstream[upstream from which the series was forked]:upstream' '--pre-rebase-branch[branch being rebased and is not set when rebasing the current branch]:branch' '--commit-msg-filename[file name to check when running during "commit-msg"]:file:_files' '--prepare-commit-message-source[source of the commit message]:source' '--commit-object-name[commit object name]:object_name' '--remote-name[Remote name used by "git push"]:name:remote:_pre_commit_git_remotes' '--remote-url[Remote url used by "git push"]:url:_urls' '--checkout-type[branch check out or a file checkout]:type:_pre_commit_commit_types' '--is-squash-merge[use squash merge]:flag:(0 1)' '--rewrite-command[specify the command that invoked the rewrite]:command' "2:hook_id" ) ;; esac _arguments $options[@] && ret=0 ;; esac return ret } _pre_commit_commands() { local -a commands=( "autoupdate:Auto-update pre-commit config to the latest repos' versions" "clean:Clean out pre-commit files" "gc:Clean unused cached repos" "init-templatedir:Install hook script in a directory intended for use with 'git config init.templateDir'" "install:Install the pre-commit script" "install-hooks:Install hook environments for all environments in the config file" "migrate-config:Migrate list configuration to new map configuration" "run:Run hooks" "sample-config:Produce a sample .pre-commit-config.yaml file" "try-repo:Try the hooks in a repository, useful for developing new hooks" "uninstall:Uninstall the pre-commit script" "validate-config:Validate .pre-commit-config.yaml files" "validate-manifest:Validate .pre-commit-hooks.yaml files" "help:Show help for a specific command" ) _describe 'pre-commit commands' commands } _pre_commit_git_remote_branches() { if (( $+commands[git] )); then local -a remote_branches=(${(f)"$(git branch -a 2>/dev/null | \grep 'remotes/' | \grep -v HEAD | awk -F/ '{print $NF}' | uniq)"}) _values 'branch' $remote_branches fi } _pre_commit_git_local_branches() { if (( $+commands[git] )); then local -a local_branches=(${(f)"$(git branch 2>/dev/null | cut -c3-)"}) _values 'branch' $local_branches fi } _pre_commit_git_remotes() { if (( $+commands[git] )); then local -a remote_names=(${(f)"$(git remote 2>/dev/null)"}) _values 'remote' $remote_names fi } _pre_commit_commit_types() { local -a types=( '0:retrieving a file from the index' '1:changing branches' ) _describe 'commit types' types } _pre_commit_git_refs() { if (( $+commands[git] )); then local -a refs=(${(f)"$(git branch -a 2>/dev/null | \grep -v HEAD | cut -c3- | sed 's/^remotes\///')"}) _values 'ref' $refs fi } _pre_commit "$@" # 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 ================================================ FILE: src/_protoc ================================================ #compdef protoc # ------------------------------------------------------------------------------ # Copyright (c) 2020 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 protoc 24.0(https://github.com/protocolbuffers/protobuf) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ __protoc_files() { if compset -P '@'; then _files else _files -g '*.proto' fi } _protoc() { _arguments \ '(- : *)'{-h,--help}'[Show summary of options]' \ '(- : *)--version[Show version of program]' \ '*'{-I,--proto_path}'=[Specify the directory which to search for imports]:import_dir:_files -/' \ '--encode=[Read a text-format message of given type from stdin and write it in binary to stdout]:message_type' \ '--deterministic_output[When using --encode, ensure map fields are deterministically ordered]' \ '--decode=[Read a text-format message of given type from stdin and write it in binary to stdout]:message_type' \ '--decode_raw[Read an arbitrary protocol message from stdin and write the raw tag/value pairs in text format to stdout]' \ '--descriptor_set_in=[Specifies a delimited list of FILES each containing a FileDescriptorSet]:desc_in:_files' \ {-o,--descriptor_set_out}'=[Writes a FileDescriptorSet to FILE]:desc_out:_files' \ '--include_imports[When using --descriptor_set_out, also include all dependencies of the input files in the set]' \ '--include_source_info[When using --descriptor_set_out, do not strip SourceCodeInfo from the FileDescriptorProto]' \ '--retain_options[when using --descriptor_set_out, do not strip any options from the FileDescriptorProto]' \ '--dependency_out=[Write a dependency output file in the format expected by make]:dep_out:_files' \ '--error_format=[Set the format in which print errors]:error_format:(gcc msvc)' \ '--fatal_warnings[Make warnings be fatal]' \ '--print_free_field_numbers[Print the free field numbers of the messages]'\ '--enable_codegen_trace[Enables tracing which parts of protoc are responsible for what codegen output]' \ '--plugin=[Specifies a plugin executable to use]:plugin:_files' \ '--cpp_out=[Generate C++ header and source]:out_dir:_files -/' \ '--csharp_out=[Generate C# source file]:out_dir:_files -/' \ '--java_out=[Generate Java source file]:out_dir:_files -/' \ '--kotlin_out=[Generate Kotlin file]:out_dir:_files -/' \ '--js_out=[Generate JavaScript source]:out_dir:_files -/' \ '--objc_out=[Generate Objective C header and source]:out_dir:_files -/' \ '--php_out=[Generate PHP source file]:out_dir:_files -/' \ '--pyi_out=[Generate python pyi stub]:out_dir:_files -/' \ '--python_out=[Generate Python source file]:out_dir:_files -/' \ '--ruby_out=[Generate Ruby source file]:out_dir:_files -/' \ '--rust_out=[Generate Rust sources]:out_dir:_files -/' \ '*: :__protoc_files' } _protoc "$@" # 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 ================================================ FILE: src/_pygmentize ================================================ #compdef pygmentize # ------------------------------------------------------------------------------ # Copyright (c) 2012 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 pygmentize 2.13.0 (https://github.com/pygments/pygments) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hideo Hattori # # ------------------------------------------------------------------------------ _pygmentize() { local context state line _arguments -s -S \ '(-g)-l[Specify the lexer to use]:LEXER:_pygmentize_get_lexers' \ '(-l)-g[Guess the lexer from the file contents]' \ '-F[Add a filter to the token stream]:STYLE:_pygmentize_get_filters' \ '-f[Specify the formatter to use]:FORMATTER:_pygmentize_get_formatters' \ '-O[Give options to the lexer and formatter as a comma-separated list of key-value pairs]' \ '-P[Give a single option to the lexer and formatter]' \ '-o[output file]:FILENAME:_files' \ '-v[Print a detailed traceback on unhandled exceptions]' \ '-s[Process lines one at a time until EOF]' \ '-x[Allow custom lexers and formatters to be loaded from a .py file]' \ '--json[Output as JSON]' \ '(-L -o -F -H -g -l -N)-S[Print style definitions for STYLE for a formatter given with -f]:STYLE:_pygmentize_get_styles' \ '-L[lists lexers, formatters, styles or filters]:args:(lexers formatters styles filters)' \ '(-L -f -o -S -F -H -g -l)-N[guesses and prints out a lexer name based solely on given filename]:FILENAME:_files' \ '-C[Like -N, but print out a lexer name based solely on a given content from standard input]' \ '-H[prints detailed help for the object of type ]:' \ '-a[Formatter-specific additional argument for the -S mode]:' \ '(* -)-V[prints the package version]' \ '(* -)'{-h,--help}'[prints help]' \ '*:args:_files' } _pygmentize_get_filters() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then zstyle ":completion:${curcontext}:" cache-policy _pygmentize_caching_policy fi if ( [[ ${+_pygmentize_filters} -eq 0 ]] || _cache_invalid pygmentize_filters ) \ && ! _retrieve_cache pygmentize_filters; then _pygmentize_filters=(${${(f)"$(pygmentize -L filters | grep '* ' | cut -c3- | sed -e 's/:$//')"}}) _store_cache pygmentize_filters _pygmentize_filters fi local expl _wanted pygmentize_filters expl 'pygmentize filters' compadd -a _pygmentize_filters } _pygmentize_get_formatters() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then zstyle ":completion:${curcontext}:" cache-policy _pygmentize_caching_policy fi if ( [[ ${+_pygmentize_formatter} -eq 0 ]] || _cache_invalid pygmentize_formatter ) \ && ! _retrieve_cache pygmentize_formatter; then _pygmentize_formatter=(${${(f)"$(pygmentize -L formatters | grep '* ' | cut -c3- | sed -e 's/, /\n/g' -e 's/:$//')"}}) _store_cache pygmentize_formatter _pygmentize_formatter fi local expl _wanted pygmentize_formatter expl 'pygmentize formatters' compadd -a _pygmentize_formatter } _pygmentize_get_lexers() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then zstyle ":completion:${curcontext}:" cache-policy _pygmentize_caching_policy fi if ( [[ ${+_pygmentize_lexer} -eq 0 ]] || _cache_invalid pygmentize_lexer ) \ && ! _retrieve_cache pygmentize_lexer; then _pygmentize_lexer=(${${(f)"$(pygmentize -L lexers | grep '* ' | cut -c3- | sed -e 's/, /\n/g' -e 's/:$//')"}}) _store_cache pygmentize_lexer _pygmentize_lexer fi local expl _wanted pygmentize_lexer expl 'pygmentize lexers' compadd -a _pygmentize_lexer } _pygmentize_get_styles() { local cache_policy zstyle -s ":completion:${curcontext}:" cache-policy cache_policy if [[ -z "$cache_policy" ]]; then zstyle ":completion:${curcontext}:" cache-policy _pygmentize_caching_policy fi if ( [[ ${+_pygmentize_style} -eq 0 ]] || _cache_invalid pygmentize_style ) \ && ! _retrieve_cache pygmentize_style; then _pygmentize_style=(${${(f)"$(pygmentize -L styles | grep '* ' | cut -c3- | sed -e 's/:$//')"}}) _store_cache pygmentize_style _pygmentize_style fi local expl _wanted pygmentize_style expl 'pygmentize styles' compadd -a _pygmentize_style } _pygmentize_caching_policy() { local -a oldp oldp=( "$1"(Nmh+24) ) # 24 hour (( $#oldp )) } _pygmentize "$@" # 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 ================================================ FILE: src/_qmk ================================================ #compdef qmk # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 QMK CLI (https://qmk.fm/). # version: 1.2.0 # # ------------------------------------------------------------------------------ # Authors # ------- # # * precondition (https://github.com/precondition) # * undg (https://github.com/undg) # * Shohei Yoshida(https://github.com/syohex) # # ------------------------------------------------------------------------------ _qmk() { local curcontext="$curcontext" state line ret=1 typeset -A opt_args _arguments -C \ '(- *)'{-h,--help}"[Print help text.]" \ '(- *)'{-V,--version}"[Prints version information]" \ '(-v --verbose)'{-v,--verbose}"[Make the logging more verbose]" \ '--datetime-fmt[Format string for datetimes]:DATETIME_FMT' \ '--log-fmt[Format string for printed log output]:LOG_FMT' \ '--log-file-fmt[Format string for log file.]:LOG_FILE_FMT' \ '--log-file-level[Logging level for log file]:level:(debug info warning error critical)' \ '--log-file[File to write log messages to]:filename:_files' \ '(--no-color --color)--color[Enable color in output]' \ '(--no-color --color)--no-color[Disable color in output]' \ '(--no-unicode --unicode)--unicode[Enable unicode loglevels]' \ '(--no-unicode --unicode)--no-unicode[Disable unicode loglevels]' \ '--interactive[Force interactive mode even when stdout is not a tty]' \ '--config-file[The location for the configuration file]:filename:_files' \ '1:commands:_qmk_commands' \ '*::qmk commands:->args' && ret=0 case "$state" in (args) if (( $+functions[_qmk_${words[1]}] )); then _qmk_${words[1]} && ret=0 else ret=0 fi ;; esac return ret } (( $+functions[_qmk_commands] )) || _qmk_commands() { local -a commands=( 'config:Read and write configuration settings' 'clone:Clone a qmk_firmware fork' 'console:Acquire debugging information from usb hid devices' 'env:Prints environment information.' 'setup:Setup your computer for qmk_firmware' 'c2json:Creates a keymap.json from a keymap.c file' 'cd:Go to QMK Home' 'chibios-confmigrate:Generates a migrated ChibiOS configuration file, as a result of comparing the input against a reference' 'clean:Clean the QMK firmware folder of build artifacts' 'compile:Compile a QMK Firmware' 'doctor:Basic QMK environment checks' 'flash:QMK Flash' 'generate-autocorrect-data:Generate the autocorrection data file from a dictionary file' 'generate-compilation-database:Create a compilation database' 'generate-community-modules-rules-mk:Creates a community_modules_rules_mk from a keymap.json file' 'generate-community-modules-h:Creates a community_modules.h from a keymap.json file' 'generate-community-modules-c:Creates a community_modules.c from a keymap.json file' 'generate-community-modules-introspection-h:Creates a community_modules_introspection.h from a keymap.json file' 'generate-community-modules-introspection-c:Creates a community_modules_introspection.c from a keymap.json file' 'generate-led-matrix-community-modules-inc:Creates an led_matrix_community_modules.inc from a keymap.json file' 'generate-rgb-matrix-community-modules-inc:Creates an rgb_matrix_community_modules.inc from a keymap.json file' 'generate-keymap-h:Creates a keymap.h from a QMK Configurator export.' 'generate-rgb-breathe-table:Generates an RGB Light breathing table header' 'git-submodule:Git Submodule actions' 'import-kbfirmware:Import kbfirmware json export' 'import-keyboard:Import data driven keyboard' 'import-keymap:Import data-driven keymap' 'info:Keyboard information' 'json2c:Creates a keymap.c from a QMK Configurator export' 'lint:Check keyboard and keymap for common mistakes' 'list-keyboards:List the keyboards currently defined within QMK' 'list-keymaps:List the keymaps for a specific keyboard' 'list-layouts:List the layouts for a specific keyboard' 'new-keyboard:Create a new keyboard directory' 'new-keymap:Creates a new keymap for the keyboard of your choosing' 'painter-convert-graphics:Converts an input image to something QMK understands' 'painter-make-font-image:Converts an input font to something QMK understands' 'painter-convert-font-image:Converts an input font image to something QMK firmware understands' 'resolve-alias:Resolve any keyboard_aliases for provided rule' 'userspace-doctor:Checks userspace configuration' 'userspace-add:Adds a build target to userspace "qmk.json"' 'userspace-remove:Removes a build target from userspace "qmk.json"' 'userspace-list:Lists the build targets specified in userspace "qmk.json"' 'userspace-compile:Compiles the build targets specified in userspace "qmk.json"' 'via2json:Convert a VIA backup json to keymap.json format' ) _describe -t commands 'qmk commands' commands } (( $+functions[_qmk_config] )) || _qmk_config() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-ro --read-only)'{-ro,--read-only}'[Operate in read-only mode]' \ '(-a --all)'{-a,--all}'[Show all configuration options]' } (( $+functions[_qmk_clone] )) || _qmk_clone() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-b --branch)'{-b,--branch}'[The branch to clone]:branch' \ '--baseurl[The URL all git operations start from]:baseurl' \ '1:fork:_files' \ '*::destination:_files -/' } (( $+functions[_qmk_console] )) || _qmk_console() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-w --wait)'{-w,--wait}'[How many seconds to wait between check]:seconds' \ '(-t --timestamp)'{-t,--timestamp}'[Print the timestamp for received messages as well]' \ '(-n --numeric)'{-n,--numeric}'[Show VID/PID instead of names]' \ '(-l --list)'{-l,--list}'[List available hid_listen devices]' \ '(-d --device)'{-d,--device}'[Device to select]' \ '(--bootloaders --no-bootloaders)--bootloaders[Enable displaying bootloaders]' \ '(--bootloaders --no-bootloaders)--no-bootloaders[Enable displaying bootloaders]' } (( $+functions[_qmk_env] )) || _qmk_env() { _arguments \ '(-h --help)'{-h,--help}'[show help message and exit]' } (( $+functions[_qmk_setup] )) || _qmk_setup() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-H --home)'{-H,--home}'[The location for QMK Firmware]: :_files -/' \ '(-b --branch)'{-b,--branch}'[The branch to clone]:branch' \ '--baseurl[The URL all git operations start from]:baseurl' \ '(-y --yes -n --no)'{-y,--yes}'[Answer yes to all questions]' \ '(-y --yes -n --no)'{-n,--no}'[Answer no to all questions]' \ '*:: :_files' } (( $+functions[_qmk_c2json] )) || _qmk_c2json(){ _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-km --keymap)'{-km,--keymap}"[The keymap's name]:keymap" \ '(-kb --keyboard)'{-kb,--keyboard}"[The keyboard's name]:keyboard" \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error messages]' \ '(-o --output)'{-o,--output}'[File to write to]: :_files' \ "--no-cpp[Do not use 'cpp' keymap.c]" \ '*: :_files' } (( $+functions[_qmk_cd] )) || _qmk_cd() { _arguments \ '(-h --help)'{-h,--help}'[show help message and exit]' } (( $+functions[_qmk_chibios-confmigrate] )) || _qmk_chibios-confmigrate() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-f --force)'{-f,--force}'[Re-migrates an already migrated file, even if it does not detect a full ChibiOS config]' \ '(-d --delete)'{-d,--delete}'[If the file has no overrides, migration will delete the input file]' \ '(-o --overwrite)'{-o,--overwrite}'[Overwrites the input file during migration]' \ '(-r --reference)'{-r,--reference}'[Specify the reference file to compare against]:reference' \ '(-i --input)'{-i,--input}'[Specify input config file]: :_files' } (( $+functions[_qmk_clean] )) || _qmk_clean() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-a --all)'{-a,--all}'[Remove *.hex and *.bin files in the QMK root as well]' } (( $+functions[_qmk_compile] )) || _qmk_compile() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \ \*{-e,--env}'[Set a variable to be passed to make]:env' \ '(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \ '(-n --dry-run)'{-n,--dry-run}"[Don't actually build, just show the make command to be run]" \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '*: :_files' } (( $+functions[_qmk_doctor] )) || _qmk_doctor() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-n --no -y --yes)'{-n,--no}'[Answer no to all questions]' \ '(-n --no -y --yes)'{-y,--yes}'[Answer yes to all questions]' } (( $+functions[_qmk_flash] )) || _qmk_flash() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \ \*{-e,--env}'[Set a variable to be passed to make]:env' \ '(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs; 0 means unlimited]' \ '(-n --dry-run)'{-n,--dry-run}"[Don't actually build, just show the make command to be run]" \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-m --mcu)'{-m,--mcu}'[The MCS name]:mcu' \ '(-bl --bootloader)'{-bl,--bootloader}"[The flash command, corresponding to qmk's make options of bootloaders]:bootloader" \ '(-b --bootloaders)'{-b,--bootloaders}'[List the available bootloaders]' \ '*: :_files' } (( $+functions[_qmk_generate-autocorrect-data] )) || _qmk_generate-autocorrect-data() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '*: :_files' } (( $+functions[_qmk_generate-compilation-database] )) || _qmk_generate-compilation-database() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-km --keymap)'{-km,--keymap}'[The keymap to build a firmware for]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' } (( $+functions[_qmk_generate-community-modules-rules-mk] )) || _qmk_generate-community-modules-rules-mk() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-e --escape)'{-e,--escape}'[Escape spaces in quiet mode]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-community-modules-h] )) || _qmk_generate-community-modules-h() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-community-modules-c] )) || _qmk_generate-community-modules-c() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-community-modules-introspection-h] )) || _qmk_generate-community-modules-introspection-h() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-community-modules-introspection-c] )) || _qmk_generate-community-modules-introspection-c() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-led-matrix-community-modules-inc] )) || _qmk_generate-led-matrix-community-modules-inc() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-rgb-matrix-community-modules-inc] )) || _qmk_generate-rgb-matrix-community-modules-inc() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[The keyboard to build a firmware for]:keyboard' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-keymap-h] )) || _qmk_generate-keymap-h() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]:file:_files' \ '*: :_files' } (( $+functions[_qmk_generate-rgb-breathe-table] )) || _qmk_generate-rgb-breathe-table(){ _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error messages]' \ '(-o --output)'{-o,--output}'[File to write to]: :_files' \ '(-m --max)'{-m,--max}'[The breathing maximum value, from 0 to 255]:num' \ '(-c --center)'{-c,--center}'[The breathing center value, from 1 to 2.7]:num' } (( $+functions[_qmk_git-submodule] )) || _qmk_git-submodule() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-f --force)'{-f,--force}'[Flag to remove unexpected directories]' \ '--sync[Shallow clone any missing submodules]' \ '--check[Check if the submodules are dirty, and display a warning if they are]' \ '*: :_files' } (( $+functions[_qmk_import-kbfirmware] )) || _qmk_import-kbfirmware() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '*: :_files' } (( $+functions[_qmk_import-keyboard] )) || _qmk_import-keyboard() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '*: :_files' } (( $+functions[_qmk_import-keymap] )) || _qmk_import-keymap() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '*: :_files' } (( $+functions[_qmk_info] )) || _qmk_info() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-r --rules-mk)'{-r,--rules-mk}"[Render the parsed values of the keyboard's rules.mk file]" \ '--ascii[Render layout box drawings in ASCII only]' \ '(-f --format)'{-f,--format}'[Format to display the data]: :(friendly text json)' \ '(-m --matrix)'{-m,--matrix}'[Render the layouts with matrix information]'\ '(-l --layouts)'{-l,--layouts}'[Render the layouts]' \ '(-km --keymap)'{-km,--keymap}'[Keymap to show info for(Optional)]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[Keyboard to show info for]:keyboard' } (( $+functions[_qmk_json2c] )) || _qmk_json2c(){ _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error messages]' \ '(-o --output)'{-o,--output}'[File to write to]: :_files' \ '*: :_files' } (( $+functions[_qmk_lint] )) || _qmk_lint(){ _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '--all-km[Check all keymaps]' \ '--all-kb[Check all keyboards]' \ '(-km --keymap)'{-km,--keymap}'[The keymap to check]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[Comma separated list of keyboards to check]:keyboards' \ '--strict[Treat warnings as errors]' } (( $+functions[_qmk_list-keyboards] )) || _qmk_list-keyboards() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' } (( $+functions[_qmk_list-keymaps] )) || _qmk_list-keymaps() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[Specify keyboard name]:keyboard' } (( $+functions[_qmk_list-layouts] )) || _qmk_list-layouts() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-kb --keyboard)'{-kb,--keyboard}'[Specify keyboard name]:keyboard' } (( $+functions[_qmk_new-keyboard] )) || _qmk_new-keyboard() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-n --realname)'{-n,--realname}'[Specify your real name if you want to use that]:real_name' \ '(-u --username)'{-u,--username}'[Specify your user name]:user_name' \ '(-t --type)'{-t,--type}'[Specify the keyboard MCU type]:type' \ '(-l --layout)'{-l,--layout}'[Community layout to bootstrap with]:layout' \ '(-kb --keyboard)'{-kb,--keyboard}'[Specify the name for the new keyboard directory]:keyboard' } (( $+functions[_qmk_new-keymap] )) || _qmk_new-keymap() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-km --keymap)'{-km,--keymap}'[Specify the name for the keymap directory]:keymap' \ '(-kb --keyboard)'{-kb,--keyboard}'[Specify keyboard name]:keyboard' } (( $+functions[_qmk_painter-convert-graphics] )) || _qmk_painter-convert-graphics() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-d --no-deltas)'{-d,--no-deltas}'[Disable the use of delta frames when encoding animations]' \ '(-r --no-rle)'{-r,--no-rle}'[Disables the use of RLE when encoding images]' \ '(-f --format)'{-f,--format}'[Output format]: :(pal256 pal16 pal4 pal2 mono256 mono16 mono4 mono2)' \ '(-o --output)'{-o,--output}'[Specify output directory]: :_files -/' \ '(-i --input)'{-i,--input}'[Specify input graphic file]: :_files' \ '(-v --verbose)'{-v,--verbose}'[Turns on verbose output]' } (( $+functions[_qmk_painter-make-font-image] )) || _qmk_painter-make-font-image() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-a --no-aa)'{-a,--no-aa}'[Disable anti-aliasing on fonts]' \ '(-u --unicode-glyphs)'{-u,--unicode-glyphs}'[Also generate the specified unicode glyphs]:unicode_glyphs' \ '(-n --no-ascii)'{-n,--no-ascii}'[Disable output of the full ASCII character set, exporting only the glyphs specified]' \ '(-s --size)'{-s,--size}'[Specify font size]:font_size' \ '(-o --output)'{-o,--output}'[Specify output image path]: :_files' \ '(-f --font)'{-f,--font}'[Specify input font file]: :_files' } (( $+functions[_qmk_painter-convert-font-image] )) || _qmk_painter-convert-font-image() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-r --no-rle)'{-r,--no-rle}'[Disables the use of RLE when encoding images]' \ '(-f --format)'{-f,--format}'[Output format]: :(pal256 pal16 pal4 pal2 mono256 mono16 mono4 mono2)' \ '(-u --unicode-glyphs)'{-u,--unicode-glyphs}'[Also generate the specified unicode glyphs]:unicode_glyphs' \ '(-n --no-ascii)'{-n,--no-ascii}'[Disable output of the full ASCII character set, exporting only the glyphs specified]' \ '(-o --output)'{-o,--output}'[Specify output directory]: :_files -/' \ '(-i --input)'{-i,--input}'[Specify input graphic file]: :_files' } (( $+functions[_qmk_resolve-alias] )) || _qmk_resolve-alias() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '--allow-unknown[Return original if rule is not a valid keyboard]' } (( $+functions[_qmk_userspace-doctor] )) || _qmk_userspace-doctor() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' } (( $+functions[_qmk_userspace-add] )) || _qmk_userspace-add() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ \*{-e,--env}'[Extra variables to set during build]:env' \ '(-km --keymap)'{-km,--keymap}"[The keymap's name]" \ '(-kb --keyboard)'{-kb,--keyboard}"[The keyboard's name]" } (( $+functions[_qmk_userspace-remove] )) || _qmk_userspace-remove() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ \*{-e,--env}'[Extra variables to set during build]:env' \ '(-km --keymap)'{-km,--keymap}"[The keymap's name]" \ '(-kb --keyboard)'{-kb,--keyboard}"[The keyboard's name]" } (( $+functions[_qmk_userspace-list] )) || _qmk_userspace-list() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-e --expand)'{-e,--expand}'[Expands any use of "all" for either keyboard or keymap]' } (( $+functions[_qmk_userspace-compile] )) || _qmk_userspace-compile() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ \*{-e,--env}'[Extra variables to set during build]:env' \ '(-p --print-failures)'{-p,--print-failures}'[Print failed builds]' \ '(-n --dry-run)'{-n,--dry-run}'[Do not actually build, just show the commands to be run]' \ '(-c --clean)'{-c,--clean}'[Remove object files before compiling]' \ '(-j --parallel)'{-j,--parallel}'[Set the number of parallel make jobs, 0 means unlimited]:parallel' \ '(-t --no-temp)'{-t,--no-temp}'[Remove temporary files during build]' } (( $+functions[_qmk_via2json] )) || _qmk_via2json() { _arguments \ '(- *)'{-h,--help}'[show help message and exit]' \ '(-l --layout)'{-l,--layout}"[The keymap's layout]" \ '(-km --keymap)'{-km,--keymap}"[The keymap's name]" \ '(-kb --keyboard)'{-kb,--keyboard}"[The keyboard's name]" \ '(-q --quiet)'{-q,--quiet}'[Quiet mode, only output error message]' \ '(-o --output)'{-o,--output}'[File to write to]: :_files' } _qmk "$@" # 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 ================================================ FILE: src/_rails ================================================ #compdef rails # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Ruby on Rails 8.1.0 (https://rubyonrails.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Kazuya Takeshima (https://github.com/mitukiii) # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _rails() { local context state state_descr line curcontext="$curcontext" typeset -A opt_args local -a runtime_options rails_options runtime_options=( '(- *)'{-h,--help}'[Show this help message and quit]' '(- *)'{-v,--version}'[Show Rails version and quit]' ) rails_options=( '(-f --force)'{-f,--force}'[Overwrite files that already exist]' '(-p --pretend)'{-p,--pretend}'[Run but do not make any changes]' '(-q --quiet)'{-q,--quiet}'[Suppress status output]' '(-s --skip)'{-s,--skip}'[Skip files that already exist]' ) local ret=1 _arguments -C \ $runtime_options \ '1: :_rails_subcommands' \ '*:: :->command' && ret=0 case "$state" in (command) case $words[1] in (new) _rails_new && ret=0 ;; (generate|g|destroy|d) _rails_generate && ret=0 ;; (console|c) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '(-e --environment)'{-e,--environment=}'[The environment to run "console" in]:env:(test development production)' \ '(-s --sandbox)'{-s,--sandbox}'[Rollback database modifications on exit]' \ && ret=0 ;; (server|s) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '(-e --environment)'{-e,--environment=}'[The environment to run "server" in]:env:(test development production)' \ '(-p --port)'{-p,--port}'[Run Rails on the specified port]:port' \ '(-b --binding)'{-b,--binding=}'[Bind Rails to the specified IP]:binding' \ '(-c --config)'{-c,--config=}'[Use a custom rackup configuration]:config file:_files -g "*.ru"' \ '(-d --daemon)'{-d,--daemon}'[Run server as a Daemon]' \ '(-u --using)'{-u,--using=}'[Specify the Rack server used to run the application]:server:(thin puma webrick)' \ '(-P --pid)'{-P,--pid=}'[Specify the PID file]:pid file:_files -g "*.pid"' \ '(-C --dev-caching --no-dev-caching)'{-C,--dev-caching}'[Perform caching in development]' \ '(-C --dev-caching --no-dev-caching)--no-dev-caching[Not perform caching in development]' \ '--early-hints[Enable HTTP/2 early hints]' \ '(--log-to-stdout --no-log-to-stdout)--log-to-stdout[Log to stdout]' \ '(--log-to-stdout --no-log-to-stdout)--no-log-to-stdout[Not log to stdout]' \ && ret=0 ;; (dbconsole|db) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '(-e --environment)'{-e,--environment=}'[The environment to run "server" in]:env:(test development production)' \ '(-p --include-password)'{-p,--include-password}'[Automatically provide the password from database.yml]' \ '--mode=[Automatically put the sqlite3 database in the specified mode]:mode:(html list line column)' \ '(--header --no-header)--header[Display header]' \ '(--header --no-header)--no-header[Not display header]' \ '(--db --database)'{--db=,--database=}'[Specify the database to use]:database:_files' \ && ret=0 ;; (test|t|test:system) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '--no-plugins[Bypass minitest plugin auto-loading]' \ '(-s --seed)'{-s,--seed=}'[Sets random seed]:seed' \ '(-v --verbose -q --quiet)'{-v,--verbose}'[Show progress processing files]' \ '(-v --verbose -q --quiet)'{-q,--quiet}'[Show no progress processing files]' \ '--show-skips[Show skipped at the end of run]' \ \*{-n,--name=}'[Filter run on /regexp/ or string]:pattern' \ *--exclude='[Exclude /regexp/ or string from run]:pattern' \ \*{-S,--skip=}'[Skip reporting of certain types of results]' \ '-W[Turn Ruby warnings into errors]' \ '(-w --warnings)'{-w,--warnings}'[Run with Ruby warnings enabled]' \ '(-e --environment)'{-e,--environment=}'[Run tests in the given environment]:environment' \ '(-b --backtrace)'{-b,--backtrace}'[Show the complete backtrace]' \ '(-d --defer-output)'{-d,--defer-output}'[Output test failures and errors after the test run]' \ '(-f --fail-fast)'{-f,--fail-fast}'[Abort test run on first failure or error]' \ '(-c --color --no-color)'{-c,--color}'[Enable color in the output]' \ '(-c --color --no-color)--no-color[Disable color in the output]' \ '--profile=[Enable profiling of tests and list the slowest test cases]:count' \ '(-p --pride)'{-p,--pride}'[Show your testing pride]' \ '*:: :_files -g "*.rb"' \ && ret=0 ;; (runner|r) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '(-e --environment)'{-e,--environment=}'[The environment to run "runner"]:env:(test development production)' \ '(-w --skip-executor)'{-w,--skip-executor}'[Do not wrap with Rails Executor]' \ '*:: :_files -g "*.rb"' \ && ret=0 ;; (plugin) _arguments \ '1: :(new)' \ '*:: :_rails_new' \ && ret=0 ;; (routes) _arguments \ '(- *)'{-h,--help}'[Show this help message and quit]' \ '(-c --controller)'{-c,--controller=}'[Filter by a specific controller]:controller' \ '(-g --grep)'{-g,--grep}'[Grep routes by a specific pattern]' \ '(-E --expanded)'{-E,--expanded}'[Print routes expanded vertically with parts explained]' \ '(-u --unused)'{-u,--unused}'[Print unused routes]' \ && ret=0 ;; (*) _arguments \ '(- *)'{-h,--help}'[Show help message and quit]' \ '*:: :_files' \ && ret=0 ;; esac ;; esac return ret } (( $+functions[_rails_subcommands] )) || _rails_subcommands() { local -a commands _rails_is_in_app if (( $? == 1 )); then # is not in rails app directory commands=( new'[Create a new Rails application]' ) else commands=( {generate,g}'[Generate new code]' {console,c}'[Start the Rails console]' {server,s}'[Start the Rails server]' {test,t}'[Run tests]' "test\\:system[Run systems test only]" {dbconsole,db}'[Start a console for the database specified in config/database.yml]' plugin'[Install a plugin]' # generated by ./bin/rails --help | ruby -ne '(b=$2;printf("\"%s[%s]\"\n", $1.gsub(/:/,"\\:"),b.strip.gsub(/"/,"\\\"").gsub(/`/, "\\\""))) if /^([a-z0-9_:]+)\S*\s+([^(\n]+)/' "about[List versions of all Rails frameworks and the environment]" "action_mailbox\:ingress\:exim[Relay an inbound email from Exim to Action Mailbox]" "action_mailbox\:ingress\:postfix[Relay an inbound email from Postfix to Action Mailbox]" "action_mailbox\:ingress\:qmail[Relay an inbound email from Qmail to Action Mailbox]" "action_mailbox\:install[Install Action Mailbox and its dependencies]" "action_mailbox\:install\:migrations[Copy migrations from action_mailbox to application]" "action_text\:install[Copy over the migration, stylesheet, and JavaScript files]" "action_text\:install\:migrations[Copy migrations from action_text to application]" "active_storage\:install[Copy over the migration needed to the application]" "app\:template[Apply the template supplied by LOCATION=]" "app\:update[Update configs and some other initially generated files]" "assets\:clean[Remove old compiled assets]" "assets\:clobber[Remove compiled assets]" "assets\:environment[Load asset compile environment]" "assets\:precompile[Compile all the assets named in config.assets.precompile]" "boot[Boot the application and exit]" "cache_digests\:dependencies[Lookup first-level dependencies for TEMPLATE]" "cache_digests\:nested_dependencies[Lookup nested dependencies for TEMPLATE]" "credentials\:diff[Enroll/disenroll in decrypted diffs of credentials using git]" "credentials\:edit[Open the decrypted credentials in \"$VISUAL\" or \"$EDITOR\" for editing]" "credentials\:show[Show the decrypted credentials]" "db\:create[Create the database from DATABASE_URL or config/database.yml for the current RAILS_ENV]" "db\:drop[Drop the database from DATABASE_URL or config/database.yml for the current RAILS_ENV]" "db\:encryption\:init[Generate a set of keys for configuring Active Record encryption in a given environment]" "db\:environment\:set[Set the environment value for the database]" "db\:fixtures\:load[Load fixtures into the current environment's database]" "db\:migrate[Migrate the database]" "db\:migrate\:down[Run the \"down\" for a given migration VERSION]" "db\:migrate\:redo[Roll back the database one migration and re-migrate up]" "db\:migrate\:status[Display status of migrations]" "db\:migrate\:up[Run the \"up\" for a given migration VERSION]" "db\:prepare[Run setup if database does not exist, or run migrations if it does]" "db\:reset[Drop and recreate all databases from their schema for the current environment and load the seeds]" "db\:rollback[Roll the schema back to the previous version]" "db\:schema\:cache\:clear[Clear a db/schema_cache.yml file]" "db\:schema\:cache\:dump[Create a db/schema_cache.yml file]" "db\:schema\:dump[Create a database schema file]" "db\:schema\:load[Load a database schema file]" "db\:seed[Load the seed data from db/seeds.rb]" "db\:seed\:replant[Truncate tables of each database for current environment and load the seeds]" "db\:setup[Create all databases, load all schemas, and initialize with the seed data]" "db\:system\:change[Change \"config/database.yml\" and your database gem to the target database]" "db\:version[Retrieve the current schema version number]" "destroy[Remove code generated by \"bin/rails generate\"]" "dev\:cache[Toggle development mode caching on/off]" "devcontainer[Generate a Dev Container setup based on current application configuration]" "encrypted\:edit[Open the decrypted file in \"$VISUAL\" or \"$EDITOR\" for editing]" "encrypted\:show[Show the decrypted contents of the file]" "importmap\:install[Setup Importmap for the app]" "initializers[Print out all defined initializers in the order they are invoked by Rails.]" "log\:clear[Truncate all/specified *.log files in log/ to zero bytes]" "middleware[Print out your Rack middleware stack]" "notes[Show comments in your code annotated with FIXME, OPTIMIZE, and TODO]" "restart[Restart app by touching tmp/restart.txt]" "routes[List all the defined routes]" "runner[Run Ruby code in the context of your application]" "secret[Generate a cryptographically secure secret key]" "stats[Report code statistics]" "stimulus\:install[Install Stimulus into the app]" "stimulus\:install\:bun[Install Stimulus on an app running bun]" "stimulus\:install\:importmap[Install Stimulus on an app running importmap-rails]" "stimulus\:install\:node[Install Stimulus on an app running node]" "stimulus\:manifest\:display[Show the current Stimulus manifest]" "stimulus\:manifest\:update[Update the Stimulus manifest]" "test\:all[Run all tests, including system tests]" "test\:channels[Run tests in test/channels]" "test\:controllers[Run tests in test/controllers]" "test\:db[Reset the database and run \"bin/rails test\"]" "test\:functionals[Run tests in test/controllers, test/mailers, and test/functional]" "test\:generators[Run tests in test/lib/generators]" "test\:helpers[Run tests in test/helpers]" "test\:integration[Run tests in test/integration]" "test\:jobs[Run tests in test/jobs]" "test\:mailboxes[Run tests in test/mailboxes]" "test\:mailers[Run tests in test/mailers]" "test\:models[Run tests in test/models]" "test\:units[Run tests in test/models, test/helpers, and test/unit]" "time\:zones[List all time zones, list by two-letter country code]" "tmp\:clear[Clear cache, socket and screenshot files from tmp/]" "tmp\:create[Create tmp directories for cache, sockets, and pids]" "turbo\:install[Install Turbo into the app]" "turbo\:install\:bun[Install Turbo into the app with bun]" "turbo\:install\:importmap[Install Turbo into the app with asset pipeline]" "turbo\:install\:node[Install Turbo into the app with webpacker]" "turbo\:install\:redis[Switch on Redis and use it in development]" "version[Show the Rails version]" "yarn\:install[Install all JavaScript dependencies as specified via Yarn]" "zeitwerk\:check[Check project structure for Zeitwerk compatibility]" ) fi _values 'command' $commands } # rails new (( $+functions[_rails_new] )) || _rails_new() { local ret=1 _arguments \ $runtime_options \ $rails_options \ --skip-namespace'[Skip namespace]' \ '(-n --name)'{-n,--name=}'[Name of the app]:name' \ '(-r --ruby)'{-r,--ruby=}'[Path to the Ruby binary of your choice]:path:_files' \ '(-b --builder)'{-b,--builder=}'[Path to a application builder(can be a filesystem path or URL)]: :_rails_path_or_url' \ '(-m --template)'{-m,--template=}'[Path to an application template(can be a filesystem path or URL)]: :_rails_path_or_url' \ '(-d --database)'{-d,--database=}'[Preconfigure for selected database]:database:(mysql trilogy oracle postgresql sqlite3 frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc mariadb-mysql mariadb-trilogy)' \ --skip-gemfile"[Don't create a Gemfile]" \ --skip-bundle"[Don't run bundle install]" \ '(-G --skip-git)'{-G,--skip-git}'[Skip git init]' \ --skip-docker'[Skip Dockerfile]' \ --skip-keeps'[Skip source control .keep files]' \ '(-M --skip-action-mailer)'{-M,--skip-action-mailer}'[Skip Action Mailer files]' \ --skip-action-mailbox'[Skip Action Mailbox gem]' \ --skip-action-text'[Skip Action Text gem]' \ '(-O --skip-active-record)'{-O,--skip-active-record}'[Skip Active Record files]' \ --skip-active-job'[Skip Active Job]' \ --skip-active-storage'[Skip Active Storage files]' \ '(-C --skip-action-cable)'{-C,--skip-action-cable}'[Skip Action Cable files]' \ '(-A --skip-asset-pipeline)'{-A,--skip-asset-pipeline}'[Skip asset pipeline]' \ '(-a --asset-pipeline)'{-a,--asset-pipeline=}'[Choose your asset pipeline]:asset pipeline:(sprockets propshaft)' \ '(-J --skip-js)'{-J,--skip-js}'[Skip JavaScript files]' \ --skip-hotwire'[Skip Hotwire integration]' \ --skip-jbuilder'[Skip jbuilder gem]' \ '(-T --skip-test)'{-T,--skip-test}'[Skip test files]' \ --skip-system-test'[Skip system test files]' \ --skip-bootsnap'[Skip bootsnap gem]' \ --skip-dev-gems'[Skip development gems(e.g. web-console)]' \ --skip-rubocop'[Skip RuboCop setup]' \ --skip-brakeman'[Skip brakeman setup]' \ --skip-bundler-audit'[Skip bundler-audit setup]' \ --skip-ci'[Skip GitHub CI files]' \ --dev'[Setup the application with Gemfile pointing to your Rails checkout]' \ --devcontainer'[Generate devcontainer files]' \ --edge'[Setup the application with Gemfile pointing to Rails repository]' \ '(--main --master)'{--main,--master}'[Set up the application with Gemfile pointing to Rails repository main branch]' \ --rc='[Path to file containing extra configuration options for rails command]:rc:_files' \ --api'[Preconfigure smaller stack for API only apps]' \ --minimal'[Preconfigure a minimal rails app]' \ '(-j --js)'{-j,--js=}'[Choose JavaScript approach]:javascript:(importmap bun webpack esbuild rollup)' \ '(-c --css)'{-c,--css=}'[Choose CSS processor]:css processor:(tailwind bootstrap bulma postcss sass)' \ '(-B --skip-bundle)'{-B,--skip-bundle}"[Don't run bundle install]" \ --skip-decrypted-diffs"[Don't configure git to show decrypted diffs of encrypted credentials]" \ ':app path:_directories' && ret=0 return ret } # rails generate (( $+functions[_rails_generate] )) || _rails_generate() { local ret=1 _arguments -C \ '(- *)'{-h,--help}"[Print generator's options and usage]" \ $runtime_options \ '1:generator:_rails_generate_generator' \ '*:: :->generate' && ret=0 case "$state" in (generate) local -a opts opts=( '(- *)'{-h,--help}'[Show this help message and quit]' $runtime_options '--skip-namespace[Skip namespace]' '--skip-collision-check[Skip collision check]' ) case $words[1] in (application_record|migration|model|resource|scaffold|scaffold_controller) opts+=( '(-o --orm)'{-o,--orm=}'[ORM to be invoked]:orm:(active_record)' ) ;| (channel) opts+=( '--no-assets[Not generate assets]' ) ;| (controller|resource|scaffold|scaffold_controller) opts+=( '--skip-routes[Do not add routes to config/routes.rb]' '--no-helper[Not generate helper]' ) ;| (controller|job|model|resource|scaffold) opts+=( '--parent=[The parent class for the generated controller]:parent class' ) ;| (controller|mailer|resource|scaffold|scaffold_controller) opts+=( '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:engine:(erb)' ) ;| (channel|controller|generator|helper|job|mailbox|mailer|model|scaffold|scaffold_controller) opts+=( '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test_framework:(test_unit)' ) ;| (generator|test_unit:channel) opts+=( '--no-namespace[Not generate namespace generate]' ) ;| (integration_test) opts+=( '--integration-tool=[Integration tool to be invoked]:tool:(test_unit)' ) ;| (jbuilder|resource|scaffold|scaffold_controller) opts+=( '--model-name=[ModelName to be used]:name' ) ;| (jbuilder|model|resource|scaffold|scaffold_controller) opts+=( '--force-plural[Do not singularize the model name]' ) ;| (jbuilder|migration|model|resource|scaffold_controller) opts+=( '--no-timestamps[Not generate timestamps]' ) ;| (job) opts+=( '--queue=[The queue name for the generated job]:name' ) ;| (migration|model|resource|scaffold) opts+=( '--primary-key-type=[The type for primary key]' '(--db --database)'{--db,--database=}'[The database for your migration]:db' ) ;| (model|resource|scaffold) opts+=( '--no-migration[Not generate migration]' '--no-indexes[Not add indexes for references and belongs_to columns]' '--no-fixture[Not generate fixture]' '(-r --fixture-replacement)'{-r,--fixture-replacement=}'[Fixture replacement to be invoked]:fixture' ) ;| (resource) opts+=( '(-c --resource-controller)'{-c,--resource-controller=}'[Resource controller to be invoked]:controller:(controller)' '(-a --actions)'{-a,--actions=}'[Actions for the source controller]:action' ) ;| (resource|scaffold|scaffold_controller) opts+=( '--no-resource-route[Not generate resource route]' ) ;| (scaffold) opts+=( '(-c --scaffold-controller)'{-c,--scaffold-controller=}'[Scaffold controller to be invoked]:controller:(scaffold_controller)' ) ;| (scaffold|scaffold_controller) opts+=( '--api[Generate API-only controller and tests, with no view templates]' '--no-jbuilder[Not generate jbuilder]' ) ;| (scaffold|scaffold_controller|system_test) opts+=( '--system-tests=[System test framework to be invoked]:framework:(test_unit)' ) ;| (stimulus) opts+=( '--skip-manifest[Do not update the stimulus manifest]' ) ;| (jbuilder|migration|resource|scaffold) opts+=( '*:field:_rails_migration_fields' ) ;| esac _arguments $opts && ret=0 ;; esac return ret } (( $+functions[_rails_generate_generator] )) || _rails_generate_generator() { local -a generators=( # rails application_record benchmark channel controller generator helper integration_test jbuilder job mailbox mailer migration model resource scaffold scaffold_controller system_test task # active record "active_record\\:application_record" "active_record\\:multi_db" # Stimulus stimulus # TestUnit "test_unit\\:channel" "test_unit\\:generator" "test_unit\\:install" "test_unit\\:mailbox" "test_unit\\:plugin" ) _values 'generators' $generators } # Utilities (( $+functions[_rails_is_in_app] )) || _rails_is_in_app() { local dir="$PWD" while [ -n "$dir" ]; do if [[ -f "${dir}/bin/rails" ]]; then return 0 fi dir="${dir%/*}" done return 1 } (( $+functions[_rails_path_or_url] )) || _rails_path_or_url() { _alternative \ 'files:path:_files -g "*.rb"' \ 'url:url:_urls' } (( $+functions[_rails_migration_fields] )) || _rails_migration_fields() { if compset -P '*:*:'; then _values 'index' 'index' 'uniq' else if compset -P '*:'; then _values -s ':' 'type' 'string' 'text' 'integer' 'float' 'decimal' 'datetime' 'timestamp' 'time' 'date' 'binary' 'boolean' 'references' else _guard '[[:alnum:]_]#' 'field' fi fi } _rails "$@" # 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 ================================================ FILE: src/_ralio ================================================ #compdef ralio # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 ralio (https://github.com/oesmith/ralio) # a Rally client # # ------------------------------------------------------------------------------ # Authors # ------- # # * Peter Yates # # ------------------------------------------------------------------------------ _ralio () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands=( "backlog:Show the product backlog" "sprint:Show the current team iteration" "show:Show related information for an individual story, defect or task" "open:Open a story, defect or task in a web browser" "start:Set a task, defect or story state to in-progress and assign it to you" "finish:Set a task, defect or story state to completed and assign it to you" "abandon:Set a task, defect or story state to defined and clear the owner" "block:Set a task, defect or story state to blocked" "unblock:Set a task, defect or story state to unblocked" "current:Show your current tasks and stories" "point:Set the points for a story or defect" "task:Allow you to create and delete story tasks." "configure:Set your Rally configurations." ) _describe -t commands 'ralio commands' subcommands _arguments \ {-V,--version}"[display version information]" \ {-h,--help}"[output usage information]" ;; (options) case $line[1] in (sprint) _arguments \ "-t[Show tasks]" \ "-p[Project name]" \ "-f[Filter results]" ;; (start | finish) _arguments \ '--pair[Pair programming partner]' \ "--resolution[Resolution status]" \ "--rootcause[Root cause]" ;; (task) __ralio-task ;; esac ;; esac } __ralio-task () { local curcontext="$curcontext" state line typeset -A opt_args _arguments \ ':command:->command' \ '*::options:->options' case $state in (command) local -a subcommands=( "create:Create a new task" "delete:Delete a task" ) _describe -t commands 'ralio task' subcommands ;; (options) case $line[1] in (create|delete) _arguments \ -n"[Name of the new task]" \ -t"[Name of the parent task]" ;; esac ;; esac } _ralio "$@" # 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 ================================================ FILE: src/_rdfind ================================================ #compdef rdfind # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for rdfind (https://rdfind.pauldreik.se/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hydrargyrum (https://github.com/hydrargyrum) # # ------------------------------------------------------------------------------ _arguments \ "-ignoreempty[ignore empty files]:flag:(true false)" \ "-minsize[ignore files with less than N bytes]: :_numbers -d 1" \ "-maxsize[ignore files with N bytes or more]: :_numbers" \ "-followsymlinks[follow symlinks]:flag:(true false)" \ "-removeidentinode[remove items found which have identical inode and device ID]:flag:(true false)" \ "-checksum[type of checksum to be used]:algo:(md5 sha1 sha256 sha512)" \ "-deterministic[if set (the default), sort files of equal rank in an unspecified but deterministic order]:flag:(true false)" \ "(-makehardlinks -deleteduplicates)-makesymlinks[replace duplicate files with symbolic links]:flag:(true false)" \ "(-makesymlinks -deleteduplicates)-makehardlinks[replace duplicate files with hard links]:flag:(true false)" \ "(-makehardlinks -makesymlinks)-deleteduplicates[delete (unlink) files]:flag:(true false)" \ "-makeresultsfile[make a results file in the current directory]:flag:(true false)" \ "-outputname[make the results file name to be \"name\" instead of the default results.txt]:name" \ "(-n -dryrun)"{-n,-dryrun}"[display what should have been done, don’t actually delete or link anything]:flag:(true false)" \ "-sleep[sleeps X milliseconds between reading each file, to reduce load]: :_numbers -u ms -d 0" \ "(-h -help --help)"{-h,-help,--help}"[display a brief help message]" \ "(-v -version --version)"{-v,-version,--version}"[display the version number]" \ "*:file or directory:_files" # 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 ================================================ FILE: src/_redis-cli ================================================ #compdef redis-cli rec # ------------------------------------------------------------------------------ # Copyright (c) 2009-2015 Robby Russell and contributors (see # https://github.com/ohmyzsh/ohmyzsh/graphs/contributors) # # 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 Redis (https://redis.io/). # # Source: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/redis-cli # # ------------------------------------------------------------------------------ # Authors # ------- # # * Alexandru Totolici (https://github.com/totolici) # # ------------------------------------------------------------------------------ local -a redis_commands=( 'append:append a value to a key' 'auth:authenticate to the server' 'bgrewriteeaof:asynchronously rewrite the append-only file' 'bgsave:asynchronously save the dataset to disk' 'blpop:remove and get the first element in a list, or block until one is available' 'brpop:remove and get the last element in a list, or block until one is available' 'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available' # 'config get:get the value of a configuration parameter' # 'config set:set a configuration parameter to the given value' # 'config resetstat: reset the stats returned by INFO' 'dbsize:return the number of keys in the selected database' # 'debug object:get debugging information about a key' # 'debug setgfault:make the server crash' 'decr:decrement the integer value of a key by one' 'decrby:decrement the integer value of a key by the given number' 'del:delete a key' 'discard:discard all commands issued after MULTI' 'echo:echo the given string' 'exec:execute all commands issued after a MULTI' 'exists:determine if a key exists' 'expire:set the time to live for a key, in seconds' 'expireat:set the expiration for a key as a UNIX timestamp' 'flushall:remove all keys from all databases' 'flushdb:remove all keys from the current database' 'get:get the value of a key' 'getbit:returns the bit value at offset in the string value stored at key' 'getrange:get a substring of the string stored at a key' 'getset:set the string value of a key and return its old value' 'hdel:delete a hash field' 'hexists:determine if a hash field exists' 'hget:get the value of a hash field' 'hgetall:get all the fields and values in a hash' 'hincrby:increment the integer value of a hash field by the given number' 'hkeys:get all the fields in a hash' 'hlen:get the number of fields in a hash' 'hmget:get the values of all the given hash fields' 'hmset:set multiple hash fields to multiple values' 'hset:set the string value of a hash field' 'hsetnx:set the value of a hash field, only if the field does not exist' 'hvals:get all the values in a hash' 'incr:increment the integer value of a key by one' 'incrby:increment the integer value of a key by the given number' 'info:get information and statistics about the server' 'keys:find all keys matching the given pattern' 'lastsave:get the UNIX timestamp of the last successful save to disk' 'lindex:get an element from a list by its index' 'linsert:insert an element before or after another element in a list' 'llen:get the length of a list' 'lpop:remove and get the first element in a list' 'lpush:prepend a value to a list' 'lpushx:prepend a value to a list, only if the list exists' 'lrange:get a range of elements from a list' 'lrem:remove elements from a list' 'lset:set the value of an element in a list by its index' 'ltrim:trim a list to the specified range' 'mget:get the values of all the given keys' 'monitor:listen for all requests received by the server in real time' 'move:move a key to another database' 'mset:set multiple keys to multiple values' 'msetnx:set multiple keys to multiple values, only if none of the keys exist' 'multi:mark the start of a transaction block' 'object:inspect the internals of Redis objects' 'persist:remove the expiration from a key' 'ping:ping the server' 'psubscribe:listen for messages published to channels matching the given patterns' 'publish:post a message to a channel' 'punsubscribe:stop listening for messages posted to channels matching the given patterns' 'quit:close the connection' 'randomkey:return a random key from the keyspace' 'rename:rename a key' 'renamenx:rename a key, only if the new key does not exist' 'rpop:remove and get the last element in a list' 'rpoplpush:remove the last element in a list, append it to another list and return it' 'rpush:append a value to a list' 'rpushx:append a value to a list, only if the list exists' 'sadd:add a member to a set' 'save:synchronously save the dataset to disk' 'scard:get the number of members in a set' 'sdiff:subtract multiple sets' 'sdiffstore:subtract multiple sets and store the resulting set in a key' 'select:change the selected database for the current connection' 'set:set the string value of a key' 'setbit:sets or clears the bit at offset in the string value stored at key' 'setex:set the value and expiration of a key' 'setnx:set the value of a key, only if the key does not exist' 'setrange:overwrite part of a string at key starting at the specified offset' 'shutdown:synchronously save the dataset to disk and then shut down the server' 'sinter:intersect multiple sets' 'sinterstore:intersect multiple sets and store the resulting set in a key' 'sismember:determine if a given value is a member of a set' 'slaveof:make the server a slave of another instance, or promote it as master' 'smembers:get all the members in a set' 'smove:move a member from one set to another' 'sort:sort the elements in a list, set or sorted set' 'spop:remove and return a random member from a set' 'srandmember:get a random member from a set' 'srem:remove a member from a set' 'strlen:get the length of the value stored in a key' 'subscribe:listen for messages published to the given channels' 'sunion:add multiple sets' 'sunionstore:add multiple sets and store the resulting set in a key' 'ttl:get the time to live for a key' 'type:determine the type stored at key' 'unsubscribe:stop listening for messages posted to the given channels' 'unwatch:forget about all watched keys' 'watch:watch the given keys to determine execution of the MULTI/EXEC block' 'zadd:add a member to a sorted set, or update its score if it already exists' 'zcard:get the number of members in a sorted set' 'zcount:count the members in a sorted set with scores within the given values' 'zincrby:increment the score of a member in a sorted set' 'zinterstore:intersect multiple sorted sets and store the resulting sorted set in a new key' 'zrange:return a range of members in a sorted set, by index' 'zrangebyscore:return a range of members in a sorted set, by score' 'zrank:determine the index of a member in a sorted set' 'zrem:remove a member from a sorted set' 'zremrangebyrank:remove all members in a sorted set within the given indexes' 'zremrangebyscore:remove all members in a sorted set within the given scores' 'zrevrange:return a range of members in a sorted set, by index, with scores ordered from high to low' 'zrevrangebyscore:return a range of members in a sorted set, by score, with scores ordered from high to low' 'zrevrank:determine the index of a member in a sorted set, with scores ordered from high to low' 'zscore:get the score associated with the given member in a sorted set' 'zunionstore:add multiple sorted sets and store the resulting sorted set in a new key' ) _arguments \ '(-v --version)'{-v,--version}'[show version]' \ '(-h --help)'{-h,--help}'[show help]' \ '1::command:{ _describe -t commands "redis-cli subcommand" redis_commands }' \ && 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 ================================================ FILE: src/_rev ================================================ #compdef rev # ------------------------------------------------------------------------------ # 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 rev v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[display this help]' \ '(- *)'{-V,--version}'[display version]' \ '(-0 --zero)'{-0,--zero}'[use the nul character as line separator]' # 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 ================================================ FILE: src/_rfkill ================================================ #compdef rfkill # ------------------------------------------------------------------------------ # Copyright (c) 2014 Vincent Bernat # Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for rfkill 2.38.1 (https://wireless.wiki.kernel.org/en/users/Documentation/rfkill) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Vincent Bernat # * Shohei YOSHIDA # # ------------------------------------------------------------------------------ _rfkill_types() { local -a devicetypes=(all "wifi:Wireless LAN" "wlan:Wireless LAN" "bluetooth:Bluetooth" "uwb:Ultrawide Band" "ultrawideband:Ultrawide Band" "wimax:Wimax" "wwan:3G" "gps:GPS" "fm:FM Radio" "nfc:NFC") _describe -t device-types "device types" devicetypes } _rfkill_devices() { local -a devices=(${(M)${(f)"$(rfkill list)"}:#[0-9]*}) _rfkill_types _describe -t devices "devices" devices } _rfkill_columns() { local -a columns=(DEVICE ID TYPE TYPE-DESC SOFT HARD) _values -s ',' 'column' $columns } _rfkill_command() { local -a commands=( 'help:display help text and exit' 'event:listen for rfkill events and display them on stdout' 'list:list the current state of all available devices' 'block:disable the corresponding device' 'unblock:enable the corresponding device' 'toggle:enable or disable the corresponding device' ) _describe -t commands 'command' commands "$@" } _rfkill_subcommand() { case "$words[1]" in (list) _arguments ':types:_rfkill_types' ;; (block|unblock|toggle) _arguments ':device:_rfkill_devices' ;; esac } _rfkill () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C \ '(* -)'{-h,--help}'[display help]' \ '(* -)'{-V,--version}'[get version]' \ '(-J --json -r --raw)'{-J,--json}'[use JSON output format]' \ '(-n --noheadings)'{-n,--noheadings}"[don't print headings]" \ '(-o --output --output-all)'{-o,--output}'[define which output columns to use]:column_list:_rfkill_columns' \ '(-o --output --output-all)--output-all[output all columns]' \ '(-J --json -r --raw)'{-r,--raw}'[use the raw output format]' \ '(-): :_rfkill_command' \ '(-)*:: :->arguments' case $state in (arguments) curcontext=${curcontext%:*:*}:rfkill-$words[1]: _rfkill_subcommand ;; esac } _rfkill "$@" # 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 ================================================ FILE: src/_rmlint ================================================ #compdef rmlint rmlint.sh -P rmlint.*.sh # Copyright (c) 2021 Github zsh-users - https://github.com/zsh-users # # Permission is hereby granted, without written agreement and without # licence or royalty fees, to use, copy, modify, and distribute this # software and to distribute modified versions of this software for any # purpose, provided that the above copyright notice and the following # two paragraphs appear in all copies of this software. # # In no event shall the Zsh Development Group be liable to any party for # direct, indirect, special, incidental, or consequential damages arising out # of the use of this software and its documentation, even if the Zsh # Development Group have been advised of the possibility of such damage. # # The Zsh Development Group specifically disclaim any warranties, including, # but not limited to, the implied warranties of merchantability and fitness # for a particular purpose. The software provided hereunder is on an "as is" # basis, and the Zsh Development Group have no obligation to provide # maintenance, support, updates, enhancements, or modifications. # # Description # ----------- # # Zsh completion for rmlint 2.10.1 (https://github.com/sahib/rmlint) # # Authors # ------- # # * oxiedi (https://github.com/oxiedi) (( $+functions[_rmlint_types] )) || _rmlint_types() { compset -P '*[+-]' # FIXME: all values before `-` are swallowed by `*`, which breaks deduplication of the swallowed values # TODO: respect `prefix-needed` _values -s ',' 'list [defaults]' \ 'all[enables all lint types]' \ 'defaults[enables all lint types, but nonstripped]' \ 'minimal[defaults minus emptyfiles and emptydirs]' \ 'minimaldirs[defaults minus emptyfiles, emptydirs and duplicates, but with duplicatedirs]' \ 'none[disable all lint types]' \ '(badids bi)'{badids,bi}'[find files with bad UID, GID or both]' \ '(badlinks bl)'{badlinks,bl}'[find bad symlinks pointing nowhere valid]' \ '(emptydirs ed)'{emptydirs,ed}'[find empty directories]' \ '(emptyfiles ef)'{emptyfiles,ef}'[find empty files]' \ '(nonstripped ns)'{nonstripped,ns}'[find nonstripped binaries]' \ '(duplicates df)'{duplicates,df}'[find duplicate files]' \ '(duplicatedirs dd)'{duplicatedirs,dd}'[find duplicate directories (This is the same -D!)]' } (( $+functions[__rmlint_setup_formatter_descriptions] )) || __rmlint_setup_formatter_descriptions() { typeset -gA formatter_descriptions=( csv 'output all found lint as comma-separated-value list' sh 'output all found lint as shell script' json 'print a JSON-formatted dump of all found reports' py 'outputs a python script and a JSON document, just like the json formatter' uniques 'outputs all unique paths found during the run, one path per line' stamp 'outputs a timestamp of the time rmlint was run' progressbar 'shows a progressbar' pretty 'shows all found items in realtime nicely colored' summary 'shows counts of files and their respective size after the run. Also list all written output files' fdupes 'prints an output similar to the popular duplicate finder fdupes(1)' ) } (( $+functions[_rmlint_output] )) || _rmlint_output() { local -A formatter_descriptions __rmlint_setup_formatter_descriptions if compset -P "(${(kj:|:)formatter_descriptions}):"; then _alternative \ 'files:file:_files' \ 'outputs:output:(stdout stderr)' else local -a outputs local f d for f d in ${(kv)formatter_descriptions}; do outputs+=( "$f:$d" ) done _describe -t outputs 'output' outputs -S ':' -q fi } (( $+functions[_rmlint_config] )) || _rmlint_config() { local -A formatter_descriptions __rmlint_setup_formatter_descriptions unset 'formatter_descriptions['{py,pretty,summary}']' local -a match mbegin mend if compset -P "(#b)(${(kj:|:)formatter_descriptions}):"; then case $match[1] in (csv) _values 'option' \ 'no_header[do not write a first line describing the column headers]' \ 'unique[include unique files in the output]' ;; (sh) local context state state_descr line _values 'option' \ 'cmd[specify a user defined command to run on duplicates]: :_cmdstring' \ 'handler[define a comma separated list of handlers to try on duplicate files in that given order until one handler succeeds]:handler:->handler' \ 'link[shortcut for -c sh:handler=clone,reflink,hardlink,symlink]' \ 'hardlink[shortcut for -c sh:handler=hardlink,symlink]' \ 'symlink[shortcut for -c sh:handler=symlink]' case $state in (handler) _values -s ',' $state_descr \ 'clone[try to clone both files with the FIDEDUPERANGE ioctl(3p) (or BTRFS_IOC_FILE_EXTENT_SAME on older kernels)]' \ 'reflink[try to reflink the duplicate file to the original]' \ 'hardlink[replace the duplicate file with a hardlink to the original file]' \ 'symlink[tries to replace the duplicate file with a symbolic link to the original]' \ 'remove[remove the file using rm -rf]' \ 'usercmd[use the provided user defined command (-c sh:cmd=something)]' ;; esac ;; (json) _values 'option' \ 'unique[include unique files in the output]' \ 'no_header[print the header with metadata]:boolean [true]:(false true)' \ 'no_footer[print the footer with statistics]:boolean [true]:(false true)' \ 'oneline[print one json document per line]:boolean [false]:(true false)' ;; (uniques) _values 'option' \ 'print0[do not put newlines between paths but zero bytes]' ;; (stamp) _values 'option' \ 'iso8601[write an ISO8601 formatted timestamps or seconds since epoch]:boolean:(true false)' ;; (progressbar) _values 'option' \ 'update_interval[number of milliseconds to wait between updates (default: 50)]: :_guard "[0-9]#" "update interval (milliseconds) [50]"' \ 'ascii[do not attempt to use unicode characters, which might not be supported by some terminals]' \ 'fancy[use a more fancy style for the progressbar]' ;; (fdupes) _values 'option' \ 'omitfirst[omits the first line of each set of duplicates]' \ 'sameline[does not print newlines between files, only a space]' ;; esac else local -a formatters local f d for f d in ${(kv)formatter_descriptions}; do formatters+=( "$f:$d" ) done _describe -t formatters 'formatter' formatters -S ':' fi } (( $+functions[_rmlint_algorithm] )) || _rmlint_algorithm() { local -a tmp=( sha{1,256,512} sha3-{256,384,512} blake{2s,2b,2sp,2bp} highway{64,128,256} ) _alternative \ '512bit-algorithms:512-bit:(blake2b blake2bp sha3-512 sha512)' \ '384bit-algorithms:384-bit:(sha3-384)' \ '256bit-algorithms:256-bit:(blake2s blake2sp sha3-256 sha256 highway256 metro256 metrocrc256)' \ '160bit-algorithms:160-bit:(sha1)' \ '128bit-algorithms:128-bit:(md5 murmur metro metrocrc)' \ '64bit-algorithms:64-bit:(highway64 xxhash)' \ "cryptographic-algorithms:cryptographic:($tmp)" \ 'non-cryptographic-algorithms:non-cryptographic:(metro metro256 xxhash murmur)' \ 'not-useful-algorithms:not-useful:(cumulative paranoid ext)' } (( $+functions[_rmlint_sort] )) || _rmlint_sort() { local -A letter_descriptions=( s 'sort by size of group' a 'sort alphabetically by the basename of the original' m 'sort by mtime of the original' p 'sort by path-index of the original' o 'sort by natural found order (might be different on each run)' n 'sort by number of files in the group' ) local -a letters local l d for l d in ${(kv)letter_descriptions}; do letters+=( "${l}[$d]" "${(U)l}[$d (in reverse order)]" ) done _values -s '' 'order' $letters } (( $+functions[__rmlint_describe_multipliers] )) || __rmlint_describe_multipliers() { local -a multipliers=( 'C:1^1' 'W:2^1' 'B:512^1' 'K:1000^1' 'KB:1024^1' 'M:1000^2' 'MB:1024^2' 'G:1000^3' 'GB:1024^3' 'T:1000^4' 'TB:1024^4' 'P:1000^5' 'PB:1024^5' 'E:1000^6' 'EB:1024^6' ) _describe -t multiplier 'multiplier' multipliers "$@" } (( $+functions[__rmlint_multipliers] )) || __rmlint_multipliers() { compset -P '[0-9]##' || return __rmlint_describe_multipliers "$@" } (( $+functions[_rmlint_size] )) || _rmlint_size() { ! __rmlint_multipliers && [[ -z $PREFIX ]] && _message -e "${1:-size}" } (( $+functions[_rmlint_size_range] )) || _rmlint_size_range() { if compset -P '[0-9]##'; then if compset -P '(C|W|B|K|KB|M|MB|G|GB|T|TB|P|PB|E|EB)-'; then _rmlint_size 'max' else __rmlint_describe_multipliers -S '-' -q fi elif [[ -z $PREFIX ]]; then _message -e 'min' fi } (( $+functions[_rmlint_iso8601_or_unix_timestamp] )) || _rmlint_iso8601_or_unix_timestamp() { _alternative \ 'dates:iso8601_timestamp: _dates -f "%FT%T"' \ 'seconds:unix_timestamp:_guard "[0-9]#" "seconds since epoch"' } (( $+functions[_rmlint_rank] )) || _rmlint_rank() { # TODO: {r,R,x,X} _values -s '' 'criteria [pOma]' \ 'm[keep lowest mtime (oldest)]' 'M[keep highest mtime (newest)]' \ 'a[keep first alphabetically]' 'A[keep last alphabetically]' \ 'p[keep first named path]' 'P[keep last named path]' \ 'd[keep path with lowest depth]' 'D[keep path with highest depth]' \ 'l[keep path with shortest basename]' 'L[keep path with longest basename]' \ 'r[keep paths matching regex]' 'R[keep path not matching regex]' \ 'x[keep basenames matching regex]' 'X[keep basenames not matching regex]' \ 'h[keep file with lowest hardlink count]' 'H[keep file with highest hardlink count]' \ 'o[keep file with lowest number of hardlinks outside of the paths traversed by rmlint]' \ 'O[keep file with highest number of hardlinks outside of the paths traversed by rmlint]' } (( $+functions[_rmlint_percent] )) || _rmlint_percent() { if compset -P '(100|[1-9][0-9]|[1-9])'; then compadd "$@" -- '%' elif [[ -z $PREFIX ]]; then _message -e 'percent%%' fi } (( $+functions[_rmlint_clamp] )) || _rmlint_clamp() { _alternative \ "factor: :_guard '((|0)(|.[0-9]#)|1(|.0#))' 'fac.tor [$1]'" \ 'percent:percent%%:_rmlint_percent' \ 'multiplier:offset: _rmlint_size "offset"' } (( $+functions[_rmlint_files_or_separator] )) || _rmlint_files_or_separator() { if (( $words[(i)-] < CURRENT )); then [[ -z $words[CURRENT] ]] && compadd "$@" -S '' -- - return fi local -a alts=( 'files:file:_files' ) (( $line[(I)//] || $+opt_args[--equal] )) || alts+=( 'separator:separator:(//)' ) _alternative $alts } _rmlint() { if [[ $service = *.sh ]]; then _arguments -s : \ '(-)-h[show help message]' \ '-d[do not ask before running]' \ '-x[keep rmlint.sh; do not autodelete it]' \ '-p[recheck that files are still identical before removing duplicates]' \ '-r[allow deduplication of files on read-only btrfs snapshots (requires sudo)]' \ '(-d -x)-n[do not perform any modifications, just print what would be done (implies -d and -x)]' \ '-c[clean up empty directories while deleting duplicates]' \ '-q[do not show progress]' \ '-k[keep the timestamp of directories when removing duplicates]' \ '-i[ask before deleting each file]' return fi local curcontext="$curcontext" state state_descr local -a line local -i ret=1 typeset -A opt_args _arguments -s -w -C : \ '(-T --types)'{-T,--types}'=[configure the types of lint rmlint will look for]: :_rmlint_types' \ '*'{-o,--output}'=[configure the way rmlint outputs its results]:spec:_rmlint_output' \ '*'{-O,--add-output}'=[configure the way rmlint outputs its results (preserve defaults)]:spec:_rmlint_output' \ '*'{-c,--config}'=[configure a format]:spec:_rmlint_config' \ '(-z --perms)'{-z,--perms}'=[only look into file if it is readable, writable or executable by the current user]: :_values -s "" perms r w x' \ '(-a --algorithm)'{-a,--algorithm}'=[choose the algorithm to use for finding duplicate files]:algo:_rmlint_algorithm' \ '*'{-p,--paranoid}'[increase the paranoia of rmlint'\''s duplicate algorithm]' \ '*'{-P,--less-paranoid}'[decrease the paranoia of rmlint'\''s duplicate algorithm]' \ '*'{-v,--loud}'[increase the verbosity]' \ '*'{-V,--quiet}'[decrease the verbosity]' \ '(-g --progress)'{-g,--progress}'[show a progressbar with sane defaults]' \ '(-G --no-progress)'{-G,--no-progress}'[do not show a progressbar with sane defaults (default)]' \ '(-D --merge-directories)'{-D,--merge-directories}'[makes rmlint use a special mode where all found duplicates are collected and checked if whole directory trees are duplicates]' \ '(-j --honour-dir-layout)'{-j,--honour-dir-layout}'[only recognize directories as duplicates that have the same path layout]' \ '(-y --sort-by)'{-y,--sort-by}'=[during output, sort the found duplicate groups by criteria described by order]:order:_rmlint_sort' \ '(-w --with-color)'{-w,--with-color}'[use color escapes for pretty output (default)]' \ '(-W --no-with-color)'{-W,--no-with-color}'[disable color escapes for pretty output]' \ '(- *)'{-h,--help}'[show a shorter reference help text]' \ '(- *)--help-all[show all help options]' \ '(- *)'{-H,--show-man}'[show the full man page]' \ '(- *)--version[print the version of rmlint]' \ '(-s --size)'{-s,--size}'=[only consider files as duplicates in a certain size range]:range:_rmlint_size_range' \ '(-d --max-depth)'{-d,--max-depth}'=[only recurse up to this depth]: :_guard "[0-9]#" "depth"' \ '(-l --hardlinked)'{-l,--hardlinked}'[hardlinked files are treated as duplicates (default)]' \ '--keep-hardlinked[rmlint will not delete any files that are hardlinked to an original in their respective group]' \ '(-L --no-hardlinked)'{-L,--no-hardlinked}'[only one file (of a set of hardlinked files) is considered, all the others are ignored]' \ '(-f --followlinks)'{-f,--followlinks}'[follow symbolic links]' \ '(-F --no-followlinks)'{-F,--no-followlinks}'[ignore symbolic links completely]' \ '(-@ --see-symlinks)'{-@,--see-symlinks}'[see symlinks and treats them like small files with the path to their target in them (default)]' \ '(-x --no-crossdev)'{-x,--no-crossdev}'[stay always on the same device]' \ '(-X --crossdev)'{-X,--crossdev}'[allow crossing mountpoints (default)]' \ '(-r --hidden)'{-r,--hidden}'[traverse hidden directories]' \ '(-R --no-hidden)'{-R,--no-hidden}'[don'\''t traverse hidden directories (default)]' \ '--partial-hidden[traverse duplicate hidden directories]' \ '(-b --match-basename)'{-b,--match-basename}'[only consider those files as dupes that have the same basename]' \ '(-B --unmatched-basename)'{-B,--unmatched-basename}'[only consider those files as dupes that do not share the same basename]' \ '(-e --match-with-extension)'{-e,--match-with-extension}'[only consider those files as dupes that have the same file extension]' \ '(-E --no-match-with-extension)'{-E,--no-match-with-extension}'[don'\'t' consider those files as dupes that have the same file extension (default)]' \ '(-i --match-without-extension)'{-i,--match-without-extension}'[only consider those files as dupes that have the same basename minus the file extension]' \ '(-I --no-match-without-extension)'{-I,--no-match-without-extension}'[don'\'t' consider those files as dupes that have the same basename minus the file extension (default)]' \ '(-n --newer-than-stamp)'{-n,--newer-than-stamp}'=[only consider files (and their size siblings for duplicates) newer than a certain modification time (mtime)]:timestamp_filename:_files' \ '(-N --newer-than)'{-N,--newer-than}'=[don'\'t' consider files (and their size siblings for duplicates) newer than a certain modification time (mtime)]: :_rmlint_iso8601_or_unix_timestamp' \ '(-k --keep-all-tagged)'{-k,--keep-all-tagged}'[don'\''t delete any duplicates that are in tagged paths]' \ '(-K --keep-all-untagged)'{-K,--keep-all-untagged}'[don'\''t delete any duplicates that are in non-tagged paths]' \ '(-m --must-match-tagged)'{-m,--must-match-tagged}'[only look for duplicates of which at least one is in one of the tagged paths]' \ '(-M --must-match-untagged)'{-M,--must-match-untagged}'[only look for duplicates of which at least one is in one of the non-tagged paths]' \ '(-S --rank-by)'{-S,--rank-by}'=[sort the files in a group of duplicates into originals and duplicates by one or more criteria]: :_rmlint_rank' \ '--replay[read an existing json file and re-output it]' \ '(-C --xattr)'{-C,--xattr}'[shortcut for --xattr-read, --xattr-write, --write-unfinished]' \ '--xattr-read[read cached checksums from the extended file attributes]' \ '--xattr-write[write cached checksums from the extended file attributes]' \ '--xattr-clear[clear cached checksums from the extended file attributes]' \ '(-U --write-unfinished)'{-U,--write-unfinished}'[include files in output that have not been hashed fully, i.e. files that do not appear to have a duplicate]' \ '(-t --threads)'{-t,--threads}'=[the number of threads to use during file tree traversal and hashing (default: 16)]: :_guard "[0-9]#" "threads [16]"' \ '(-u --limit-mem)'{-u,--limit-mem}'=[apply a maximum number of memory to use for hashing and --paranoid]:size: _rmlint_size' \ '(-q --clamp-low)'{-q,--clamp-low}'=[only look at the content of files in the range of from low to (including) high (default: 0)]: : _rmlint_clamp 0' \ '(-Q --clamp-top)'{-Q,--clamp-top}'=[only look at the content of files in the range of from low to (including) high (default: 1.0)]: : _rmlint_clamp 1.0' \ '(-Z --mtime-window)'{-Z,--mtime-window}'=[only consider those files as duplicates that have the same content and the same modification time (mtime) within a certain window of T seconds (default: -1)]: :_guard "[0-9]#" "mtime window (seconds) [-1]"' \ '--with-fiemap[enable reading the file extents on rotational disk in order to optimize disk access patterns (default)]' \ '--without-fiemap[disable reading the file extents on rotational disk in order to optimize disk access patterns]' \ '--gui[start the optional graphical frontend to rmlint called Shredder]:*: :->gui' \ '--hash[make rmlint work as a multi-threaded file hash utility]:*: :->hash' \ '--equal[check if the paths given on the commandline all have equal content]: :_rmlint_files_or_separator' \ '(-0 --stdin0)'{-0,--stdin0}'[read null-separated file list from stdin]' \ '--backup[do create backups of previous result files]' \ '--no-backup[do not create backups of previous result files]' \ '--dedupe[dedupe matching extents from source to dest (if filesystem supports)]:*:: := ->dedupe' \ '--dedupe-xattr[check extended attributes to see if the file is already deduplicated]' \ '--dedupe-readonly[(--dedupe option) even dedupe read-only snapshots (needs root)]' \ '--is-reflink[test if two files are reflinks (share same data extents)]:*:: := ->reflink' \ '*: :_rmlint_files_or_separator' && return case $state in (gui) _arguments -s -w : \ '(- *)'{-h,--help}'[show help options]' \ {-a,--add-location}'[add locations to locations view]' \ {-s,--scan}'[add location to scan (as untagged path)]' \ {-S,--scan-tagged}'[add location to scan (as tagged path)]' \ {-l,--load-script}'[show `script` in editor view]' \ '*'{-v,--verbose}'[be more verbose]' \ '*'{-V,--less-verbose}'[be less verbose]' \ {-c,--show-settings}'[show the settings view]' \ '(- *)--version[show the version of Shredder]' && ret=0 ;; (hash) _arguments -s -w : \ '(- *)'{-h,--help}'[show help options]' \ {-a,--algorithm}'[digest type \[bLAKE2B\]]:type:_rmlint_algorithm' \ {-t,--num-threads}'[number of hashing threads \[8\]]: :_guard "[0-9]#" "threads [8]"' \ {-b,--buffer-mbytes}'[megabytes read buffer \[256 MB\]]: :_guard "[0-9]#" "buffer (MB) [256]"' \ {-i,--ignore-order}'[print hashes in order completed, not in order entered (reduces memory usage)]' \ '*:file:_files' && ret=0 ;; (dedupe) _arguments -s -w : \ '-r[enable deduplication of read-only \[btrfs\] snapshots (requires root)]' \ '(-V)*-v' \ '(-v)*-V' \ ':src:_files' \ ':dst:_files' && ret=0 ;; (reflink) _arguments -s -w : \ '(-V)*-v' \ '(-v)*-V' \ ':file1:_files' \ ':file2:_files' && ret=0 ;; esac return ret } _rmlint "$@" # 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 ================================================ FILE: src/_rslsync ================================================ #compdef rslsync # ------------------------------------------------------------------------------ # Copyright (c) 2017 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 resilio sync 3.1.2 (https://www.resilio.com/individuals/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Fabian Klötzl (https://github.com/kloetzl) # # ------------------------------------------------------------------------------ _arguments \ '(- *)--help[Print help]' \ '--config[Use a configuration file]:file:_files' \ '--storage[Storage path for identity and license]:path:_files -/' \ '--identity[Creates user identity]:name' \ '--license[Apply owner license]:file:_files' \ '--decrypt[Decrypt encrypted folder]:secret_dbpath_encrypted_folder_output_folder' \ '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files' \ '--nodaemon[Do not daemonize]' \ '--dump-sample-config[Print a sample configuration file]' \ '--log[Set log file]:file:_files' \ '(--help)--webui.listen[Set the webui listening interface]:ip_port:' \ '--generate-secret[Generate a read/write key]::version:(2)' \ '--get-ro-secret[Get the read-only key associated to a read/write key]:key' \ '--server[Set Management Console address]:ip_port' # 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 ================================================ FILE: src/_rspec ================================================ #compdef rspec # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 RSpec 3.12.0 (https://rspec.info/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Kazuya Takeshima (https://github.com/mitukiii) # # ------------------------------------------------------------------------------ _rspec() { local context state line curcontext="$curcontext" _arguments -C \ '*-I[Specify PATH to add to $LOAD_PATH (may be used more than once)]:PATH:_files -/' \ '*'{-r,--require}'[Require a file]:PATH:_files' \ '*'{-O,--options}'[Specify the path to a custom options file]:PATH:_files' \ '--order[Run examples by the specified order type]: :->order' \ '--seed[Equivalent of --order rand:SEED]: :_guard "[[\:digit\:]]#" "SEED"' \ '--bisect[Repeatedly runs the suite in order to isolate the failures to the smallest reproducible case]' \ '--only-failures[Filter to just the examples that failed the last time they ran]' \ '(-n --next-failure)'{-n,--next-failure}'[Apply `--only-failures` and abort after one failure (equivalent to `--only-failures --fail-fast --order defined`)]' \ '(--no-fail-fast)--fail-fast[Abort the run on first failure]' \ '(--fail-fast)--no-fail-fast[Do not abort the run on first failure]' \ '--failure-exit-code[Override the exit code used when there are failing specs]: :_guard "[[\:digit\:]]#" "CODE"' \ '--error-exit-code[Override the exit code used when there are errors loading or running specs]:code' \ '--dry-run[Print the formatter output of your suite without running any examples or hooks]' \ '(-X --drb)'{-X,--drb}'[Run examples via DRb]' \ '(-X --drb)--no-drb[Do not run examples via DRb]' \ '--drb-port[Port to connect to the DRb server]: :_guard "[[\:digit\:]]#" "PORT"' \ '(-f --format)'{-f,--format}'[Choose a formatter]: :->format' \ '(-o --out)'{-o,--out}'[Write output to a file instead of $stdout]:FILE:_files' \ '--deprecation-out[Write deprecation warnings to a file instead of $stderr]:FILE:_files' \ '(-b --backtrace)'{-b,--backtrace}'[Enable full backtrace]' \ '(--no-color)--force-color[Force the output to be in color, even if the output is not a TTY]' \ '(--force-color)--no-color[Force the output to not be in color, even if the output is a TTY]' \ '(-p --profile --no-profile)'{-p,--profile}'[Enable profiling of examples and list the slowest examples (default: 10)]: :_guard "[[\:digit\:]]#" "COUNT"' \ '(-p --profile)--no-profile[Disable profiling of examples]' \ '(-w --warnings)'{-w,--warnings}'[Enable ruby warnings]' \ '(-P --pattern)'{-P,--pattern}'[Load files matching pattern (default: "spec/**/*_spec.rb")]:PATTERN:' \ '--exclude-pattern[Load files except those matching pattern]:PATTERN:' \ '*'{-e,--example}'[Run examples whose full nested names include STRING (may be used more than once)]:STRING:' \ '*'{-E,--example-matches}'[Run examples whose full nested names match REGEX]:regex' \ '*'{-t,--tag}'[Run examples with the specified tag, or exclude examples by adding ~ before the tag]: :->tag' \ '--default-path[Set the default path where RSpec looks for examples (can be a path to a file or a directory)]:PATH:_files' \ '(- *)--init[Initialize your project with RSpec]' \ '(- *)'{-h,--help}"[You're looking at it]" \ '(- *)'{-v,--version}'[Display the version]' \ '*:files or directories:_files' case "$state" in order) if compset -P '*:'; then _guard '[[:digit:]]#' 'SEED' else _values 'TYPE[:SEED]' \ 'defined[examples and groups are run in the order they are defined]' \ 'rand[randomize the order of groups and examples]' \ 'random[alias for rand]' \ 'recently-modified[run the most recently modified files first]' fi ;; tag) if compset -P '*:'; then _message 'VALUE' else _message 'TAG[:VALUE]' fi ;; format) _values 'FORMATTER' \ 'progress[dots (default)]' \ 'documentation[group and example names]' \ 'html[HTML]' \ 'json[JSON]' \ 'failures["file:line:reason", suitable for editors integration]' ;; esac } _rspec "$@" # 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 ================================================ FILE: src/_rubocop ================================================ #compdef rubocop # ------------------------------------------------------------------------------ # 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 rubocop 1.82.1 (https://github.com/rubocop/rubocop) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Akira Maeda # * Shohei Yoshida # # ------------------------------------------------------------------------------ _rubocop_format_params() { local -a formatter=( "autogenconf" "clang" "emacs" "files" "fuubar" "github" "html" "json" "junit" "markdown" "offenses" "pacman" "progress" "quiet" "simple" "tap" "worst" ) _values 'formatter' $formatter } _arguments \ '(-l --lint)'{-l,--lint}'[Run only lint cops]' \ '(-x --fix-layout)'{-x,--fix-layout}'[Run only layout cops, with autocorrect on]' \ '--safe[Run only safe cops]' \ '*--except[Exclude the given cops]:cops' \ '*--only[Run only the given cops]:cops' \ '--only-guide-cops[Run only cops for rules that link to a style guide]' \ '(-F --fail-fast)'{-F,--fail-fast}'[Inspect files in order of modification time and stop after the first file containing offenses]' \ '(--disable-pending-cops --enable-pending-cops)--disable-pending-cops[Run without pending cops]' \ '(--disable-pending-cops --enable-pending-cops)--enable-pending-cops[Run with pending cops]' \ '--ignore-disable-comments[Run cops even when they are disabled locally by a "rubocop:disable" directive]' \ '--force-exclusion[Any files excluded by `Exclude` in configuration files will be excluded, even if given explicitly as arguments]' \ '--only-recognized-file-types[Inspect files given on the command line only if they are listed in configuration]' \ '--ignore-parent-exclusion[Prevent from inheriting "AllCops/Exclude" from parent folders]' \ '--ignore-unrecognized-cops[Ignore unrecognized cops or departments in the config]' \ '--force-default-config[Use default configuration even if configuration files are present in the directory tree]' \ '(-s --stdin)'{-s,--stdin}'[Pipe source from STDIN, using FILE in offense reports]: :_files' \ '--editor-mode[Optimize real-time feedback in editors, adjusting behaviors for editing experience]' \ '(-P --parallel --no-parallel)'{-P,--parallel}'[Use available CPUs to execute inspection in parallel]' \ '(-P --parallel --no-parallel)--no-parallel[Execute not parallel]' \ '--raise-cop-error[Raise cop-related errors with cause and location]' \ '--fail-level[Minimum severity for exit with error code]:severity:(autocorrect info refactor convention warning error fatal)' \ '(-C --cache)'{-C,--cache}'[Use result caching or not]:flag:(true false)' \ '--cache-root[Set the cache root directory]:dir:_files -/' \ '--lsp[Start a language server listening on STDIN]' \ '--server[If a server process has not been started yet start the server process and execute inspection with server]' \ '(--restart-server --start-server --stop-server)--restart-server[Restart server process]' \ '(--restart-server --start-server --stop-server)--start-server[Start server process]' \ '(--restart-server --start-server --stop-server)--stop-server[Stop server process]' \ '--server-status[Show server status]' \ '--no-detach[Run the server process in the foreground]' \ '(-f --format)'{-f,--format}'[Choose an output formatter]:FORMATTER:_rubocop_format_params' \ '(-D --display-cop-names)'{-D,--display-cop-names}'[Display cop names in offense messages]' \ '(-E --extra-details)'{-E,--extra-details}'[Display extra details in offense messages]' \ '(-S --display-style-guide)'{-S,--display-style-guide}'[Display style guide URLs in offense messages]' \ '(-o --out)'{-o,--out}'[Write output to a file instead of STDOUT]: :_files' \ '--stderr[Write all output to stderr except for the autocorrected source]' \ '--display-time[Display elapsed time in seconds]' \ '--display-only-failed[Only output offense messages]' \ '--display-only-fail-level-offenses[Only output offense messages at the specified --fail-level or above]' \ '--display-only-correctable[Only output correctable offense messages]' \ '--display-only-safe-correctable[Only output safe-correctable offense messages with combined with --display-only-correctable]' \ '(-a --autocorrect)'{-a,--autocorrect}"[Auto-correct offenses(only when it's safe)]" \ '(-A --autocorrect-all)'{-A,--autocorrect-all}'[Autocorrect offenses(safe and unsafe)]' \ '--disable-uncorrectable[used with --autocorrect to annotate any offenses that do not support autocorrect with comments]' \ '--auto-gen-config[Generate a configuration file acting as a TODO list]' \ '--regenerate-todo[Regenerate the TODO configuration file using the last configuration]' \ '(--no-exclude-limit --exclude-limit)--exclude-limit[Set the limit for how many files to explicitly exclude]:count' \ '(--no-exclude-limit --exclude-limit)--no-exclude-limit[Do not set the limit for how many files to exclude]' \ '--offense-counts[Include offense counts in configuration file generated by --auto-gen-config]' \ '--auto-gen-only-exclude[Generate only Exclude parameters and not Max when running --auto-gen-config]' \ '--auto-gen-timestamp[Include the data and time when the --auto-gen-config was run in the file it generates]' \ '--auto-gen-enforced-style[Add a setting to the TODO configuration file to enforce the style used]' \ '(-L --list-target-files)'{-L,--list-target-files}'[List all files RuboCop will inspect]' \ '*--show-cops[Show the given cops or all cops]::cops' \ '--show-docs-url[Display url to documentation for the given cops or base url by default]::cops' \ '--init[Generate a .rubocop.yml file in the current directory]' \ '(-c --config)'{-c,--config}'[Specify configuration file]: :_files' \ '(-d --debug)'{-d,--debug}'[Display debug info]' \ '*--plugin[Load a RuboCop plugin]: :_files' \ '(-r --require)'{-r,--require}'[Require Ruby file]: :_files' \ '(--no-color --color)--color[Force color output on]' \ '(--no-color --color)--no-color[Force color output off]' \ '(- *)'{-v,--version}'[Display version]' \ '(- *)'{-V,--verbose-version}'[Display verbose version]' \ '--profile[Profile rubocop]' \ '--memory[Profile rubocop memory usage]' \ '(- *)'{-h,--help}'[Show help]' \ '*: :_files' # 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 ================================================ FILE: src/_sbt ================================================ #compdef sbt # ------------------------------------------------------------------------------ # Copyright (c) 2013 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 sbt 1.8.0 (https://www.scala-sbt.org). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Tony Sloane # * Mirko Caserta # * Shohei Yoshida # # ------------------------------------------------------------------------------ _sbt() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments \ '(- *)'{-h,--help}'[print help message]' \ '(-v --verbose)'{-v,--verbose}'[this runner is chattier]' \ '(- *)'{-V,--version}'[print sbt version information]' \ '--numeric-version[print the version of sbt script]' \ '(-d --debug)'{-d,--debug}'[set sbt log level to debug]' \ '--no-colors[disable ANSI color codes]' \ '--color=[enable or disable ANSI color codes]: :(auto always true false never)' \ '--supershell=[enable or disable super shell]: :(auto always true false never)' \ '--traces[generate Trace Event report on shutdown]' \ '--timings[display task timings report on shutdown]' \ '--sbt-create[start sbt even if current directory contains no sbt project]' \ '--sbt-dir[path to global settings/plugins directory]: :_files -/' \ '--sbt-boot[path to shared boot directory]: :_files -/' \ '--sbt-cache[path to global cache directory]: :_files -/' \ '--ivy[path to local Ivy repository]: :_files -/' \ '--mem[set memory options]:memory' \ '--no-share[use all local caches; no sharing]' \ '--no-global[uses global caches, but does not use global directory]' \ '--jvm-debug[Turn on JVM debugging, open at the given port]:port' \ '--batch[disable interactive mode]' \ '--sbt-version[use the specified version of sbt]:version' \ '--sbt-jar[use the specified jar as the sbt launcher]: :_files' \ '--java-home[alternate JAVA_HOME]: :_files -/' \ '1: :_sbt_commands' \ '*:: :->args' && ret=0 case "$state" in (args) case $words[1] in (new) local -a g8_templates=( foundweekends/giter8.g8 scala/scala-seed.g8 scala/scala3.g8 scala/hello-world.g8 scala/scalatest-example.g8 playframework/play-scala-seed.g8 playframework/play-java-seed.g8 lagom/lagom-scala.g8 lagom/lagom-java.g8 scala-native/scala-native.g8 scala-native/sbt-crossproject.g8 http4s/http4s.g8 unfiltered/unfiltered.g8 scalatra/scalatra-sbt.g8 ) _values 'g8_templates' $g8_templates ;; esac ;; esac return $ret } (( $+functions[_sbt_commands] )) || _sbt_commands() { local -a commands=( 'about:Displays basic information about sbt and the build' 'clean:delete files produced by the build' 'compile:compile sources' 'console:start the Scala REPL with project classes on the classpath' 'console-quick:start the Scala REPL with project deps on the classpath' 'console-project:start the Scala REPL w/sbt+build-def on the classpath' 'dist:generate distribution artifacts' 'dist\:clean:clean distribution artifacts' 'doc:generate API documentation' 'new:Creates a new sbt build' 'package:produce the main artifact, such as a binary jar' 'package-doc:produce a doc artifact, such as a jar containing API docs' 'package-src:produce a source artifact, such as a jar containing sources' 'projects:Lists the names of available projects' 'publish:publish artifacts to a repository' 'publish-local:publish artifacts to the local repository' 'run:run a main class' 'run-main:run the main class selected by the first argument' 'settings:Lists the settings defined for the current project' 'shutdownall:shutdown all running sbt-launch processes' 'tasks:Lists the tasks defined for the current project' 'test:execute all tests' 'test-only:execute the tests provided as arguments' 'test-quick:execute previously failed tests' 'update:resolve and optionally retrieve dependencies' ) _describe -t subcommands 'subcommand' commands } _sbt "$@" # 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 ================================================ FILE: src/_scala ================================================ #compdef scala scalac # ------------------------------------------------------------------------------ # Copyright (c) 2012 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 scala and scalac 3.2.1 (https://www.scala-lang.org/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Tony Sloane # * Shohei Yoshida # # ------------------------------------------------------------------------------ _scala() { local ret=1 local -a common_options=( "-Dproperty=[Pass -Dproperty=value directly to the runtime system]:value" "-J-[Pass directly to the runtime system]:flag" "-P\:-[Pass an option to a plugin, e.g. -P::]" "-V[Print a synopsis of verbose options]" "-W[Print a synopsis of warning options]" "-Wconf[Configure compiler warnings]" "-Werror[Fail the compilation if there are any warnings]" "-X[Print a synopsis of advanced options]" "-Y[Print a synopsis of private options]" "-bootclasspath+[Override location of bootstrap class files]: :_files -/" "-classpath+[Specify where to find user class files]: :_files -/" "-color\:-[Colored output]: :(always never)" "-coverage-out\:-[Destination for coverage classfiles and instrumentation data]: :_files -/" "-d+[Destination for generated classfiles]: directory or jar file:_files" "-deprecation[Emit warning and location for usages of deprecated APIs]" "-encoding+[Specify character encoding used by source files]:encoding" "-explain[Explain errors in more detail]" "-explain-types[Explain type errors in more detail (deprecated, use -explain instead)]" "-extdirs\:-[Override location of installed extensions]: :_files -/" "-feature[Emit warning and location for usages of features that should be imported explicitly]" "-from-tasty[Compile classes from tasty files. The arguments are .tasty or .jar files]" "(* -)-help[Print a synopsis of standard options]" "-indent[Together with -rewrite, remove {...} syntax when possible due to significant indentation]" "-java-output-version[Compile code with classes specific to the given version of the Java platform]" "-javabootclasspath+[Override java boot classpath]: :_files -/" "-javaextdirs+[Override java extdirs classpath]: :_files -/" "-language\:-[Enable one or more language features]: :_scala_features" "-new-syntax[Require 'then' and 'do' in control expressions]" "-no-indent[Require classical {...} syntax, indentation is not significant]" "-nowarn[Silence all warnings]" "-old-syntax[Require '(...)' around conditions]" "-pagewidth:-[Set page width]:width" "-print-lines[Show source code line numbers]" "-print-tasty[Prints the raw tasty]" "-project-url\:-[The source repository of your project]:url" "-rewrite[When used in conjunction with a '...-migration' source version, rewrites sources to migrate to new]" "-scalajs[Compile in Scala.js mode (requires scalajs-library.jar on the classpath)]" "-scalajs-genStaticForwardersForNonTopLevelObjects[Generate static forwarders even for non-top-level objects (Scala.js only)]" "-scalajs-mapSourceURI[rebases source URIs from uri1 to uri2 (or to a relative URI) for source maps (Scala.js only)]" "-semanticdb-target[Specify an alternative output directory for SemanticDB files]" "-source\:-[source version]:version" "-sourcepath+[Specify location(s) of source files]:source file directory:_files -/" "-sourceroot+[Specify workspace root directory]: :_files -/" "-unchecked[Enable additional warnings where generated code depends on assumptions]" "-uniqid[Uniquely tag all identifiers in debugging output]" "-usejavacp[Utilize the java.class.path in classpath resolution]" "-verbose[Output messages about what the compiler is doing]" "(- *)-version[Print product version and exit]" ) local -a advanced_options=( "-Xcheck-macros[Check some invariants of macro generated code while expanding macros]" "-Xignore-scala2-macros[Ignore errors when compiling code that calls Scala2 macros, these will fail at runtime]" "-Ximplicit-search-limit\:-[Maximal number of expressions to be generated in an implicit search]" "-Ximport-suggestion-timeout\:-[Timeout (in ms) for searching for import suggestions when errors are reported]" "-Xmacro-settings[List of settings which exposed to the macros]" "-Xmain-class[Class for manifest's Main-Class entry (only useful with -d )]" "-Xmax-inlined-trees\:-[Maximal number of inlined trees]" "-Xmax-inlines\:-[Maximal number of successive inlines]" "-Xmigration[Warn about constructs whose behavior may have changed since version]" "-Xmixin-force-forwarders\:-[Generate forwarder methods in classes inhering concrete methods from traits]: :(true junit false)" "-Xno-forwarders[Do not generate static forwarders in mirror classes]" "-Xplugin[Load a plugin from each classpath]" "-Xplugin-disable[Disable plugins by name]" "-Xplugin-list[Print a synopsis of loaded plugins]" "-Xplugin-require[Abort if a named plugin is not loaded]" "-Xpluginsdir\:-[Path to search for plugin archives]: :_files -/" "-Xprint-diff[Print changed parts of the tree since last print]" "-Xprint-diff-del[Print changed parts of the tree since last print including deleted parts]" "-Xprint-inline[Show where inlined code comes from]" "-Xprint-suspension[Show when code is suspended until macros are compiled]" "-Xprint-types[Print tree types (debugging option)]" "-Xprompt[Display a prompt after each error (debugging option)]" "-Xrepl-disable-display[Do not display definitions in REPL]" "-Xsemanticdb[Store information in SemanticDB]" "-Xunchecked-java-output-version[Emit bytecode for the specified version of the Java platform]:java_version" "-Xverify-signatures[Verify generic signatures in generated bytecode]" "-Xwiki-syntax[Retains the Scala2 behavior of using Wiki Syntax in Scaladoc]" ) local -a private_options=( "-Ycc[Check captured references (warning: extremely experimental and unstable)]" "-Ycc-debug[Used in conjunction with -Ycc, debug info for captured references]" "-Ycc-no-abbrev[Used in conjunction with -Ycc, suppress type abbreviations]" "-Ycheck[Check the tree at the end of]" "-Ycheck-all-patmat[Check exhaustivity and redundancy of all pattern matching (used for testing the algorithm)]" "-Ycheck-mods[Check that symbols and their defining trees have modifiers in sync]" "-Ycheck-reentrant[Check that compiled program does not contain vars that can be accessed from a global root]" "-Ycook-docs[Cook the documentation (type check '@usecase', etc.)]" "-Ydebug[Increase the quantity of debugging output]" "-Ydebug-error[Print the stack trace when any error is caught]" "-Ydebug-flags[Print all flags of definitions]" "-Ydebug-missing-refs[Print a stacktrace when a required symbol is missing]" "-Ydebug-names[Show internal representation of names]" "-Ydebug-pos[Show full source positions including spans]" "-Ydebug-trace[Trace core operations]" "-Ydebug-tree-with-id[Print the stack trace when the tree with the given id is created]" "-Ydebug-type-error[Print the stack trace when a TypeError is caught]" "-Ydebug-unpickling[Print the stack trace when an error occurs when reading Tasty]" "-Ydetailed-stats[Show detailed internal compiler stats (needs Stats.enabled to be set to true)]" "-YdisableFlatCpCaching[Do not cache flat classpath representation of classpath elements from jars across compiler]" "-Ydrop-docs[Drop documentation when scanning source files]" "-Ydump-classes[Dump the generated bytecode to .class files (useful for reflective compilation that utilizes]" "-Ydump-sbt-inc[For every compiled foo.scala, output the API representation and dependencies used for sbt]" "-Yexplain-lowlevel[When explaining type errors, show types at a lower level]" "-Yexplicit-nulls[Make reference types non-nullable. Nullable types can be expressed with unions: e.g]" "-Yforce-sbt-phases[Run the phases used by sbt for incremental compilation (ExtractDependencies and ExtractAPI)]" "-Yfrom-tasty-ignore-list[List of 'tasty' files in jar files that will not be loaded when using -from-tasty]" "-Yindent-colons[(disabled: use -language:experimental.fewerBraces instead)]" "-Yinstrument[Add instrumentation code that counts allocations and closure creations]" "-Yinstrument-defs[Add instrumentation code that counts method calls; needs -Yinstrument to be set, too]" "-Ykind-projector\:-[Allow '*' as type lambda placeholder to be compatible with kind projector. When invoked as]: :(disable underscores)" "-Ylog[Log operations during]" "-Ylog-classpath[Output information about what classpath is being applied]" "-Yno-decode-stacktraces[Show raw StackOverflow stacktraces, instead of decoding them into triggering operations]" "-Yno-deep-subtypes[Throw an exception on deep subtyping call stacks]" "-Yno-double-bindings[Assert no namedtype is bound twice (should be enabled only if program is error-free)]" "-Yno-experimental[Disable experimental language features]" "-Yno-generic-signatures[Suppress generation of generic signatures for Java]" "-Yno-imports[Compile without importing scala.*, java.lang.*, or Predef]" "-Yno-kind-polymorphism[Disable kind polymorphism]" "-Yno-patmat-opt[Disable all pattern matching optimizations]" "-Yno-predef[Compile without importing Predef]" "-Yplain-printer[Pretty-print using a plain printer]" "-Yprint-debug[When printing trees, print some extra information useful for debugging]" "-Yprint-debug-owners[When printing trees, print owners of definitions]" "-Yprint-level[print nesting levels of symbols and type variables]" "-Yprint-pos[Show tree positions]" "-Yprint-pos-syms[Show symbol definitions positions]" "-Yprint-syms[When printing trees print info in symbols instead of corresponding info in trees]" "-Yprofile-destination[Where to send profiling output - specify a file, default is to the console]" "-Yprofile-enabled[Enable profiling]" "-Yprofile-external-tool[Enable profiling for a phase using an external tool hook. Generally only useful for a single]" "-Yprofile-run-gc[Run a GC between phases - this allows heap size to be accurate at the expense of more time]" "-Yread-docs[Read documentation from tasty]" "-Yrecheck-test[Run basic rechecking (internal test only)]" "-Yrequire-targetName[Warn if an operator is defined without a @targetName annotation]" "-Yresolve-term-conflict\:-[Resolve term conflicts]: :(package object error)" "-Yretain-trees[Retain trees for top-level classes, accessible from ClassSymbol#tree]" "-Ysafe-init[Ensure safe initialization of objects]" "-Yscala2-unpickler\:-[Control where we may get Scala 2 symbols from]: :(always never)" "-Yshow-print-errors[Don't suppress exceptions thrown during tree printing]" "-Yshow-suppressed-errors[Also show follow-on errors and warnings that are normally suppressed]" "-Yshow-tree-ids[Uniquely tag all tree nodes in debugging output]" "-Yshow-var-bounds[Print type variables with their bounds]" "-Yskip[Skip]" "-Ystop-after[Stop after]" "-Ystop-before[Stop before]" "-Ytest-pickler[Self-test for pickling functionality; should be used with -Ystop-after:pickler]" ) local -a scala_options=( "-e+[execute as if entered in the repl]:string" "-save[save the compiled script in a jar for future use]" ) case $words[$CURRENT] in (-X*) _arguments $advanced_options && ret=0 ;; (-Y*) _arguments $private_options && ret=0 ;; (*) case $service in (scala) _arguments $scala_options $common_options "*::filename:_files" && ret=0 ;; (scalac) _arguments $common_options "*::filename:_files" && ret=0 ;; esac ;; esac return $ret } (( $+functions[_scala_features] )) || _scala_features() { local -a features=( "adhocExtensions" "before" "dynamics" "experimental.captureChecking" "experimental.dependent" "experimental.erasedDefinitions" "experimental.macros" "implicitConversions" "noAutoTupling" "noob" "postfixOps" "strictEquality" "unsafeNulls" ) _values 'features' $features } (( $+functions[_scala_phases] )) || _scala_phases() { local -a phases=( "parser:scan and parse sources" "typer:type the trees" "inlinedPositions:check inlined positions" "sbt-deps:sends information on classes' dependencies to sbt" "extractSemanticDB:extract info into .semanticdb files" "posttyper:additional checks and cleanups after type checking" "prepjsinterop:additional checks and transformations for Scala.js" "sbt-api:sends a representation of the API of classes to sbt" "SetRootTree:set the rootTreeOrProvider on class symbols" "pickler:generates TASTy info" "inlining:inline and execute macros" "postInlining:add mirror support for inlined code" "staging:check staging levels and heal staged types" "splicing:splicing" "pickleQuotes:turn quoted trees into explicit run-time data structures" "instrumentCoverage:instrument code for coverage checking" "firstTransform:some transformations to put trees into a canonical form" "checkReentrant:check no data races involving global vars" "elimPackagePrefixes:eliminate references to package prefixes in Select nodes" "cookComments:cook the comments: expand variables, doc, etc." "checkStatic:check restrictions that apply to @static members" "checkLoopingImplicits:check that implicit defs do not call themselves in an infinite loop" "betaReduce:reduce closure applications" "inlineVals:check right hand-sides of an 'inline val's" "expandSAMs:expand SAM closures to anonymous classes" "elimRepeated:rewrite vararg parameters and arguments" "refchecks:checks related to abstract members and overriding" "initChecker:check initialization of objects" "crossVersionChecks:check issues related to deprecated and experimental" "protectedAccessors:add accessors for protected members" "extmethods:expand methods of value classes with extension methods" "uncacheGivenAliases:avoid caching RHS of simple parameterless given aliases" "elimByName:map by-name parameters to functions" "hoistSuperArgs:hoist complex arguments of supercalls to enclosing scope" "forwardDepChecks:ensure no forward references to local vals" "specializeApplyMethods:adds specialized methods to FunctionN" "tryCatchPatterns:compile cases in try/catch" "patternMatcher:compile pattern matches" "preRecheck:preRecheck" "recheck:recheck" "preRecheck:preRecheck" "cc:cc" "elimOpaque:turn opaque into normal aliases" "explicitJSClasses:make all JS classes explicit" "explicitOuter:add accessors to outer classes from nested ones" "explicitSelf:make references to non-trivial self types explicit as casts" "interpolators:optimize s, f, and raw string interpolators" "pruneErasedDefs:drop erased definitions and simplify erased expressions" "uninitialized:eliminates 'compiletime.uninitialized'" "inlinePatterns:remove placeholders of inlined patterns" "vcInlineMethods:inlines calls to value class methods" "seqLiterals:express vararg arguments as arrays" "intercepted:rewrite universal '!=', '##' methods" "getters:replace non-private vals and vars with getter defs" "specializeFunctions:specialize Function{0,1,2} by replacing super with specialized super" "specializeTuples:replaces tuple construction and selection trees" "liftTry:lift any try that might be executed on a non-empty expression stack" "collectNullableFields:collect fields that can be nulled out after use in lazy initialization" "elimOuterSelect:expand outer selections" "resolveSuper:implement super accessors" "functionXXLForwarders:add forwarders for FunctionXXL apply methods" "paramForwarding:add forwarders for aliases of superclass parameters" "genericTuples:optimize generic operations on tuples" "letOverApply:lift blocks from receivers of applications" "arrayConstructors:intercept creation of (non-generic) arrays and intrinsify" "erasure:rewrite types to JVM model" "elimErasedValueType:expand erased value types to their underlying implmementation types" "pureStats:remove pure statements in blocks" "vcElideAllocations:peep-hole optimization to eliminate unnecessary value class allocations" "etaReduce:reduce eta expansions of pure paths" "arrayApply:optimize 'scala.Array.apply'" "addLocalJSFakeNews:adds fake new invocations to local JS classes in calls to 'createLocalJSClass'" "elimPolyFunction:rewrite PolyFunction subclasses to FunctionN subclasses" "tailrec:rewrite tail recursion to loops" "completeJavaEnums:fill in constructors for Java enums" "mixin:expand trait fields and trait initializers" "lazyVals:expand lazy vals" "memoize:add private fields to getters and setters" "nonLocalReturns:expand non-local returns" "capturedVars:represent vars captured by closures as heap objects" "constructors:collect initialization code in primary constructors" "instrumentation:count calls and allocations under -Yinstrument" "lambdaLift:lifts out nested functions to class scope" "elimStaticThis:replace This references to static objects by global identifiers" "countOuterAccesses:identify outer accessors that can be dropped" "dropOuterAccessors:drop unused outer accessors" "checkNoSuperThis:check that supercalls don't contain references to This" "flatten:lift all inner classes to package scope" "transformWildcards:replace wildcards with default values" "moveStatic:move static methods from companion to the class itself" "expandPrivate:widen private definitions accessed from nested classes" "restoreScopes:repair rendered invalid scopes" "selectStatic:get rid of selects that would be compiled into GetStatic" "junitBootstrappers:generate JUnit-specific bootstrapper classes for Scala.js" "Collect:entry points collect all entry points and save them in the context" "collectSuperCalls:find classes that are called with super" "repeatableAnnotations:aggregate repeatable annotations" "genSJSIR:generate .sjsir files for Scala.js" "genBCode:generate JVM bytecode" ) _describe -t phases 'phases' phases } _scala "$@" # 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 ================================================ FILE: src/_screencapture ================================================ #compdef screencapture # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 screencapture command macOS 26 # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments -s \ '-c[force screen capture to go to the clipboard]' \ '(-i -J -s -w -W)-b[capture touch bar only non interactive modes]' \ '(-b -i -J -s -w -W)-C[capture the cursor as well as the screen only in non interactive modes]' \ '-d[display errors to the user graphically]' \ '(-b -C)-i[capture screen interactively. ctrl clipboard, space toggle mode, escape cancel]' \ '-m[only capture the main monitor]' \ '-D[screen capture or record from the display specified]:display_number:' \ '(-b -s)-o[in window capture mode, do not capture the shadow of the window]' \ '-p[screen capture will use the default settings for capture]' \ '-M[screen capture output will go to a new Mail message]' \ '-P[screen capture output will open in Preview or QuickTime Player]' \ '-B[screen capture output will open in app with bundle ID]:bundle_id:' \ '(-b -i -w -W)-s[only allow mouse selection mode]' \ '-S[in window capture mode, capture the screen not the window]' \ '-J+[sets the starting of interactive capture]:style:(selection window video)' \ '(-p)-t[image format to create default is png]:format:(png pdf jpg tiff gif)' \ '-T+[take the picture after a delay of seconds]:seconds:' \ '(-b -i -s -W)-w[only allow window selection mode]' \ '(-b -i -s -w)-W[start interaction in window selection mode]' \ '-x[do not play sounds]' \ '-a[do not include windows attached to selected windows]' \ '-r[do not add dpi meta data to image]' \ '-l[capture this windows ID]:window_id:' \ '(-b -i -s -w -W)-R[capture screen rect]:rect:' \ '(-b)-v[capture video recording of the screen]::->video' \ '-V+[limits video capture to specified seconds]:seconds:' \ '-g[captures audio during a video recording using default input]' \ '-G[captures audio during a video recording using audio ID specified]' \ '-k[show clicks in video recording mode]' \ '-U[Show interactive toolbar in interactive mode]' \ '-u[present UI after screencapture is complete]' \ '*:files:_files' # 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 ================================================ FILE: src/_scrub ================================================ #compdef scrub # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 scrub 2.6.1 (https://linux.die.net/man/1/scrub). # # A utility which iteratively writes patterns on files or disk devices # to make retrieving the data more difficult. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Jindřich Pilař (https://github.com/JindrichPilar) # # ------------------------------------------------------------------------------ _scrub_patterns() { local patterns=( 'nnsa:4-pass NNSA Policy Letter NAP-14.1-C (XVI-8)' 'dod:4-pass DoD 5220.22-M section 8-306 procedure' 'bsi:9-pass method recommended by the German Center of Security in Information Technologies' "gutmann:The canonical 35-pass sequence described in Gutmann's paper cited below" 'schneier:7-pass method described by Bruce Schneier in "Applied Cryptography"' "pfitzner7:Roy Pfitzner's 7-random-pass method" "pfitzner33:Roy Pfitzner's 33-random-pass method" "usarmy:US Army AR380-19 method" "fillzero:1-pass pattern\: 0x00" "fillff:1-pass pattern\: 0xff" "random:1-pass pattern\: random(x1)" "random2:2-pass pattern: random(x2)" "old:6-pass pre-version 1.7 scrub method" "fastold:5-pass pattern\: 0x00, 0xff, 0xaa, 0x55, verify" 'custom=:1-pass custom pattern' ) _describe 'pattern' patterns } _scrub() { _arguments -s -S \ "(- 1 *)"{-v,--version}"[Print scrub version and exit]" \ {-r,--remove}"[Remove the file after scrubbing]" \ {-p,--pattern}"[Select the patterns to write]:pattern:_scrub_patterns" \ {-b,--blocksize}"[Perform read and write calls using the specified blocksize (in bytes)]:block size:" \ {-f,--force}"[Scrub even if target contains signature indicating it has already been scrubbed]" \ {-S,--no-signature}"[Do not write scrub signature]" \ {-X,--freespace}"[Create specified directory and fill it with files until write returns ENOSPC (file sys‐tem full), then scrub the files as us]:directory name:" \ {-D,--dirent}"[After scrubbing the file, scrub its name in the directory entry, then rename it to the new name]:new name:" \ {-s,--device-size}"[Override the device size (in bytes)]:size:" \ {-L,--no-link}"[If file is a symbolic link, do not scrub the link target]" \ {-R,--no-hwrand}"[Don't use a hardware random number generator even if one is available]" \ {-t,--no-threads}"[Don't generate random data in parallel with I/O]" \ {-n,--dry-run}"[Do everything but write to targets]" \ {-h,--help}"[Print a summary of command line options on stderr]" \ '*:files:_files' } _scrub # 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 ================================================ FILE: src/_sdd ================================================ #compdef sdd # ------------------------------------------------------------------------------ # 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 sdd (http://freshmeat.net/projects/sdd/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Massimiliano Torromeo # # ------------------------------------------------------------------------------ _values -w 'option' \ 'if[specify input file]:input file:_tilde_files' \ 'of[specify output file]:output file:_tilde_files' \ '(bs)ibs[input block size]:block size (bytes)' \ '(bs)obs[output block size]:block size (bytes)' \ '(ibs obs)bs[block size]:block size (bytes)' \ 'cbs[conversion buffer size]:buffer size (bytes)' \ 'skip[input/output initially skipped]:bytes' \ 'seek[input/output initially skipped]:bytes' \ 'count[number of input blocks to copy]:blocks' \ '-notrunc[do not truncate existing output file]' \ '-pg[print a dot on each write to indicate progress]' \ '-noerror[do not stop on error]' \ '-noerrwrite[do not write blocks not read correctly]' \ "-noseek[don't seek]" \ 'try[error retry count]:number' \ '-debug[print debugging messages]' \ '-fill[fill each record with zeros up to obs]' \ '-swab' '-block' '-unblock' '-lcase' '-ucase' '-ascii' '-ebcdic' '-ibm' \ '-help[show help]' \ '-version[show version]' # 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 ================================================ FILE: src/_sdkmanager ================================================ #compdef sdkmanager # ------------------------------------------------------------------------------ # Copyright (c) 2023 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 sdkmanager(https://developer.android.com/studio/command-line/sdkmanager) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)--help[show help message]' \ '(- *)--version[print the current version of sdkmanager]' \ '--install[install or update package]' \ '--uninstall[uninstall the listed packages]' \ '--update[all installed packages are updated to the latest version]' \ '--list_installed[all installed packages are printed out]' \ '--licenses[show and offer the option to accept licenses for all available packages]' \ '--sdk_root=[use the specified SDK root instead of the SDK containing this tool]: :_files -/' \ '--channel=[include packages in channels up to channel ID]: :((0\:Stable 1\:Beta 2\:Dev 3\:Canary))' \ '--include_obsolete[show/update obsolete packages in the package listing]' \ '--newer[show only new and/or updatable packages]' \ '--no_https[force all connections to use http rather than https]' \ '--proxy=[connect via a proxy of the given type]: :(http socks)' \ '--proxy_host=[IP or DNS address of the proxy to use]:address' \ '--proxy_port=[proxy port to connect to]:port' \ '--verbose[enable verbose output]' # 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 ================================================ FILE: src/_setcap ================================================ #compdef setcap # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 libcap's setcap: # - https://people.redhat.com/sgrubb/libcap-ng/ # # ZSH provides the `zsh/cap` module that does not work on most modern systems, # in lieu of this I have written this zsh-completion modules. # # Written by # - Zephyr Pellerin (https://github.com/zv) # ------------------------------------------------------------------------------ _setcap() { local curcontext=$curcontext state line expl ret=1 _arguments -C -s \ '-r[remove capability from file]' \ '--license[display the license info]' \ '-f[force setting even when the capability is invalid]' \ '-h[show help message and exit]' \ '-v[verify that the specified capabilities are currently associated with the file]' \ '-n[set the file capability for use only in a user namespace with this root user ID owner]:rootuid' \ '-q[make the program less verbose in its output]' \ '1:capability:->capability' \ '*:file:_files' \ && ret=0 case "$state" in (capability) if compset -P '*?[=+-]'; then local -a operators=("e:effective" "i:inheritable" "p:permitted") _describe -t operators "operator" operators && ret=0 else _setcap_capabilities && ret=0 fi ;; esac return 0 } (( $+functions[_setcap_capabilities] )) || _setcap_capabilities() { local ret=1 local -a capabilities=( 'cap_audit_control:Enable and disable kernel auditing' 'cap_audit_read:Allow reading the audit log' 'cap_audit_write:Write records to kernel auditing log' 'cap_block_suspend:Employ features that can block system suspend' 'cap_bpf:Employ privileged BPF operations' 'cap_checkpoint_restore:Facilitate checkpoint/restore' 'cap_chown:Make arbitrary changes to file UIDs and GIDs' 'cap_dac_override:Bypass file read, write, and execute permission checks' 'cap_dac_read_search:Bypass file read permission checks' 'cap_fowner:Bypass filesystem UID checks, set extended attrs' "cap_fsetid:Don't clear set-user-ID and set-group-ID permission bits when a file is modified" 'cap_ipc_lock:Lock memory' 'cap_ipc_owner:Bypass checks on SySV IPC object operations' 'cap_kill:Bypass permission checks for sending signals' 'cap_lease:Establish leases on arbitrary files' 'cap_linux_immutable:Set immutability or append only' 'cap_mac_admin:Override Mandatory Access Control' 'cap_mac_override:Allow MAC configuration or state changes' 'cap_mknod:Create special files using mknod(2)' 'cap_net_admin:Perform various network-related operations' 'cap_net_bind_service:Bind a socket to a privileged ports' 'cap_net_broadcast:Make socket broadcasts and listen to multicast' 'cap_net_raw:Use raw sockets' 'cap_perfmon:Employ various performance-monitoring mechanisms' 'cap_setgid:Manipulate process GIDs' 'cap_setfcap:Set file capabilities' "cap_setpcap:Grant or remove any capability in the caller's permitted capability set to or from any other process" 'cap_setuid:Manipulate or forge process UIDs' 'cap_sys_admin:Perform numerous administrative tasks' 'cap_sys_boot:Reboot' 'cap_sys_chroot:Use chroot' 'cap_sys_module:Load kernel module' 'cap_sys_nice:Nice or renice processes' 'cap_sys_pacct:Use acct(2)' 'cap_sys_ptrace:Inspect processes with ptrace or use process_vm_writev' 'cap_sys_rawio:Numerous device IO functions, including performing raw IO and access x86 MSRs' 'cap_sys_resource:Set numerous resource limits' 'cap_sys_time:Set system clock' 'cap_sys_tty_config:Use vhangup(2)' 'cap_syslog:Perform privileged syslog(2) operations' 'cap_wake_alarm:Trigger something that will wake up the system' ) _values -s , capability $capabilities && ret=0 return $ret } _setcap "$@" # 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 ================================================ FILE: src/_setup.py ================================================ #compdef setup.py # ------------------------------------------------------------------------------ # Copyright (C) 2015 by Hideo Hattori # # 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 setup.py (https://docs.python.org/distutils/). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hideo Hattori (https://github.com/hhatto) # # ------------------------------------------------------------------------------ _setup.py() { typeset -A opt_args local context state line _arguments -s -S \ "--verbose[run verbosely (default)]" \ "-v[run verbosely (default)]" \ "--quiet[run quietly (turns verbosity off)]" \ "-q[run quietly (turns verbosity off)]" \ "--dry-run[don't actually do anything]" \ "-n[don't actually do anything]" \ "--help[show detailed help message]" \ "-h[show detailed help message]" \ "--no-user-cfg[ignore pydistutils.cfg in your home directory]" \ "--command-packages=[list of packages that provide distutils commands]" \ "--help-commands[list all available commands]" \ "--name[print package name]" \ "--version[print package version]" \ "-V[print package version]" \ "--fullname[print -]" \ "--author[print the author's name]" \ "--author-email[print the author's email address]" \ "--maintainer[print the maintainer's name]" \ "--maintainer-email[print the maintainer's email address]" \ "--contact[print the maintainer's name if known, else the author's]" \ "--contact-email[print the maintainer's email address if known, else the author's]" \ "--url[print the URL for this package]" \ "--license[print the license of the package]" \ "--licence[alias for --license]" \ "--description[print the package description]" \ "--long-description[print the long package description]" \ "--platforms[print the list of platforms]" \ "--classifiers[print the list of classifiers]" \ "--keywords[print the list of keywords]" \ "--provides[print the list of packages/modules provided]" \ "--requires[print the list of packages/modules required]" \ "--obsoletes[print the list of packages/modules made obsolete]" \ "*::setup.py commands:_setuppy_command" } (( $+functions[_setuppy_command] )) || _setuppy_command() { local cmd ret=1 (( $+setuppy_cmds )) || _setuppy_cmds=( "build:build everything needed to install" \ "build_py:\"build\" pure Python modules (copy to build directory)" \ "build_ext:build C/C++ extensions (compile/link to build directory)" \ "build_clib:build C/C++ libraries used by Python extensions" \ "build_scripts:\"build\" scripts (copy and fixup #! line)" \ "clean:clean up temporary files from 'build' command" \ "install:install everything from build directory" \ "install_lib:install all Python modules (extensions and pure Python)" \ "install_headers:install C/C++ header files" \ "install_scripts:install scripts (Python or otherwise)" \ "install_data:install data files" \ "sdist:create a source distribution (tarball, zip file, etc.)" \ "register:register the distribution with the Python package index" \ "bdist:create a built (binary) distribution" \ "bdist_dumb:create a \"dumb\" built distribution" \ "bdist_rpm:create an RPM distribution" \ "bdist_wininst:create an executable installer for MS Windows" \ "upload:upload binary package to PyPI" \ "check:perform some checks on the package" \ "alias:define a shortcut to invoke one or more commands" \ "bdist_egg:create an \"egg\" distribution" \ "develop:install package in 'development mode'" \ "easy_install:Find/get/install Python packages" \ "egg_info:create a distribution's .egg-info directory" \ "rotate:delete older distributions, keeping N newest files" \ "saveopts:save supplied options to setup.cfg or other config file" \ "setopt:set an option in setup.cfg or another config file" \ "test:run unit tests after in-place build" \ "install_egg_info:Install an .egg-info directory for the package" \ "upload_docs:Upload documentation to PyPI" \ ) if (( CURRENT == 1 )); then _describe -t commands 'setup.py subcommand' _setuppy_cmds || compadd "$@" - ${(s.:.)${(j.:.)_setuppy_syns}} else local curcontext="$curcontext" cmd="${${_setuppy_cmds[(r)$words[1]:*]%%:*}:-${(k)_setuppy_syns[(r)(*:|)$words[1](:*|)]}}" if (( $#cmd )); then curcontext="${curcontext%:*:*}:setuppy-${cmd}:" _call_function ret _setuppy_$cmd || _message 'no more arguments' else _message "unknown setup.py command: $words[1]" fi return ret fi } (( $+functions[_setuppy_build] )) || _setuppy_build() { _arguments -s \ "--build-base=[base directory for build library]" \ "-b[base directory for build library]" \ "--build-purelib=[build directory for platform-neutral distributions]" \ "--build-platlib=[build directory for platform-specific distributions]" \ "--build-lib=[build directory for all distribution (defaults to either build-purelib or build-platlib]" \ "--build-scripts=[build directory for scripts]" \ "--build-temp=[temporary build directory]" \ "-t[temporary build directory]" \ "--plat-name=[platform name to build for, if supported (default: linux-i686)]" \ "-p[platform name to build for, if supported (default: linux-i686)]" \ "--compiler=[specify the compiler type]" \ "-c[specify the compiler type]" \ "--debug[compile extensions and libraries with debugging information]" \ "-g[compile extensions and libraries with debugging information]" \ "--force[forcibly build everything (ignore file timestamps)]" \ "-f[forcibly build everything (ignore file timestamps)]" \ "--executable=[specify final destination interpreter path (build.py)]" \ "-e[specify final destination interpreter path (build.py)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_build_py] )) || _setuppy_build_py() { _arguments -s \ "--build-lib=[directory to \"build\" (copy) to]" \ "-d[directory to \"build\" (copy) to]" \ "--compile[compile .py to .pyc]" \ "-c[compile .py to .pyc]" \ "--no-compile[don't compile .py files \[default\]]" \ "--optimize=[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "-O[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "--force[forcibly build everything (ignore file timestamps)]" \ "-f[forcibly build everything (ignore file timestamps)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_build_ext] )) || _setuppy_build_ext() { _arguments -s \ "--build-lib=[directory for compiled extension modules]" \ "-b[directory for compiled extension modules]" \ "--build-temp=[directory for temporary files (build by-products)]" \ "-t[directory for temporary files (build by-products)]" \ "--plat-name=[platform name to cross-compile for, if supported (default: linux-i686)]" \ "-p[platform name to cross-compile for, if supported (default: linux-i686)]" \ "--inplace[ignore build-lib and put compiled extensions into the source directory alongside your pure Python modules]" \ "-i[ignore build-lib and put compiled extensions into the source directory alongside your pure Python modules]" \ "--include-dirs=[list of directories to search for header files (separated by ':')]" \ "-I[list of directories to search for header files (separated by ':')]" \ "--define=[C preprocessor macros to define]" \ "-D[C preprocessor macros to define]" \ "--undef=[C preprocessor macros to undefine]" \ "-U[C preprocessor macros to undefine]" \ "--libraries=[external C libraries to link with]" \ "-l[external C libraries to link with]" \ "--library-dirs=[directories to search for external C libraries (separated by ':')]" \ "-L[directories to search for external C libraries (separated by ':')]" \ "--rpath=[directories to search for shared C libraries at runtime]" \ "-R[directories to search for shared C libraries at runtime]" \ "--link-objects=[extra explicit link objects to include in the link]" \ "-O[extra explicit link objects to include in the link]" \ "--debug[compile/link with debugging information]" \ "-g[compile/link with debugging information]" \ "--force[forcibly build everything (ignore file timestamps)]" \ "-f[forcibly build everything (ignore file timestamps)]" \ "--compiler=[specify the compiler type]" \ "-c[specify the compiler type]" \ "--swig-cpp[make SWIG create C++ files (default is C)]" \ "--swig-opts=[list of SWIG command line options]" \ "--swig=[path to the SWIG executable]" \ "--user[add user include, library and rpath]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_build_clib] )) || _setuppy_build_clib() { _arguments -s \ "--build-clib=[directory to build C/C++ libraries to]" \ "-b[directory to build C/C++ libraries to]" \ "--build-temp=[directory to put temporary build by-products]" \ "-t[directory to put temporary build by-products]" \ "--debug[compile with debugging information]" \ "-g[compile with debugging information]" \ "--force[forcibly build everything (ignore file timestamps)]" \ "-f[forcibly build everything (ignore file timestamps)]" \ "--compiler=[specify the compiler type]" \ "-c[specify the compiler type]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_build_scripts] )) || _setuppy_build_scripts() { _arguments -s \ "--build-dir=[directory to \"build\" (copy) to]" \ "-d[directory to \"build\" (copy) to]" \ "--force[forcibly build everything (ignore file timestamps]" \ "-f[forcibly build everything (ignore file timestamps]" \ "--executable=[specify final destination interpreter path]" \ "-e[specify final destination interpreter path]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_clean] )) || _setuppy_clean() { _arguments -s \ "--build-base=[base build directory (default: 'build.build-base')]" \ "-b[base build directory (default: 'build.build-base')]" \ "--build-lib=[build directory for all modules (default: 'build.build-lib')]" \ "--build-temp=[temporary build directory (default: 'build.build-temp')]" \ "-t[temporary build directory (default: 'build.build-temp')]" \ "--build-scripts=[build directory for scripts (default: 'build.build-scripts')]" \ "--bdist-base=[temporary directory for built distributions]" \ "--all[remove all build output, not just temporary by-products]" \ "-a[remove all build output, not just temporary by-products]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install] )) || _setuppy_install() { _arguments -s \ "--prefix=[installation prefix]" \ "--exec-prefix=[(Unix only) prefix for platform-specific files]" \ "--home=[(Unix only) home directory to install under]" \ "--user[install in user site-package]" \ "--install-base=[base installation directory (instead of --prefix or --home)]" \ "--install-platbase=[base installation directory for platform-specific files (instead of --exec-prefix or --home)]" \ "--root=[install everything relative to this alternate root directory]" \ "--install-purelib=[installation directory for pure Python module distributions]" \ "--install-platlib=[installation directory for non-pure module distributions]" \ "--install-lib=[installation directory for all module distributions (overrides --install-purelib and --install-platlib)]" \ "--install-headers=[installation directory for C/C++ headers]" \ "--install-scripts=[installation directory for Python scripts]" \ "--install-data=[installation directory for data files]" \ "--compile[compile .py to .pyc \[default\]]" \ "-c[compile .py to .pyc \[default\]]" \ "--no-compile[don't compile .py files]" \ "--optimize=[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "-O[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "--force[force installation (overwrite any existing files)]" \ "-f[force installation (overwrite any existing files)]" \ "--skip-build[skip rebuilding everything (for testing/debugging)]" \ "--record=[filename in which to record list of installed files]" \ "--old-and-unmanageable[Try not to use this!]" \ "--single-version-externally-managed[used by system package builders to create 'flat' eggs]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install_lib] )) || _setuppy_install_lib() { _arguments -s \ "--install-dir=[directory to install to]" \ "-d[directory to install to]" \ "--build-dir=[build directory (where to install from)]" \ "-b[build directory (where to install from)]" \ "--force[force installation (overwrite existing files)]" \ "-f[force installation (overwrite existing files)]" \ "--compile[compile .py to .pyc \[default\]]" \ "-c[compile .py to .pyc \[default\]]" \ "--no-compile[don't compile .py files]" \ "--optimize=[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "-O[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "--skip-build[skip the build steps]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install_headers] )) || _setuppy_install_headers() { _arguments -s \ "--install-dir=[directory to install header files to]" \ "-d[directory to install header files to]" \ "--force[force installation (overwrite existing files)]" \ "-f[force installation (overwrite existing files)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install_scripts] )) || _setuppy_install_scripts() { _arguments -s \ "--install-dir=[directory to install scripts to]" \ "-d[directory to install scripts to]" \ "--build-dir=[build directory (where to install from)]" \ "-b[build directory (where to install from)]" \ "--force[force installation (overwrite existing files)]" \ "-f[force installation (overwrite existing files)]" \ "--skip-build[skip the build steps]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install_data] )) || _setuppy_install_data() { _arguments -s \ "--install-dir=[base directory for installing data files (default: installation base dir)]" \ "-d[base directory for installing data files (default: installation base dir)]" \ "--root=[install everything relative to this alternate root directory]" \ "--force[force installation (overwrite existing files)]" \ "-f[force installation (overwrite existing files)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_sdist] )) || _setuppy_sdist() { _arguments -s \ "--formats=[formats for source distribution (comma-separated list)]" \ "--keep-temp[keep the distribution tree around after creating archive file(s)]" \ "-k[keep the distribution tree around after creating archive file(s)]" \ "--dist-dir=[directory to put the source distribution archive(s) in \[default: dist\]]" \ "-d[directory to put the source distribution archive(s) in \[default: dist\]]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_register] )) || _setuppy_register() { _arguments -s \ "--repository=[url of repository \[default: https://pypi.python.org/pypi\]]" \ "-r[url of repository \[default: https://pypi.python.org/pypi\]]" \ "--show-response[display full response text from server]" \ "--list-classifiers[list the valid Trove classifiers]" \ "--strict[Will stop the registering if the meta-data are not fully compliant]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_bdist] )) || _setuppy_bdist() { _arguments -s \ "--bdist-base=[temporary directory for creating built distributions]" \ "-b[temporary directory for creating built distributions]" \ "--plat-name=[platform name to embed in generated filenames (default: linux-i686)]" \ "-p[platform name to embed in generated filenames (default: linux-i686)]" \ "--formats=[formats for distribution (comma-separated list)]" \ "--dist-dir=[directory to put final built distributions in \[default: dist\]]" \ "-d[directory to put final built distributions in \[default: dist\]]" \ "--skip-build[skip rebuilding everything (for testing/debugging)]" \ "--owner=[Owner name used when creating a tar file \[default: current user\]]" \ "-u[Owner name used when creating a tar file \[default: current user\]]" \ "--group=[Group name used when creating a tar file \[default: current group\]]" \ "-g[Group name used when creating a tar file \[default: current group\]]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_bdist_dumb] )) || _setuppy_bdist_dumb() { _arguments -s \ "--bdist-dir=[temporary directory for creating the distribution]" \ "-d[temporary directory for creating the distribution]" \ "--plat-name=[platform name to embed in generated filenames (default: linux-i686)]" \ "-p[platform name to embed in generated filenames (default: linux-i686)]" \ "--format=[archive format to create (tar, ztar, gztar, zip)]" \ "-f[archive format to create (tar, ztar, gztar, zip)]" \ "--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]" \ "-k[keep the pseudo-installation tree around after creating the distribution archive]" \ "--dist-dir=[directory to put final built distributions in]" \ "-d[directory to put final built distributions in]" \ "--skip-build[skip rebuilding everything (for testing/debugging)]" \ "--relative[build the archive using relative paths(default: false)]" \ "--owner=[Owner name used when creating a tar file \[default: current user\]]" \ "-u[Owner name used when creating a tar file \[default: current user\]]" \ "--group=[Group name used when creating a tar file \[default: current group\]]" \ "-g[Group name used when creating a tar file \[default: current group\]]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_bdist_rpm] )) || _setuppy_bdist_rpm() { _arguments -s \ "--bdist-base=[base directory for creating built distributions]" \ "--rpm-base=[base directory for creating RPMs (defaults to \"rpm\" under --bdist-base; must be specified for RPM 2)]" \ "--dist-dir=[directory to put final RPM files in (and .spec files if --spec-only)]" \ "-d[directory to put final RPM files in (and .spec files if --spec-only)]" \ "--python=[path to Python interpreter to hard-code in the .spec file (default: \"python\")]" \ "--fix-python[hard-code the exact path to the current Python interpreter in the .spec file]" \ "--spec-only[only regenerate spec file]" \ "--source-only[only generate source RPM]" \ "--binary-only[only generate binary RPM]" \ "--use-bzip2[use bzip2 instead of gzip to create source distribution]" \ "--distribution-name=[name of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)]" \ "--group=[package classification \[default: \"Development/Libraries\"\]]" \ "--release=[RPM release number]" \ "--serial=[RPM serial number]" \ "--vendor=[RPM \"vendor\" (eg. \"Joe Blow \") \[default: maintainer or author from setup script\]]" \ "--packager=[RPM packager (eg. \"Jane Doe \")\[default: vendor\]]" \ "--doc-files=[list of documentation files (space or comma-separated)]" \ "--changelog=[RPM changelog]" \ "--icon=[name of icon file]" \ "--provides=[capabilities provided by this package]" \ "--requires=[capabilities required by this package]" \ "--conflicts=[capabilities which conflict with this package]" \ "--build-requires=[capabilities required to build this package]" \ "--obsoletes=[capabilities made obsolete by this package]" \ "--no-autoreq[do not automatically calculate dependencies]" \ "--keep-temp[don't clean up RPM build directory]" \ "-k[don't clean up RPM build directory]" \ "--no-keep-temp[clean up RPM build directory \[default\]]" \ "--use-rpm-opt-flags[compile with RPM_OPT_FLAGS when building from source RPM]" \ "--no-rpm-opt-flags[do not pass any RPM CFLAGS to compiler]" \ "--rpm3-mode[RPM 3 compatibility mode (default)]" \ "--rpm2-mode[RPM 2 compatibility mode]" \ "--prep-script=[Specify a script for the PREP phase of RPM building]" \ "--build-script=[Specify a script for the BUILD phase of RPM building]" \ "--pre-install=[Specify a script for the pre-INSTALL phase of RPM building]" \ "--install-script=[Specify a script for the INSTALL phase of RPM building]" \ "--post-install=[Specify a script for the post-INSTALL phase of RPM building]" \ "--pre-uninstall=[Specify a script for the pre-UNINSTALL phase of RPM building]" \ "--post-uninstall=[Specify a script for the post-UNINSTALL phase of RPM building]" \ "--clean-script=[Specify a script for the CLEAN phase of RPM building]" \ "--verify-script=[Specify a script for the VERIFY phase of the RPM build]" \ "--force-arch=[Force an architecture onto the RPM build process]" \ "--quiet[Run the INSTALL phase of RPM building in quiet mode]" \ "-q[Run the INSTALL phase of RPM building in quiet mode]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_bdist_wininst] )) || _setuppy_bdist_wininst() { _arguments -s \ "--bdist-dir=[temporary directory for creating the distribution]" \ "--plat-name=[platform name to embed in generated filenames (default: linux-i686)]" \ "-p[platform name to embed in generated filenames (default: linux-i686)]" \ "--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]" \ "-k[keep the pseudo-installation tree around after creating the distribution archive]" \ "--target-version=[require a specific python version on the target system]" \ "--no-target-compile[do not compile .py to .pyc on the target system]" \ "-c[do not compile .py to .pyc on the target system]" \ "--no-target-optimize[do not compile .py to .pyo (optimized)on the target system]" \ "-o[do not compile .py to .pyo (optimized)on the target system]" \ "--dist-dir=[directory to put final built distributions in]" \ "-d[directory to put final built distributions in]" \ "--bitmap=[bitmap to use for the installer instead of python-powered logo]" \ "-b[bitmap to use for the installer instead of python-powered logo]" \ "--title=[title to display on the installer background instead of default]" \ "-t[title to display on the installer background instead of default]" \ "--skip-build[skip rebuilding everything (for testing/debugging)]" \ "--install-script=[basename of installation script to be run after installation or before uninstallation]" \ "--pre-install-script=[Fully qualified filename of a script to be run before any files are installed. This script need not be in the distribution]" \ "--user-access-control=[specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_upload] )) || _setuppy_upload() { _arguments -s \ "--repository=[url of repository \[default: https://pypi.python.org/pypi\]]" \ "-r[url of repository \[default: https://pypi.python.org/pypi\]]" \ "--show-response[display full response text from server]" \ "--sign[sign files to upload using gpg]" \ "-s[sign files to upload using gpg]" \ "--identity=[GPG identity used to sign files]" \ "-i[GPG identity used to sign files]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_check] )) || _setuppy_check() { _arguments -s \ "--metadata[Verify meta-data]" \ "-m[Verify meta-data]" \ "--restructuredtext[Checks if long string meta-data syntax are reStructuredText-compliant]" \ "-r[Checks if long string meta-data syntax are reStructuredText-compliant]" \ "--strict[Will exit with an error if a check fails]" \ "-s[Will exit with an error if a check fails]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_alias] )) || _setuppy_alias() { _arguments -s \ "--remove[remove (unset) the alias]" \ "-r[remove (unset) the alias]" \ "--global-config[save options to the site-wide distutils.cfg file]" \ "-g[save options to the site-wide distutils.cfg file]" \ "--user-config[save options to the current user's pydistutils.cfg file]" \ "-u[save options to the current user's pydistutils.cfg file]" \ "--filename=[configuration file to use (default=setup.cfg)]" \ "-f[configuration file to use (default=setup.cfg)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_bdist_egg] )) || _setuppy_bdist_egg() { _arguments -s \ "--bdist-dir=[temporary directory for creating the distribution]" \ "-b[temporary directory for creating the distribution]" \ "--plat-name=[platform name to embed in generated filenames (default: linux-i686)]" \ "-p[platform name to embed in generated filenames (default: linux-i686)]" \ "--exclude-source-files[remove all .py files from the generated egg]" \ "--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]" \ "-k[keep the pseudo-installation tree around after creating the distribution archive]" \ "--dist-dir=[directory to put final built distributions in]" \ "-d[directory to put final built distributions in]" \ "--skip-build[skip rebuilding everything (for testing/debugging)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_develop] )) || _setuppy_develop() { _arguments -s \ "--prefix=[installation prefix]" \ "--zip-ok[install package as a zipfile]" \ "-z[install package as a zipfile]" \ "--multi-version[make apps have to require() a version]" \ "-m[make apps have to require() a version]" \ "--upgrade[force upgrade (searches PyPI for latest versions)]" \ "-U[force upgrade (searches PyPI for latest versions)]" \ "--install-dir=[install package to DIR]" \ "-d[install package to DIR]" \ "--script-dir=[install scripts to DIR]" \ "-s[install scripts to DIR]" \ "--exclude-scripts[Don't install scripts]" \ "-x[Don't install scripts]" \ "--always-copy[Copy all needed packages to install dir]" \ "-a[Copy all needed packages to install dir]" \ "--index-url=[base URL of Python Package Index]" \ "-i[base URL of Python Package Index]" \ "--find-links=[additional URL(s) to search for packages]" \ "-f[additional URL(s) to search for packages]" \ "--build-directory=[download/extract/build in DIR; keep the results]" \ "-b[download/extract/build in DIR; keep the results]" \ "--optimize=[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "-O[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "--record=[filename in which to record list of installed files]" \ "--always-unzip[don't install as a zipfile, no matter what]" \ "-Z[don't install as a zipfile, no matter what]" \ "--site-dirs=[list of directories where .pth files work]" \ "-S[list of directories where .pth files work]" \ "--editable[Install specified packages in editable form]" \ "-e[Install specified packages in editable form]" \ "--no-deps[don't install dependencies]" \ "-N[don't install dependencies]" \ "--allow-hosts=[pattern(s) that hostnames must match]" \ "-H[pattern(s) that hostnames must match]" \ "--local-snapshots-ok[allow building eggs from local checkouts]" \ "-l[allow building eggs from local checkouts]" \ "--version[print version information and exit]" \ "--no-find-links[Don't load find-links defined in packages being installed]" \ "--user[install in user site-package]" \ "--uninstall[Uninstall this source package]" \ "-u[Uninstall this source package]" \ "--egg-path=[Set the path to be used in the .egg-link file]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_easy_install] )) || _setuppy_easy_install() { _arguments -s \ "--prefix=[installation prefix]" \ "--zip-ok[install package as a zipfile]" \ "-z[install package as a zipfile]" \ "--multi-version[make apps have to require() a version]" \ "-m[make apps have to require() a version]" \ "--upgrade[force upgrade (searches PyPI for latest versions)]" \ "-U[force upgrade (searches PyPI for latest versions)]" \ "--install-dir=[install package to DIR]" \ "-d[install package to DIR]" \ "--script-dir=[install scripts to DIR]" \ "-s[install scripts to DIR]" \ "--exclude-scripts[Don't install scripts]" \ "-x[Don't install scripts]" \ "--always-copy[Copy all needed packages to install dir]" \ "-a[Copy all needed packages to install dir]" \ "--index-url=[base URL of Python Package Index]" \ "-i[base URL of Python Package Index]" \ "--find-links=[additional URL(s) to search for packages]" \ "-f[additional URL(s) to search for packages]" \ "--build-directory=[download/extract/build in DIR; keep the results]" \ "-b[download/extract/build in DIR; keep the results]" \ "--optimize=[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "-O[also compile with optimization: -O1 for \"python -O\", -O2 for \"python -OO\", and -O0 to disable \[default: -O0\]]" \ "--record=[filename in which to record list of installed files]" \ "--always-unzip[don't install as a zipfile, no matter what]" \ "-Z[don't install as a zipfile, no matter what]" \ "--site-dirs=[list of directories where .pth files work]" \ "-S[list of directories where .pth files work]" \ "--editable[Install specified packages in editable form]" \ "-e[Install specified packages in editable form]" \ "--no-deps[don't install dependencies]" \ "-N[don't install dependencies]" \ "--allow-hosts=[pattern(s) that hostnames must match]" \ "-H[pattern(s) that hostnames must match]" \ "--local-snapshots-ok[allow building eggs from local checkouts]" \ "-l[allow building eggs from local checkouts]" \ "--version[print version information and exit]" \ "--no-find-links[Don't load find-links defined in packages being installed]" \ "--user[install in user site-package]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_egg_info] )) || _setuppy_egg_info() { _arguments -s \ "--egg-base=[directory containing .egg-info directories (default: top of the source tree)]" \ "-e[directory containing .egg-info directories (default: top of the source tree)]" \ "--tag-svn-revision[Add subversion revision ID to version number]" \ "-r[Add subversion revision ID to version number]" \ "--tag-date[Add date stamp (e.g. 20050528) to version number]" \ "-d[Add date stamp (e.g. 20050528) to version number]" \ "--tag-build=[Specify explicit tag to add to version number]" \ "-b[Specify explicit tag to add to version number]" \ "--no-svn-revision[Don't add subversion revision ID \[default\]]" \ "-R[Don't add subversion revision ID \[default\]]" \ "--no-date[Don't include date stamp \[default\]]" \ "-D[Don't include date stamp \[default\]]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_rotate] )) || _setuppy_rotate() { _arguments -s \ "--match=[patterns to match (required)]" \ "-m[patterns to match (required)]" \ "--dist-dir=[directory where the distributions are]" \ "-d[directory where the distributions are]" \ "--keep=[number of matching distributions to keep]" \ "-k[number of matching distributions to keep]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_saveopts] )) || _setuppy_saveopts() { _arguments -s \ "--global-config[save options to the site-wide distutils.cfg file]" \ "-g[save options to the site-wide distutils.cfg file]" \ "--user-config[save options to the current user's pydistutils.cfg file]" \ "-u[save options to the current user's pydistutils.cfg file]" \ "--filename=[configuration file to use (default=setup.cfg)]" \ "-f[configuration file to use (default=setup.cfg)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_setopt] )) || _setuppy_setopt() { _arguments -s \ "--command=[command to set an option for]" \ "-c[command to set an option for]" \ "--option=[option to set]" \ "-o[option to set]" \ "--set-value=[value of the option]" \ "-s[value of the option]" \ "--remove[remove (unset) the value]" \ "-r[remove (unset) the value]" \ "--global-config[save options to the site-wide distutils.cfg file]" \ "-g[save options to the site-wide distutils.cfg file]" \ "--user-config[save options to the current user's pydistutils.cfg file]" \ "-u[save options to the current user's pydistutils.cfg file]" \ "--filename=[configuration file to use (default=setup.cfg)]" \ "-f[configuration file to use (default=setup.cfg)]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_test] )) || _setuppy_test() { _arguments -s \ "--test-module=[Run 'test_suite' in specified module]" \ "-m[Run 'test_suite' in specified module]" \ "--test-suite=[Test suite to run (e.g. 'some_module.test_suite')]" \ "-s[Test suite to run (e.g. 'some_module.test_suite')]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_install_egg_info] )) || _setuppy_install_egg_info() { _arguments -s \ "--install-dir=[directory to install to]" \ "-d[directory to install to]" \ "*::setup.py commands:_setup.py" } (( $+functions[_setuppy_upload_docs] )) || _setuppy_upload_docs() { _arguments -s \ "--repository=[url of repository \[default: https://pypi.python.org/pypi\]]" \ "-r[url of repository \[default: https://pypi.python.org/pypi\]]" \ "--show-response[display full response text from server]" \ "--upload-dir=[directory to upload]" \ "*::setup.py commands:_setup.py" } _setup.py "$@" # 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 ================================================ FILE: src/_shallow-backup ================================================ #compdef shallow-backup # ------------------------------------------------------------------------------ # Copyright (c) 2023 Aaron Lichtman -- https://github.com/alichtman # 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 shallow-backup v6.4: https://github.com/alichtman/shallow-backup # # ------------------------------------------------------------------------------ # Authors # ------- # # * Aaron Lichtman (https://github.com/alichtman) # # ------------------------------------------------------------------------------ _arguments \ '(- 1 *)'{-h,--help}'[Show help and exit]' \ '(- 1 *)'{-v,--version}'[Print version]' \ '--add-dot[Add a dotfile or dotfolder to config by path]:PATH:_files' \ '--backup-all[Full back up]' \ '--backup-configs[Back up app config files]' \ '--backup-dots[Back up dotfiles]' \ '--backup-fonts[Back up installed fonts]' \ '--backup-packages[Back up package libraries]' \ '--delete-config[Delete config file]' \ '--destroy-backup[Delete backup directory]' \ '--dry-run[Do not backup or reinstall any files, just give verbose output]' \ '--new-path[Input a new back up directory path]:PATH:_files -/' \ '--no-new-backup-path-prompt[Skip setting new back up directory path prompt]' \ '--no-splash[Do not display splash screen]' \ '--reinstall-all[Full reinstallation]' \ '--reinstall-configs[Reinstall configs]' \ '--reinstall-dots[Reinstall dotfiles and dotfolders]' \ '--reinstall-fonts[Reinstall fonts]' \ '--reinstall-packages[Reinstall packages]' \ '--remote[Set remote URL for the git repo]:url' \ '--edit[Open config file in $EDITOR]' \ '--show[Display config file]' # 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 ================================================ FILE: src/_shellcheck ================================================ #compdef shellcheck # ------------------------------------------------------------------------------ # Copyright (c) 2021 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 shellcheck v0.10.0 (https://github.com/koalaman/shellcheck) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Khue Nguyen (https://github.com/Z5483) # # ------------------------------------------------------------------------------ _arguments \ {-a,--check-sourced}'[include warnings from sourced file]' \ {-C,--color=}'[specify color]:color:(auto always never)' \ {-i,--include=}'[consider only given types of warnings]:error code' \ {-e,--exclude=}'[exclude given types of warnings]:error code' \ '--extended-analysis=[perform dataflow analysis]:bool:(true false)' \ {-f,--format=}'[specify output format]:format:(checkstyle diff gcc json json1 quiet tty)' \ '--list-optional[list checks disabled by default]' \ "--norc[don't look for .shellcheckrc files]" \ '--rcfile=[specify configuration file over searching for one]:rcfile:_files' \ {-o,--enable=}"[give list of optional checks to enable (or 'all')]:error code" \ {-P,--source-path=}'[specify path when looking for sourced files]:path:_files -/' \ {-s,--shell=}'[specify dialect]:dialect:(sh bash dash ksh busybox)' \ {-S,--severity=}'[specify minimum severity of errors to consider]:severity:(error warning info style)' \ {-V,--version}'[print version information]' \ {-W,--wiki-link-count=}'[specify number of wiki links to show, when applicable]:number' \ {-x,--external-sources}'[allow outside sources]' \ '(- *)--help[show this usage summary and exit]' \ '*: :_files' # 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 ================================================ FILE: src/_showoff ================================================ #compdef showoff # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 Showoff 0.20.3 (https://github.com/puppetlabs/showoff). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Bruno Michel (https://github.com/nono) # * Shohei Yoshida (https://github.com/nono) # # ------------------------------------------------------------------------------ _showoff_subcommands() { local -a commands=( "add:Add a new slide at the end in a given dir" "new:Add a new slide at the end in a given dir" "create:Create new showoff presentation" "init:Create new showoff presentation" "github:Puts your showoff presentation into a gh-pages branch" "help:Shows a list of commands or help for one command" "heroku:Setup your presentation to serve on Heroku" "info:Display information about a Showoff presentation" "pdf:Generate PDF version of presentation" "serve:Serves the showoff presentation in the specified (or current) directory" "skeleton:Build a showoff presentation from a showoff.json outline" "static:Generate static version of presentation" "validate:Validate the consistency of your presentation" ) _describe -t commands 'showoff command' commands } _showoff_help() { local -a commands=(${(@f)"$(showoff help -c 2>/dev/null)"}) _values 'commands' $commands } _showoff() { local curcontext="$curcontext" state line ret=1 _arguments -C \ '--debug[Show application backtraces on crash]' \ '--dev[Use the next-gen development version of Showoff]' \ '(- *)--help[Show help message]' \ '(- *)--version[Display the program version]' \ '1: :_showoff_subcommands' \ '*:: :->args' \ && ret=0 case $state in (args) case $line[1] in (add|new) _arguments \ '(-d --dir)'{-d,--dir}='[Slide dir (where to put a new slide file)]:directory:_files -/' \ '(-n --name)'{-n,--name}='[Slide name (name of the new slide file)]:basename' \ {-s,--source}='[Include code from the given file as the slide body]:file:_files' \ '(-t --style --type)'{-t,--style,--type}='[Slide Type/Style (default: title)]:style' \ '(-u --nonumber)'{-u,--nonumber}"[Don't number the slide, use the given name verbatim]" \ '1:title' && ret=0 ;; (create|init) _arguments \ '(-d --slidedir)'{-d,--slidedir}='[Sample slide directory name (default: one)]:arg' \ '(-n --nosamples)'{-n,--nosamples}="[Don't create sample slides]" \ '1:dir_name' && ret=0 ;; (help) _arguments \ '-c[List commands one per line, to assist with shell completion]' \ '1: :_showoff_help' && ret=0 ;; (heroku) _arguments \ '(-f --force)'{-f,--force}'[force overwrite of existing Gemfile, .gems and config.ru files if they exist]' \ '(-p --password)'{-p,--password}='[add password protection to your heroku site(default: none)]' \ '1:heroku_name' && ret=0 ;; (info) _arguments \ '(-f --file)'{-f,--file}='[alternate json filename]: :_files -g "*.json"' \ '(-j --json)'{-j,--json}'[render output as json]' \ && ret=0 ;; (pdf|static) _arguments \ '(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \ '(-l --lang --language --locale)'{-l,--lang,--language,--locale}'[Language code to generate(default: none)]' \ '1:name' \ && ret=0 ;; (serve) _arguments \ '(-S --standalone)'{-S,--standalone}'[Run in standalone mode with no audience interaction]' \ '(-f --file --pres_file)'{-f,--file,--pres_file}='[JSON file used to describe presentation(default: showoff.json)]: :_files -g "*.json"' \ '--git_branch=[Branch of git repository to use(default: none)]:branch' \ '--git_path=[Path of the presentation within the git repository(default: none)]:path' \ '(-h --host)'{-h,--host}='[Host or IP to run on(default: 0.0.0.0)]' \ '--nocache[Disable content caching]'\ '--nosleep[Prevent the computer from sleeping during your presentation]' \ '(-p --port)'{-p,--port}='[Port on which to run(default: 9090)]' \ '(-r --review)'{-r,--review}'[Enable code review]'\ '(-s --ssl)'{-s,--ssl}'[Run via HTTPS]' \ '--ssl_certificate=[Path to SSL certificate]: :_files' \ '--ssl_private_key=[Path to SSL private key]: :_files' \ '(-u --url --git_url)'{-u,--url,--git_url}='[GIT URL to a repository containing the presentation]:url' \ '(-v --verbose)'{-v,--verbose}'[Show verbose messaging]' \ '(-x --execute --executecode)'{-x,--execute,--executecode}'[Enable remote code execution]' \ '1: :_files -/' && ret=0 ;; (skeleton|validate) _arguments \ '(-f --file)'{-f,--file}'=[alternate json filename(default: none)]: :_files -g "*.json"' \ && ret=0 ;; *) (( ret )) && _message 'no more arguments' ;; esac ;; esac return ret } _showoff "$@" # 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 ================================================ FILE: src/_sox_ng ================================================ #compdef sox_ng soxi_ng play_ng rec_ng sox soxi play rec # ------------------------------------------------------------------------------ # 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 sox_ng v14.7.0 (https://codeberg.org/sox_ng/sox_ng) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _sox_ng_common() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 local service="$1" local -a sox_ng_global_options=( '(--buffer --input-buffer)'{--buffer,--input-buffer}'[set the size in bytes of the buffers used for processing audio(default: 8192)]:size' '(--clobber --no-clobber)--clobber[do not prompt before overwriting an existing file]' '--combine[select the input file combining method]:type:(concatenate merge mix mix-power multiply sequence)' '(-D --no-dither)'{-D,--no-dither}'[disable automatic dither]' '--effects-file[read a file to obtain all effects and their arguments]:file:_files' '(-G --guard)'{-G,--guard}'[automatically invoke the gain effect to guard against clipping]' '(- *)'{-h,--help}'[show version number and usage information]' '--help-effect[show usage information for the specified effect]:effect:_sox_ng_effects' '--help-format[show information about the specified file format]' '(--i --info)'{--i,--info}'[behave as soxi_ng]' '(-m -M)'{-m,-M}'[equivalent to --combine mix and --combine merge respectively]' '--magic[enable libmagic library to help to detect audio file types]' '(--multi-threaded --single-threaded)--multi-threaded[process in parallel]' '(--multi-threaded --single-threaded)--single-threaded[process at a time]' '(--clobber --no-clobber)--no-clobber[prompt before overwriting an existing file]' '--norm=-[automatically invoke the gain effect to guard against clipping and to normalize the audio]:level' '--play-rate-arg[select a quality option to be used when the rate effect is invoked]:rate' '--plot[set plot mode]:mode:(gnuplot octave off)' '(-q --no-show-progress)'{-q,--no-show-progress}'[run in quiet mode]' '-R[run in "repeatable" mode]' '--replay-gain[select whether or not to apply replay gain adjustment to input files]:gain:(track album off)' '(-S --show-progress)'{-S,--show-progress}'[display input file format/header information]' '-T[equivalent to --combine multiply]' '--temp[specified that any temporary files should be created in the given directory]:dir:_files -/' '(- *)--version[show version number and exit]' '-V[set verbosity]:level:(0 1 2 3 4 5 6)' ) local -a sox_ng_format_options=( "--ignore-length[override the audio length given in an audio file's header]" '(-v --volume)'{-v,--volume}'[adjust the volume of the file by a factor of factor]:factor' '(-b --bits)'{-b,--bits}'[set the number of bits in each encoded sample]:bits' '(-c --channels)'{-c,--channels}'[set the number of audio channels in the audio file]' '(-e --encoding)'{-e,--encoding}'[set the audio encoding type]:type:_sox_ng_audio_encoding_type' '--no-glob[specify that filename "globbing should not be performed by Sox on the following filename"]' '(-r --rate)'{-r,--rate}'[give the sample rate in Hz of the file]:rate' '(-t --type)'{-t,--type}'[give the type of an audio file]:type:_sox_ng_supported_formats' '(-L -B -X --endian)-L[the byte order of the audio file is little endian]' '(-L -B -X --endian)-B[the byte order of the audio file is big endian]' '(-L -B -X --endian)-x[the byte order of the audio file should be reversed]' '(-L -B -X --endian)--endian[the byte order of the audio file]:type:(little big swap)' '(-N --reverse-nibbles)'{-N,--reverse-nibbles}'[nibble ordering of the samples should be reversed]' '(-X --reverse-bits)'{-X,--reverse-bits}'[bit ordering of the samples should be reversed]' '--add-comment[append a comment to the output file header]:comment' '--comment[specify the comment text to store in the output file header]:comment' '--comment-file[specify a file containing the comment text to store in the output file header]:file:_files' '(-C --compression)'{-C,--compression}'[set the compression factor for output file formats]:factor' ) local -a sox_ng_effects=( allpass band bandpass bandreject bass treble bend biquad centercut channels chorus compand contrast dcshift deemph delay dither dolbyb dop downsample earwax gain echo echos equalizer fade fir firfit flanger highpass hilbert ladspa loudness lowpass mcompand noiseprof noisered norm oops overdrive pad phaser pitch rate remix repeat reverb reverse riaa saturation sdm silence sinc softvol spectrogram speed speexdsp splice stat stats stretch swap synth tempo treble tremolo trim upsample vad vol ) _arguments -s \ $sox_ng_global_options[@] \ $sox_ng_format_options[@] \ '*:: :_sox_ng_file_or_effect' \ && ret=0 return ret } _sox_ng_file_or_effect() { _alternative \ 'file: :_files' \ 'effect: :_sox_ng_effect' } _sox_ng_effect() { local ret=1 local last_index=0 local index=1 for word in $words[@]; do if [[ $words[$index] != -* ]]; then last_index=$index fi (( index++ )) done if [[ $last_index == 0 ]]; then _sox_ng_effects && ret=0 return ret fi local effect=$words[$last_index] if (( ! ${sox_ng_effects[(I)$effect]} )); then _sox_ng_effects && ret=0 return ret fi local -a sox_ng_dither_filters=( lipshitz f-weighted modified-e-weighted improved-e-weighted gesemann shibata low-shibata high-shibata shibata-A0 shibata-A1 shibata-A2 shibata-A3 shibata-A4 shibata-A5 shibata-A6 shibata-B0 shibata-B1 shibata-B2 shibata-B3 shibata-B4 shibata-B5 shibata-B6 shibata-A-saturated ) local -a sox_ng_sdm_filters=( clans-4 clans-5 clans-6 clans-7 clans-8 sdm-4 sdm-5 sdm-6 sdm-7 sdm-8 ) local -a options=() case "$effect" in (allpass|highpass|lowpass) options=( '-1:use 1-pole filter' '-2:use 2-pole filter' ) ;; (band) options=( '-n:introduce a power gain of about 11dB in the filter' ) ;; (bandpass|bandreject) options=( '-c:select a constant skirt gain instead of the default' ) ;; (bend) options=( '-f:frame rate]:frame_rate' '-o:over sampling]:sampling' ) ;; (centercut) options=( '-a:gain out for all channels:gain' '-b:move the bass out of the center into the sides' '-w:change the window size:window_size' ) ;; (chorus|flanger|phaser) options=( '-n:no interpolation' '-l:do linear interpolation between samples' '-q:ask for quadratic interpolation which is about 40% slower but makes it less noisy' '-s:sinusoidal modulation' '-t:triangular modulation' ) ;; (dither) options=( '-S:select a slightly "sloped" TPDF' '-s:enable noise-shaping with the shibata filter' '-f:select filter:filter:(($sox_ng_dither_filters))' '-a:enable a mode where dithering are automatically enabled only when needed' '-p:override the target precision in bits(from 1 to 24):bit' ) ;; (dolbyb) options=( '(-e -d)-e:do Dolby B encoding' '(-e -d)-d:do Dolby B decoding' '-u:set the upsample ratio to use in the sliding filter:upsample' '-h:upsample is used throughout the effect from when the audio enters to when it leaves' '-t:adjust the gain when the audio is fed to the Dolby gain control circuits:threshold' '-a:set how accurate it needs to be before it is considered OK:accuracy' '-f:filter type to use:type:(1 2 3 4)' ) ;; (gain) options=( '-e:the levels of the audio channels of a multichannel' '-B:balance option' '-b:balance option but has clipping protection' '-r:used in conjunction with a prior invocation of gain with the -h option' '-n:normalize the audio to 0dB FSD' '-l:invoke a simple limiter' '-h:apply gain to provide headroom for subsequent processing' ) ;; (hilbert) options=( '-n:the number of filter taps:taps' ) ;; (ladspa) options=( '-l:latency compensation' '-r:allow cloning a mono plugins to handle multichannel input' ) ;; (rate) options=( '-q:quality level is quick' '-l:quality level is low' '-m:quality level is medium' '-g:quality level is generic' '-h:quality level is high' '-e:quality level is extreme' '-v:quality level is very high' '-u:quality level is ultra' ) ;; (remix) options=( '-a:retain the automatic scaling' '-m:multiple files are mix-combined' '-p:any automatic 1/n scaling is replaced by 1/sqrt(n) scaling' ) ;; (reverb) options=( '-w:select only the "wet" signal' ) ;; (sdm) options=( '-f:select the noise-shaping filter:filter:(($sox_ng_sdm_filters))' '-t:number of paths to consider:num' '-l:output latency(max 2048)' ) ;; (silence) options=( "-l:below-periods' duration of 'silent' audio should be left at the beginning of each period of silence" ) ;; (sinc) options=( '-a:override attenuation:att' "-b:kaiser window's 'beta' parameter:beta" '-p:any phase response:phase' '-M:minimum phase response' '-I:intermediate phase response' '-L:linear phase response' '-t:override the default transition bandwidth:tbw' '-n:number of filter taps:taps' ) ;; (spectrogram) options=( '-x:change the width of the spectrogram:num' '-X:X axis pixels per second:num' '-y:set the size of the Y axis per channel in pixels:num' '-Y:set the total height of the spectrogram:num' '-z:Z axis range in DB:num' '-Z:set the upper limit of the Z axis in dBFS:num' '-n:normalize the upper limit of the Z axis' '-q:set the Z axis quantization:num' '-w:select a window function:func:(Hann Hamming Bartlett Rectangular Kaiser Dolph)' '-W:window adjustment parameter:num' '-s:allow slack overlapping of DFT windows' '-m:create a monochrome spectrogram' '-h:select a high-color palette' '-p:permute the colors in a color or hybrid palette:num:(1 2 3 4 5 6)' '-l:create a "printer-friendly" spectrogram with a light background' '-a:suppress the display of the axis lines' '-r:raw spectrogram' '-A:select an alternative, fixed color set' '-t:set the image title:title' '-c:set the image comment:comment' '-o:the name of the spectrogram output PNG file:file:_files' '-L:plot the frequency on a logarithmic axis' '-R:specify the frequency range:range' '-d:set the X axis resolution such that audio with the given duration:duration' '-S:start the spectrogram at the given point in the audio stream' ) ;; (speexdsp) options=( '-agc:enable automatic gain control and set target volume level:level' '-denoise:enable nose reduction and set the maximum attenuation:max_db' '-dereverb:enable reverb reduction' '-fps:specify the number of frames per second:frames' '-spf:specify the number of samples per frame:samples' ) ;; (splice) options=( '-h:audio=correlated, fade level=constant gain, transitions=smooth' '-t:audio=correlated, fade level=constant gain, transitions=abrupt' '-q:audio=uncorrelated, fade level=constant power, transitions=smooth' ) ;; (stat) options=( '-s:scale the input data by a given factor:scale' '-rms:convert all averaged values to "root mean square" format' "-freq:output the input's power spectrum" '-v:display only the "Volume Adjustment"value' '-d:display a hex dump of the 32-bit signed PCM data audio in internal buffer' '-a:output the average power spectrum instead of the power spectrum' '-h:use the "histogram algorithm" to calculated the integrated EBU R-128 loudness' '-j:output in JSON format' ) ;; (stats) options=( '-b:three measurements are scale to a signed integer with the given number:bits' '-x:behave the same way as -b except that the signed integers values are displayed in hexadecimal' '-s:scale the three measurements by a given floating point number:scale' '-w:short window size:time' ) ;; (synth) options=( '-j:select just intonation:key' '-n:disable to incorporate the functionaly of gain' ) ;; (tempo) options=( '-q:use tree search instead of linear search' '(-m -s -l)-m:optimize default values for music processing' '(-m -s -l)-s:optimize default values for speech processing' '(-m -s -l)-l:optimize default values for linear processing' ) ;; (vad) options=( '-t:level to use to trigger activity detection:level' '-T:time constant to use to help ignore short bursts of sound:num' '-s:the amount of audio to search for quieter/shorter bursts of audio:num' '-g:allowed gap between quieter/shorter bursts of audio:num' '-p:the amount of audio to preserve before the trigger point:num' '-b:time for the initial noise estimate:num' '-N:time used by the adaptive noise estimate when the noise level is increasing:num' '-n:time used by the adaptive noise estimate when the noise level is decreasing:num' '-r:amount of noise reduction to use in the detection algorithm:num' "-f:frequency of the algorithm's processing measurements:num" '-M:time constant used to smooth spectral measurements:num' '-h:"Brick-wall" frequence of the high-pass filter:num' '-l:"Brick-wall" frequence of the low-pass filter:num' '-H:"Brick-wall" frequence of the high-pass lifter:num' '-L:"Brick-wall" frequence of the low-pass lifter:num' ) ;; esac _describe -t 'effect' 'effect options' options "$@" && ret=0 return ret } _sox_ng_soxi_ng() { _arguments -s \ '-V[set verbosity]' \ '-T[change behavior of -s, -d, and -D. display the total across all given files]' \ '-t[show detected file type]' \ '-r[show sample-rate]' \ '-c[show number of channels]' \ '-s[show number of samples]' \ '-d[show duration in hours, minutes and seconds]' \ '-D[show duration in seconds]' \ '-b[show number of bits per sample]' \ '-B[show the bitrate averaged over the whole file]' \ '-p[show estimated sample precision in bits]' \ '-e[show the name of the audio encoding]' \ '-a[show file comments if available]' \ '*: :_files' } _sox_ng_audio_encoding_type() { local -a types=( 'signed-integer:PCM data stored as signed integers' 'unsigned-integer:PCM data stored as unsigned integers' 'float:PCM data stored as IEEE 753 32-bit or 64-bit floating point numbers' 'floating-point:PCM data stored as IEEE 753 32-bit or 64-bit floating point numbers' 'a-law:internal telephony standard for logarithmic encoding to 8 bits per sample' 'u-law:the North American telephony standard for logarithmic encoding to 8 bits per sample' 'mu-law:the North American telephony standard for logarithmic encoding to 8 bits per sample' 'oki-adpcm:OKI 4-bit ADPCM has a precision equivalent to roughly 12-bit PCM' 'ima-adpcm:IMA 4-bit ADPCM has a precision equivalent to roughly 13-bit PCM' 'ms-adpcm:Microsoft 4-bit ADPCM has a precision equivalent to roughly 14-bit PCM' 'gsm-full-rate:GCM full rate audio format' ) _describe -t types 'type' types "$@" } _sox_ng_supported_formats() { local -a formats=( 'raw:Raw audio files' '3gp:Third Generation Partnership Project format' '3g2:Third Generation Partnership Project 2 format' '8svx:Amiga 8SVX musical instrument description format' 'aac:Advanced Audio Coding format' 'ac3:Audio Codec 3 (Dolby Digital) format' 'adts:Audio Data Transport Stream format' 'aiff:AIFF files as used on old Apple Macs, Apple IIc/IIgs and SGI' 'aiffc:AIFF-C is based on AIFF but also handles compressed audio' 'alsa:The Advanced Linux Sound Architecture' 'amb:Ambisonic B-Format' 'amr-nb:Adaptive Multi Rate Narrow and Wide Band' "ao:Xiph.org's Audio Output device driver only works for playing audio" "ape:Monkey's Audio format" 'apm:Ubisoft Rayman 2 APM format' 'aptx:Audio Processing Technology for Bluetooth format' 'argo_asf:Argonaut Games ASF format' 'asf:Advanced / Active Streaming Format' 'ast:AST Audio Stream format' 'au:Sun Microsystems AU files' 'avi:Audio Video Interleaved format' 'avr:Audio Visual Research format' "caf:Apple's Core Audio File format" 'cdda:Red Book Compact Disc Digital Audio (raw audio)' 'coreaudio:The MacOS X CoreAudio' 'cvsd:Continuously Variable Slope Delta modulation' 'cvu:Unfiltered Continuously Variable Slope Delta modulation' 'dat:Text Data files contain a textual representation of sample data' 'dfpwm:DFPWM1a format' 'dts:Digital Theatre Systems format' 'dff:Direct Stream Digital Interchange File Format' 'dsf:DSD Stream File is a format defined by Sony for storing 1-bit DSD data' 'dvms:The Digital Voice Messaging System format' 'eac3:Enhanced AC-3 Audio' 'ffmpeg:pseudo-type that uses the external program ffmpeg' 'flv:Macromedia Flash Video format' 'fssd:Flexible Sound Studio Data format' 'gsrt:Grandstream ring-tone files' 'gsm:GSM 06.10 Lossy Speech Compression' 'gxf:General eXchange Format' 'hcom:Macintosh HCOM files' 'htk:Single channel 16-bit PCM format used by HTK' 'ima:A headerless file of IMA ADPCM audio data' 'ism:ISM streaming video format' 'kvag:Simon & Schuster Interactive VAG format' 'lpc:LPC-10' 'm4a:MPEG-4 Audio format' 'm4b:MPEG-4 Video format' 'mat4:Matlab 4.2 format' 'mat5:Matlab 5.0 format' 'm3u:A playlist format' 'maud:An IFF-conforming audio file type' 'mkv:Matroska video format' 'mlp:Meridian Lossless Packing format' 'mov:MPEG-1 Systems / MPEG program stream format' 'mp1:MP1 compressed audio' 'mp2:MP2 compressed audio' 'mp3:MP3 compressed audio' 'mp4:MPEG-4 video format' 'mpeg:MPEG-1 Systems / MPEG program stream format' 'mpegts:MPEG-TS (MPEG-2 Transport Stream) format' 'mxf:Material eXchange Format Operational Pattern OP1A "OP-Atom" format' 'nsp:NSP format' 'nut:NUT is a low overhead generic container format' 'ogg:Various Xiph.org audio formats in an Ogg container' "vorbis:Xiph.org's Ogg Vorbis compressed audio" "opus:Xiph.org's Opus compressed audio" 'oss:The Open Sound System' 'paf:Ensoniq PARIS file format' 'pls:A playlist format containing a list of audio files' 'prc:Psion Record format' 'pulseaudio:PulseAudio is a cross-platform networked sound server' 'pvf:Portable Voice Format' 'ra:RealAudio format' 'raw:Headerless audio data' 'rm:RealMedia format' 'rso:Lego Mindstorms RSO format' 'sbc:Bluetooth SIG low-complexity subband audio format' 'sd2:Sound Designer 2 format' 'sds:MIDI Sample Dump Standard' 'sf:IRCAM Sound Description Interchange Format' "sln:Asterisk PBX 'signed linear' 8khz, 16-bit signed integer, little-endian raw format" 'smjpeg:Loki SDL MJPEG' 'smp:SMP format' 'snd:Several file formats use the .snd extension' 'sndfile:pseudo-type that forces libsndfile to be used' 'sndio:OpenBSD audio device driver' 'sndr:Sounder files are an MS-DOS/Windows format' 'sndt:SoundTool files are another MS-DOS/Windows format' "sox:SoX's native uncompressed PCM format" 'spdif:IEC 61937 S/PDIF format' 'sph:SPHERE (SPeech HEader REsources)' 'spx:Ogg Speex format' 'sunau:The Sun /dev/audio device driver' 'tta:True Audio format' 'vag:Sony PS2 VAG format' 'txw:TXW is a file format from the Yamaha TX-16W sampling keyboard ' 'voc:Sound Blaster VOC files' 'vox:Headerless files of Dialogic/OKI ADPCM audio data' "w64:Sonic Foundry's 64-bit RIFF/WAV format" 'wav:Microsoft .WAV RIFF files' 'waveaudio:The MS-Windows native audio device driver' 'wavpcm:A non-standard but widely used variant of .wav' 'wma:Windows Media Audio format' 'wsaud:Westwood Studios audio format' 'wsd:Wideband Single-bit Data' 'wtv:Windows Television format' 'wv:WavPack lossless audio compression' 'wve:Psion 8-bit A-law' 'xa:Maxis XA files' 'xi:Fasttracker 2 Extended Instrument format' ) _describe -t formats 'format' formats "$@" } _sox_ng_effects() { local -a effects=( 'allpass:Apply a two-pole all-pass filter' 'band:Apply a band-pass filter' 'bandpass:Apply a two-pole Butterworth band-pass filter' 'bandreject:Apply a two-pole Butterworth band-reject filter' 'bass:Boost or cut the bass frequencies of the audio' 'bend:Changes the pitch by specified amounts at specified times without changing the duration' 'biquad:Apply a biquad Infinite Impulse Response filter' 'centercut:Remove the center from a stereo file leaving the far left and right parts of the stereo' 'channel:Invoke a simple algorithm to change the number of channels in the audio signal' 'chorus:Add a chorus effect to the audio' 'compand:Compand (compress or expand) the dynamic range of the audio' 'contrast:modify an audio signal to make it sound louder' 'dcshift:Apply a DC shift to the audio' 'deemph:Pre-emphasis was applied in the mastering of some CDs issued in the early 1980s' 'delay:Delay zero or more audio channels' 'dither:Apply dithering to the audio' 'dolbyb:Apply Dolby B decoding/encoding to its input signal' 'dop:DSD over PCM' 'downsample:Downsample the signal by an integer factor' 'earwax:move the sound stage from inside your head to outside and in front of you' 'echo:Add echoes to the audio' 'echos:Add a sequence of echoes to the audio' 'equalizer:Apply a two-pole peaking equalization filter' 'fade:Apply a fade effect to the beginning, end, or both of the audio' "fir:Use SoX's FFT convolution engine with given Finite Impulse Response filter coefficients" "firfit:Use SoX's FFT convolution engine to make a filter" 'flanger:Apply a flanging effect to the audio' 'gain:Apply amplification or attenuation to the audio signal' 'highpass:Apply a high-pass filter with 3dB point frequency' 'hilbert:Apply an odd-tap Hilbert transform filter' "ladspa:Apply a LADSPA(Linux Audio Developer's Simple Plugin API) plugin" 'loudness:Loudness control is similar to the gain effect' 'lowpass:Apply a low-pass filter' 'mcompand:Apply the multi-band compander' 'noiseprof:Calculate a profile of the audio for use in noise reduction' 'noisered:Reduce noise in the audio signal by profiling and filtering' 'norm:Normalize the audio' 'oops:Out Of Phase Stereo effect' 'overdrive:Non-linear distortion' 'pad:Pad the audio with silence at the beginning, at the end or at any specified points' 'phaser:Add a phasing effect to the audio' 'pitch:Change the audio pitch but not the tempo' 'rate:Change the audio sampling rate' 'remix:Select and mix input audio channels into output audio channels' 'repeat:Repeat the entire audio count times, or once if count is not given' 'reverb:Add reverberation to the audio using the "freeverb" algorithm' 'reverse:Reverse the audio completely' 'riaa:Apply RIAA vinyl playback equalization' 'saturation:Add saturation, which can produce effects ranging from subtle warmth to crunchy fuzz' 'sdm:Apply a 1-bit sigma-delta modulator producing DSD output' 'silence:Removes silence from the beginning, middle or end of the audio' 'sinc:Apply a kaiser-windowed low-pass, high-pass, band-pass or band-reject filter' 'softvol:Apply a simple multiplier to the audio ensuring' 'spectrogram:Create a spectrogram of the audio' 'speed:Adjust the audio speed (pitch and tempo together)' 'speexdsp:Use the Speex DSP library to improve perceived sound quality' 'splice:Splice audio sections together' 'stat:Display time and frequency domain statistical information about the audio' 'stats:Display time domain statistical information about the audio channels' 'stretch:Change the audio duration but not its pitch' 'swap:Swap stereo channels' 'synth:Generate fixed or swept frequency audio tones with various wave shapes and wide-band noise' 'tempo:Change the audio playback speed but not its pitch' 'treble:Apply a treble tone control effect' 'tremolo:Apply a tremolo' 'trim:Cuts out portions of the audio' 'upsample:Upsample the signal by an integer factor' 'vad:Trim silence and quiet background sounds from the ends of recordings of speech' 'vol:Apply amplification or attenuation to the audio signal' ) _describe -t effects 'effect' effects "$@" } case $service in (soxi_ng|soxi) _sox_ng_soxi_ng ;; (*) _sox_ng_common ;; esac # 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 ================================================ FILE: src/_srm ================================================ #compdef srm # ------------------------------------------------------------------------------ # Copyright (c) 2016 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 srm. # # It is based on the rm completion script from Zsh. # # ------------------------------------------------------------------------------ # Authors # ------- # # * Sorin Ionescu # # ------------------------------------------------------------------------------ local -a args local variant args=( '*::files:->file' ) _pick_variant -r variant gnu=gnu thc=THC unix --help if [[ $variant == "thc" ]]; then args+=( '-d[ignore the two special dot files . and .. on the commandline]' '-f[fast (and insecure mode)]' '*-l[lessens the security. -l for a second time lessons the security even more]' '-r[recursive mode]' '-v[verbose mode]' '-z[wipes the last write with zeros instead of random data]' ) else args+=( '(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' '(-r --interactive)'{-i,--interactive}'[prompt before any removal]' '(-r -R --recursive)'{-r,-R,--recursive}'[remove the contents of directories recursively]' '(-s --simple)'{-s,--simple}'[only overwrite with a single pass of random data]' '(-v --verbose)'{-v,--verbose}'[explain what is being done]' '(- *)--help[display help message and exit]' '(- *)--version[output version information and exit]' ) if [[ $variant == "gnu" ]]; then args+=( '(-x --one-file-system)'{-x,--one-file-system}'[stay within filesystems of files given as arguments]' '(-P --openbsd)'{-P,--openbsd}'[overwrite the file 3 times (0xff, 0x00, 0xff)]' '(-D --dod)'{-D,--dod}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]' '(-E --doe)'{-E,--doe}'[overwrite the file with 3 US DoE compliant passes (random, random, DoE)]' ) else args+=( '(-m --medium)'{-m,--medium}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]' '(-z --zero)'{-z,--zero}'[after overwriting, zero blocks used by file]' '(-n --nounlink)'{-n,--nounlink}'[overwrite file, but do not rename or unlink it]' ) fi fi local curcontext=$curcontext state line ret=1 local -A opt_args _arguments -s -S -C $args && ret=0 case $state in (file) local -a ignored ignored=() ((CURRENT > 1)) && ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) ((CURRENT < $#line)) && ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) _files -F ignored && ret=0 ;; esac return $ret # 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 ================================================ FILE: src/_sslscan ================================================ #compdef sslscan # ------------------------------------------------------------------------------ # Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # 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 sslscan 2.2.0. (https://github.com/rbsec/sslscan) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '--targets=[a file containing a list of hosts to check]:file:_files' \ '--sni-name=[hostname for SNI]:name' \ '(-4 --ipv4 -6 --ipv6)'{-4,--ipv4}'[only use IPv4]' \ '(-4 --ipv4 -6 --ipv6)'{-6,--ipv6}'[only use IPv6]' \ '--show-certificate[show full certificate information]' \ '--show-certificates[show chain full certificates information]' \ '--show-client-cas[show trusted CAs for TLS client auth]' \ '--no-check-certificate[do not warn about weak certificate algorithm or keys]' \ '--ocsp[request OCSP response from server]' \ '--pk=[a file containing the private key or a PKCS#12 file]:file:_files' \ '--pkpass=[the password for private key or PKCS#12 file]:password' \ '--certs[a file containing PEM/ASN1 formatted client certificates]:file:_files' \ '--ssl2[only check if SSLv2 is enabled]' \ '--ssl3[only check if SSLv3 is enabled]' \ '--tls10[only check TLSv1.0 ciphers]' \ '--tls11[only check TLSv1.1 ciphers]' \ '--tls12[only check TLSv1.2 ciphers]' \ '--tls13[only check TLSv1.3 ciphers]' \ '--tlsall[only check TLS ciphers(all versions)]' \ '--show-ciphers[show supported client ciphers]' \ '--show-cipher-ids[show cipher IDs]' \ '--iana-names[use IANA/RFC cipher names rather than OpenSSL ones]' \ '--show-times[show handshake times in milliseconds]' \ '--no-cipher-details[disable EC curve names and EDH/RSA key lengths output]' \ '--no-ciphersuites[do not check for supported ciphersuites]' \ '--no-compression[do not check for TLS compression(CRIME)]' \ '--no-fallback[do not check for TLS Fallback SCSV]' \ '--no-groups[do not enumerate key exchange groups]' \ '--no-heartbleed[do not check for OpenSSL Heartbleed(CVE-2014-0160)]' \ '--no-renegotiation[do not check for TLS renegotiation]' \ '--show-sigs[enumerate signature algorithms]' \ '--starttls-ftp[STARTTLS setup for FTP]' \ '--starttls-imap[STARTTLS setup for IMAP]' \ '--starttls-irc[STARTTLS setup for IRC]' \ '--starttls-ldap[STARTTLS setup for LDAP]' \ '--starttls-mysql[STARTTLS setup for MYSQL]' \ '--starttls-pop3[STARTTLS setup for POP3]' \ '--starttls-psql[STARTTLS setup for PostgreSQL]' \ '--starttls-smtp[STARTTLS setup for SMTP]' \ '--starttls-xmpp[STARTTLS setup for XMPP]' \ '--xmpp-server[use a server-to-server XMPP handshake]' \ '--rdp[send RDP preamble before starting scan]' \ '--bugs[enable SSL implementation bug work-arounds]' \ '--no-colour[disable coloured output]' \ '--sleep=[pause between connection request(msecs)]:msecs' \ '--timeout=[set socket timeout(seconds). Default is 3s]:seconds' \ '--connect-timeout=[set connect timeout(seconds). Default is 75s]:seconds' \ '--verbose[display verbose output]' \ '--version[display the program version]' \ '--xml=[output results to an XML file. Use - for STDOUT]:file:_files' \ '(- *)--help[display the help text]' \ '*::host:_urls' # 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 ================================================ FILE: src/_subliminal ================================================ #compdef subliminal # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for Subliminal (https://github.com/Diaoul/subliminal). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Julien Nicoulaud # * Shohei Yoshida # # ------------------------------------------------------------------------------ _subliminal() { typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ '--addic7ed[Addic7ed configuration]:user name:' \ '--legendastv[LegendasTV configuration]:user name:' \ '--opensubtitles[OpenSubtitles configuration]:user name:' \ '--omdb[OMDB API key]:key' \ '--cache-dir[Path to the cache directory]: :_files -/' \ '--debug[Print useful information for debugging]' \ '(- : *)--version[show version number and exit]' \ '(- : *)--help[show help message and exit]' \ '1: :(cache download)' \ '*::arg:->command' \ && ret=0 case "$state" in (command) case $words[1] in (cache) _arguments -C \ '(- *)--help[Show help message and exit]' \ "--clear-subliminal[Clear subliminal's cache]" \ '*: :_files' \ && ret=0 ;; (download) _arguments -C \ '(-l --language)'{-l,--language}'[Language as IETF code]:lang' \ \*{-p,--provider}'[Provider to use]: :(argenteam legendastv opensubtitles opensubtitlesvip podnapisi shooter thesubdb tvsubtit)' \ \*{-r,--refiner}'[Refiner to use]: :(hash metadata omdb tvdb)' \ '(-a --age)'{-a,--age}'[Filter videos newer than AGE]:age' \ '(-d --directory)'{-d,--directory}'[Directory where to save subtitles]: :_files -/' \ '(-e --encoding)'{-e,--encoding}'[Subtitle file encoding]:encoding' \ '(-s --single)'{-s,--single}'[Save subtitle without language code in the file name]' \ '(-f --force)'{-f,--force}'[Force download even if a subtitle already exist]' \ '(-hi --hearing-impaired)'{-hi,--hearing-impaired}'[Prefer hearing impaired subtitles]' \ '(-m --min-score)'{-m,--min-score}'[Minimum score for a subtitle to be downloaded]:integer range:' \ '(-w --max-worked)'{-w,--max-workers}'[Maximum number of threads to use]:integer range:' \ '(-z --archives -Z --no-archives)'{-z,--archives}'[Scan archives for videos]' \ '(-z --archives -Z --no-archives)'{-Z,--no-archives}'[Scan archives for videos]' \ '--verbose[Increase verbosity]' \ '(- *)--help[Show help message and exit]' \ '*: :_files' \ && ret=0 ;; esac ;; esac return ret } _subliminal "$@" # 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 ================================================ FILE: src/_supervisord ================================================ #compdef supervisord supervisorctl pidproxy # ------------------------------------------------------------------------------ # Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # 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 supervisord tools v4.3.0 (https://github.com/Supervisor/supervisor) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Matt Black (https://github.com/mafrosis) # * dongweiming (https://github.com/dongweiming) # * Shohei YOSHIDA (https://github.com/syohex) # # ------------------------------------------------------------------------------ _supervisorctl() { local -a procs typeset -A opt_args local context state line local curcontext="$curcontext" local ret=1 _arguments -C \ {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \ '(- *)'{--help,-h}'[print usage message and exit]' \ {--interactive,-i}'[start an interactive shell after executing commands]' \ {--serverurl,-s}='[URL on which supervisord server is listening (default "http://localhost:9001")]:url:_urls' \ {--username,-u}='[username to use for authentication with server]:username:_users' \ {--password,-p}='[password to use for authentication with server]:password' \ {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \ '1: :_supervisorctl_subcommands' \ '*:: :->subcmds' && ret=0 case $state in (subcmds) case "$words[1]" in (help) _arguments \ '1: :_supervisorctl_subcommands' \ && ret=0 ;; (add|remove) _arguments \ '1: :_supervisorctl_procs_groups' \ && ret=0 ;; (fg) _arguments \ '1: :_supervisorctl_processes' \ && ret=0 ;; (pid|clear) _arguments \ '*: :_supervisorctl_processes_all' \ && ret=0 ;; (restart|status) _arguments \ '*:process_or_group:_supervisorctl_procs_and_group_prefixes' \ && ret=0 ;; (update) _arguments \ '*: :_supervisorctl_groups' \ && ret=0 ;; (stop) _arguments \ '*:running process or group:_supervisorctl_running_procs' \ && ret=0 ;; (start) _arguments \ '*:stopped process or group:_supervisorctl_stopped_procs' \ && ret=0 ;; (signal) _arguments \ '1:signal:_signals -s' \ '*:running process or group:_supervisorctl_running_procs' \ && ret=0 ;; (tail) _arguments \ '-f[Continuous tail of named process stdout]' \ '-[last N *bytes* of process stdout]:number' \ '1: :_supervisorctl_processes' \ '2:output:(stdout stderr)' \ && ret=0 ;; (maintail) _arguments \ '-f[Continuous tail of named process stdout]' \ '-[last N *bytes* of process stdout]:number' \ && ret=0 ;; esac esac return 0 } (( $+functions[_supervisorctl_subcommands] )) || _supervisorctl_subcommands() { local -a commands=( 'add:Activates any updates in config for process/group' 'avail:Display all configured processes' 'clear:Clear single/multiple/all process log files' 'exit:Exit the supervisor shell' 'fg:Connect to a process in foreground mode' 'maintail:tail of supervisor main log file' 'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)' 'pid:Get the PID of process/supervisord' 'quit:Exit the supervisor shell' 'reload:Restart the remote supervisord' 'remove:Removes process/group from active config' "reread:Reload the daemon's configuration files" 'restart:Restart process, group or all' 'signal:Send signal to a process' 'shutdown:Shut the remote supervisord down' 'start:Start process, group or all' 'status:Get process/group status info' 'stop:Stop process, group or all' 'tail:tail of process stdout' 'update:Reload config and add/remove as necessary' 'version:Show the version of the remote supervisord process' 'help:Show help' ) _describe -t commands 'command' commands "$@" } (( $+functions[_supervisorctl_processes] )) || _supervisorctl_processes() { local -a procs procs=(${(f)"$(_call_program processes supervisorctl avail | awk '{gsub(":","\\:", $1); print $1 }')"}) if [[ "$1" = 'all' ]]; then procs+=(all) fi _describe 'processes' procs } (( $+functions[_supervisorctl_processes_all] )) || _supervisorctl_processes_all() { _supervisorctl_processes all } (( $+functions[_supervisorctl_procs_groups] )) || _supervisorctl_procs_groups() { local -a procs procs=(${(f)"$(_call_program processes supervisorctl status \ | awk '{n=$1;gsub(":","\\:",n); printf "%s\n%s\n",n,substr($1,1,index($1,":")-1)}' \ | uniq)"}) _describe 'process and groups' procs } (( $+functions[_supervisorctl_procs_and_group_prefixes] )) || _supervisorctl_procs_and_group_prefixes() { _supervisorctl_collect_procs '.' } (( $+functions[_supervisorctl_running_procs] )) || _supervisorctl_running_procs() { _supervisorctl_collect_procs 'RUNNING' } (( $+functions[_supervisorctl_stopped_procs] )) || _supervisorctl_stopped_procs() { _supervisorctl_collect_procs 'STOPPED' } (( $+functions[_supervisorctl_collect_procs] )) || _supervisorctl_collect_procs() { if (( $words[(I)all] )); then return fi local pattern=$1 local -a procs procs=(${(f)"$(_call_program processes supervisorctl status \ | awk "/$pattern/"'{n=$1;gsub(":","\\:",n); printf "%s\n%s\\:\n",n,substr($1,1,index($1,":")-1)}' \ | uniq)"}) procs+=(all) _describe 'stoped processes or groups' procs } (( $+functions[_supervisorctl_groups] )) || _supervisorctl_groups() { if (( $words[(I)all] )); then return fi local -a groups groups=(${(f)"$(_call_program processes supervisorctl status \ | awk '{printf "%s\n",substr($1,1,index($1,":")-1)}' \ | uniq)"}) groups+=(all) _describe 'groups' groups } case $service in (supervisord) _arguments \ '(-c --configuration)'{-c,--configuration}'[configuration file path]:config file:_files' \ '(-n --nodaemon)'{-n,--nodaemon}'[run in the foreground]' \ '(-s --silent)'{-s,--silent}'[no longs to stdout]' \ '(- *)'{-h,--help}'[print this usage message and exit]' \ '(- *)'{-v,--version}'[print supervisord version number and exit]' \ '(-u --user)'{-u,--user}'[run supervisord as given user]:user:_users' \ '(-m --umask)'{-m,--umask}'[use given umask for daemon subprocess]:umask' \ '(-d --directory)'{-d,--directory}'[directory to chdir to when daemonized]:directory:_files -/' \ '(-l --logfile)'{-l,--logfile}'[logfile path]:logfile:_files' \ '(-y --logfile_maxbytes)'{-y,--logfile_maxbytes}'[limit the max size of logfile]:max bytes' \ '(-z --logfile_backups)'{-z,--logfile_backups}'[number of backups to keep when max bytes reached]:number of backups' \ '(-e --loglevel)'{-e,--loglevel}'[log level]:level:(debug info warn error critical)' \ '(-j --pidfile)'{-j,--pidfile}'[pid file path]:pid file:_files' \ '(-i --identifier)'{-i,--identifier}'[identifier used for this instance of supervisord]:id' \ '(-q --childlogdir)'{-q,--childlogdir}'[the log directory for child process logs]:log dir:_files -/' \ '(-k --nocleanup)'{-k,--nocleanup}'[prevent the process from performing cleanup]' \ '(-a --minfds)'{-a,--minfds}'[the minimum number of file descriptors for start success]:min fds' \ '(-t --strip_ansi)'{-t,--strip_ansi}'[strip ansi escape codes from process output]' \ '--profile_options[profile options]:profile option:_values -s , "field" cumulative calls callers' ;; (supervisorctl) _supervisorctl "$@" ;; (pidproxy) _arguments \ '1:pid_file:_files' \ '2:cmd:_command_names -e' \ '*::argument:_normal' ;; esac # 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 ================================================ FILE: src/_svm ================================================ #compdef svm # ------------------------------------------------------------------------------ # Copyright (c) 2011 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 svm, Scala2 version manager (https://github.com/yuroyoro/svm) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Hideaki Miyake (https://github.com/mollifier) # # ------------------------------------------------------------------------------ _svm() { local context curcontext="$curcontext" state line ret=1 typeset -A opt_args _arguments -C \ '(- *)-h[show this usage information]' \ '-c[show the currently use scala version]' \ "-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]" \ '-v[show the available scala version not installed]' \ '-i[install specific scala version]: :_svm_not_installed_scala_versions' \ '-r[uninstall specific scala version and remove their sources]: :_svm_installed_scala_versions' \ '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_not_selected_scala_versions' \ '1: :_svm_commands' \ '*:: :->args' && ret=0 case $state in (args) # scala version number case $words[1] in (install) # install not installed version _arguments \ '--docs[download scala-devel-docs]' \ '--sources[download scala-sources]' \ '1: :_svm_not_installed_scala_versions' \ && ret=0 ;; (update-latest) # update nightly build scala version _arguments \ '--docs[download scala-devel-docs]' \ '--sources[download scala-sources]' \ && ret=0 ;; (remove|uninstall) # remove installed version _arguments \ '1: :_svm_installed_scala_versions' \ && ret=0 ;; (switch|use) # use installed version _arguments \ '1: :_svm_not_selected_scala_versions' \ && ret=0 ;; esac ;; # end args esac return ret } (( $+functions[_svm_commands] )) || _svm_commands() { case $PREFIX in (u*) local -a synonyms=( 'uninstall:uninstall specific scala version and remove their sources' 'use:setup to use a specific scala version' 'update-latest:install or update nightly build scala version' ) _describe -t actions 'svm actions' synonyms ;; (*) local -a commands=( 'help:show this usage information' 'current:show the currently use scala version' "list:show the scala version installed in svm_path(default is ${HOME}/.svm)" "versions:show the available scala version not installed" 'install:install specific scala version' 'remove:uninstall specific scala version and remove their sources' 'switch:setup to use a specific scala version' 'update-latest:install or update nightly build scala version' 'latest:setup to use nightly build scala version' 'stable:setup to use stable(x.x.x.final) scala version' 'self-update:update svm itself' ) _describe -t actions 'svm actions' commands ;; esac } # installed scala versions (( $+functions[_svm_installed_scala_versions] )) || _svm_installed_scala_versions() { # collect lines starts with digit local -a installed_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} ) _describe -t installed "installed versions" installed_versions } # installed and not selected scala versions (( $+functions[_svm_not_selected_scala_versions] )) || _svm_not_selected_scala_versions() { local current_version=$(_call_program current svm current | sed 's/currently version is //') local -a not_selected_versions=( ${(M)${(@f)"$(_call_program installed svm list)"}:#[[:digit:]]*} ) # remove current version not_selected_versions=( ${not_selected_versions:#$current_version}) _describe -t installed "not selected versions" not_selected_versions } # not installed scala versions (( $+functions[_svm_not_installed_scala_versions] )) || _svm_not_installed_scala_versions() { local -a not_installed_versions=( ${(M)${(@f)"$(_call_program installed svm versions)"}:#[[:digit:]]*} ) _describe -t notinstalled "not installed versions" not_installed_versions } _svm "$@" # 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 ================================================ FILE: src/_swaplabel ================================================ #compdef swaplabel # ------------------------------------------------------------------------------ # 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 swaplabel v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(- *)'{-h,--help}'[display help message]' \ '(- *)'{-V,--version}'[display version]' \ '(-L --label)'{-L,--label}'[specify a new label]:label' \ '(-U --uuid)'{-U,--uuid}'[specify a new uuid]:uuid' \ '*::file:_files' # 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 ================================================ FILE: src/_swapoff ================================================ #compdef swapoff # ------------------------------------------------------------------------------ # 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 swapoff v2.41 (https://github.com/util-linux/util-linux) # # ------------------------------------------------------------------------------ # Authors # ------- # # * Shohei Yoshida (https://github.com/syohex) # # ------------------------------------------------------------------------------ _arguments \ '(-a --all)'{-a,--all}'[enable all swaps from /etc/fstab]' \ '(- *)'{-h,--help}'[display help message]' \ '(- *)'{-V,--version}'[display version]' \ '-L[synonym for LABEL=