├── zsh-completions.plugin.zsh ├── .gitignore ├── src ├── _console ├── _aws ├── _terraform ├── _parallel ├── _rbenv ├── _configure ├── _spring ├── _hello ├── _lftp ├── _vint ├── _tig ├── _wg-quick ├── _pipenv ├── _httrack ├── _pgcli ├── _cookiecutter ├── _periscope ├── _ecdsautil ├── _tldr ├── _kdv ├── _sw_vers ├── _age ├── _debuild ├── _swift-demangle ├── _procexp ├── _genstrings ├── _rmlint.sh ├── _strings ├── _jmeter-plugins ├── _xcode-select ├── _xattr ├── _rdfind ├── _filemon ├── _gcloud ├── _networkQuality ├── _git-pulls ├── _tmuxinator ├── _trash ├── _homestead ├── _prlctl ├── _class-dump ├── _geany ├── _container-builder-local ├── _trash-list ├── _trash-restore ├── _trash-empty ├── _caffeinate ├── _gas ├── _mkcert ├── _envdir ├── _lsattr ├── _exportfs ├── _joker ├── _artisan ├── _do-release-upgrade ├── _issw ├── _subl ├── _ffind ├── _flake8 ├── _l3build ├── _tarsnap ├── _chatblade ├── _teamocil ├── _choc ├── _git-revise ├── _brew_services ├── _trash-put ├── _atach ├── _llvm-objdump ├── _shutdown ├── _mina ├── _column ├── _dad ├── _sdkmanager ├── _cheat ├── _ninja ├── _composer ├── _clang-check ├── _jmeter ├── _xcrun ├── _git-wtf ├── _googler ├── _sdd ├── _neo ├── _subliminal ├── _youtube-dl ├── _rslsync ├── _llvm-dsymutil ├── _rsvm ├── _archlinux-java └── _patool ├── override ├── _aws └── _terraform ├── .gitmodules ├── example.clarketm.zsh-completions.plist ├── LICENSE ├── update-completions.sh └── README.md /zsh-completions.plugin.zsh: -------------------------------------------------------------------------------- 1 | fpath=(${0:h}/src $fpath) 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # zsh word code files 2 | *.zwc 3 | 4 | # IDE 5 | .idea 6 | *.iml -------------------------------------------------------------------------------- /src/_console: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarketm/zsh-completions/HEAD/src/_console -------------------------------------------------------------------------------- /src/_aws: -------------------------------------------------------------------------------- 1 | #compdef aws 2 | 3 | autoload -U +X bashcompinit && bashcompinit 4 | complete -C $(command -v aws_completer) aws 5 | -------------------------------------------------------------------------------- /override/_aws: -------------------------------------------------------------------------------- 1 | #compdef aws 2 | 3 | autoload -U +X bashcompinit && bashcompinit 4 | complete -C $(command -v aws_completer) aws 5 | -------------------------------------------------------------------------------- /src/_terraform: -------------------------------------------------------------------------------- 1 | #compdef terraform 2 | 3 | autoload -U +X bashcompinit && bashcompinit 4 | complete -C $(command -v terraform) terraform 5 | -------------------------------------------------------------------------------- /override/_terraform: -------------------------------------------------------------------------------- 1 | #compdef terraform 2 | 3 | autoload -U +X bashcompinit && bashcompinit 4 | complete -C $(command -v terraform) terraform 5 | -------------------------------------------------------------------------------- /src/_parallel: -------------------------------------------------------------------------------- 1 | #compdef parallel 2 | (( $+functions[_comp_parallel] )) || 3 | eval "$(parallel --shell-completion auto)" && 4 | _comp_parallel 5 | -------------------------------------------------------------------------------- /src/_rbenv: -------------------------------------------------------------------------------- 1 | #compdef rbenv 2 | 3 | _rbenv() { 4 | local completions 5 | 6 | if [ "${#words}" -eq 2 ]; then 7 | completions=(${(f)"$(rbenv help --complete-commands "${words[2]}")"}) 8 | _describe 'rbenv commands' completions 9 | else 10 | completions="$(rbenv completions ${words[2,-2]})" 11 | compadd - "${(ps:\n:)completions}" 12 | fi 13 | } 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "zsh-users_zsh-completions"] 2 | path = zsh-users_zsh-completions 3 | url = https://github.com/zsh-users/zsh-completions.git 4 | branch = master 5 | [submodule "zchee_zsh-completions"] 6 | path = zchee_zsh-completions 7 | url = https://github.com/zchee/zsh-completions.git 8 | branch = main 9 | [submodule "nilsonholger_zsh-completions"] 10 | path = nilsonholger_zsh-completions 11 | url = https://github.com/nilsonholger/osx-zsh-completions.git 12 | branch = master 13 | -------------------------------------------------------------------------------- /src/_configure: -------------------------------------------------------------------------------- 1 | #compdef configure config.status 2 | 3 | _arguments \ 4 | -- -i '(--(disable|enable)-FEATURE* --(with|without)-PACKAGE*)' \ 5 | \ 6 | -s '((#s)--disable- --enable- 7 | (#s)--enable- --disable- 8 | (::#s)--with- --without- 9 | (::#s)--without- --with-)' \ 10 | \ 11 | '*=(E|)PREFIX*:prefix directory:_files -/' \ 12 | '*=PROGRAM*:program:_command_names -e' \ 13 | '*=NAME*executable*:program:_command_names -e' \ 14 | '*=NAME*:file:_files' 15 | 16 | # vim:ft=zsh:et:sts=2:sw=2 17 | -------------------------------------------------------------------------------- /src/_spring: -------------------------------------------------------------------------------- 1 | #compdef spring 'spring' 2 | #autoload 3 | 4 | _spring() { 5 | 6 | local cword 7 | let cword=CURRENT-1 8 | 9 | local hints 10 | hints=() 11 | 12 | local reply 13 | while read -r line; do 14 | reply=`echo "$line" | awk '{printf $1 ":"; for (i=2; i 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _arguments -s '(- *)'{-h,--help}'[display this help and exit]' \ 17 | '(- *)'{-v,--version}'[display version information and exit]' \ 18 | {-t,--traditional}'[use traditional greeting]' \ 19 | {-g,--greeting=}'[use TEXT as the greeting message]:TEXT' 20 | -------------------------------------------------------------------------------- /src/_lftp: -------------------------------------------------------------------------------- 1 | #compdef lftp 2 | 3 | __site() { 4 | local bookmarks=$(lftp -c 'bookmark list') 5 | _alternative 'hosts: :_hosts' 'urls: :_urls' "bookmarks:bookmark:((${bookmarks//$'\t'/:}))" 6 | } 7 | 8 | _arguments -S -s \ 9 | "-f[execute commands from the file and exit]: :_files" \ 10 | "-c[execute the commands and exit]:command" \ 11 | "--norc[don't execute rc files from the home directory]" \ 12 | "(- : *)--help[print this help and exit]" \ 13 | "--version[print lftp version and exit]" \ 14 | "-e[execute the command just after selecting]" \ 15 | "-u[use the user/password for authentication]: :_users" \ 16 | "-p[use the port for connection]:port" \ 17 | "-s[assign the connection to this slot]:slot" \ 18 | "-d[switch on debugging mode]" \ 19 | "1:host name, URL or bookmark name:__site" 20 | -------------------------------------------------------------------------------- /src/_vint: -------------------------------------------------------------------------------- 1 | #compdef vint 2 | 3 | # zsh completions for 'vint' 4 | 5 | local arguments 6 | arguments=( 7 | {-h,--help}'[show this help message and exit]' 8 | {-v,--version}'[show programs version number and exit]' 9 | {-V,--verbose}'[output verbose message]' 10 | {-e,--error}'[report only errors]' 11 | {-w,--warning}'[report errors and warnings]' 12 | {-s,--style-problem}'[report errors, warnings and style problems]' 13 | {-m,--max-violations}'[limit max violations count]' 14 | {-c,--color}'[colorize output when possible]' 15 | {-j,--json}'[output json style]' 16 | {-t,--stat}'[output statistic info]' 17 | '--enable-neovim[Enable Neovim syntax]' 18 | {-f,--format}'[set output format]' 19 | '*:filename:_files' 20 | ) 21 | _arguments -s $arguments 22 | 23 | # vim:ft=zsh:et:sts=2:sw=2 24 | -------------------------------------------------------------------------------- /src/_tig: -------------------------------------------------------------------------------- 1 | #compdef tig 2 | # 3 | # zsh completion wrapper for tig 4 | # ============================== 5 | # 6 | # You need to install this script to zsh fpath with tig-completion.bash. 7 | # 8 | # The recommended way to install this script is to copy this and tig-completion.bash 9 | # to '~/.zsh/_tig' and '~/.zsh/tig-completion.bash' and 10 | # then add following to your ~/.zshrc file: 11 | # 12 | # fpath=(~/.zsh $fpath) 13 | # 14 | # You also need Git's Zsh completion installed: 15 | # 16 | # https://github.com/felipec/git-completion/blob/master/git-completion.zsh 17 | 18 | 19 | _tig () { 20 | local e 21 | 22 | compdef _git tig 23 | 24 | e=$(dirname ${funcsourcetrace[1]%:*})/tig-completion.bash 25 | if [ -f $e ]; then 26 | # Temporarily override __git_complete so the bash script doesn't complain 27 | local old="$functions[__git_complete]" 28 | functions[__git_complete]=: 29 | . $e 30 | functions[__git_complete]="$old" 31 | fi 32 | } 33 | -------------------------------------------------------------------------------- /src/_wg-quick: -------------------------------------------------------------------------------- 1 | #compdef wg-quick 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for wg-quick (a script for easy managemant of wireguard 7 | # VPN tunnels) (https://www.wireguard.com/) 8 | # 9 | # ------------------------------------------------------------------------------ 10 | # Authors 11 | # ------- 12 | # 13 | # * Nicolas Lenz 14 | # 15 | # ------------------------------------------------------------------------------ 16 | 17 | # The possible modes 18 | local modes=('up\:"bring a wireguard interface up"'\ 19 | 'down\:"tear down and remove a wireguard interface"'\ 20 | 'save\:"save configuration of a running wireguard interface"') 21 | 22 | # 1: Complete mode 23 | # 2: Complete interface with all .conf files in /etc/wireguard without the filename extension. 24 | _arguments "1:mode:((${modes}))"\ 25 | '2:interface:_path_files -W /etc/wireguard -g "*.conf(^/:r)"' 26 | -------------------------------------------------------------------------------- /src/_pipenv: -------------------------------------------------------------------------------- 1 | #compdef pipenv 2 | 3 | _pipenv_completion() { 4 | local -a completions 5 | local -a completions_with_descriptions 6 | local -a response 7 | (( ! $+commands[pipenv] )) && return 1 8 | 9 | response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) _PIPENV_COMPLETE=zsh_complete pipenv)}") 10 | 11 | for type key descr in ${response}; do 12 | if [[ "$type" == "plain" ]]; then 13 | if [[ "$descr" == "_" ]]; then 14 | completions+=("$key") 15 | else 16 | completions_with_descriptions+=("$key":"$descr") 17 | fi 18 | elif [[ "$type" == "dir" ]]; then 19 | _path_files -/ 20 | elif [[ "$type" == "file" ]]; then 21 | _path_files -f 22 | fi 23 | done 24 | 25 | if [ -n "$completions_with_descriptions" ]; then 26 | _describe -V unsorted completions_with_descriptions -U 27 | fi 28 | 29 | if [ -n "$completions" ]; then 30 | compadd -U -V unsorted -a completions 31 | fi 32 | } 33 | 34 | compdef _pipenv_completion pipenv; 35 | 36 | -------------------------------------------------------------------------------- /src/_httrack: -------------------------------------------------------------------------------- 1 | #compdef httrack 2 | 3 | # zsh completions for 'httrack' 4 | # automatically generated with http://github.com/RobSis/zsh-completion-generator 5 | local arguments 6 | 7 | arguments=( 8 | '--mirror[ *make a mirror of site(s) (default)]' 9 | '--get[ get the files indicated, do not seek other URLs (-qg)]' 10 | '--list[ add all URL located in this text file (-%L)]' 11 | '--mirrorlinks[mirror all links in 1st level pages (-Y)]' 12 | '--testlinks[ test links in pages (-r1p0C0I0t)]' 13 | '--spider[ spider site(s), to test links: reports Errors & Warnings (-p0C0I0t)]' 14 | '--testsite[ identical to --spider]' 15 | '--skeleton[ make a mirror, but gets only html files (-p1)]' 16 | '--update[update a mirror, without confirmation (-iC2)]' 17 | '--continue[continue a mirror, without confirmation (-iC1)]' 18 | '--catchurl[create a temporary proxy to capture an URL or a form post URL]' 19 | '--clean[erase cache & log files]' 20 | '--http10[force http/1.0 requests (-%h)]' 21 | '*:filename:_files' 22 | ) 23 | 24 | _arguments -s $arguments 25 | 26 | # vim:ft=zsh:et:sts=2:sw=2 27 | -------------------------------------------------------------------------------- /example.clarketm.zsh-completions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | clarketm.zsh-completions 7 | ProgramArguments 8 | 9 | /usr/local/bin/bash 10 | -c 11 | /Users/clarketm/.zsh/plugins/zsh-completions/update-completions.sh 12 | 13 | EnvironmentVariables 14 | 15 | PATH 16 | /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin 17 | 18 | RunAtLoad 19 | 20 | StandardErrorPath 21 | /tmp/clarketm.zsh-completions.stderr 22 | StandardOutPath 23 | /tmp/clarketm.zsh-completions.stdout 24 | StartCalendarInterval 25 | 26 | 27 | Hour 28 | 22 29 | Minute 30 | 0 31 | 32 | 33 | WorkingDirectory 34 | /Users/clarketm/.zsh/plugins/zsh-completions 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/_pgcli: -------------------------------------------------------------------------------- 1 | #compdef pgcli 2 | 3 | _pgcli_completion() { 4 | local -a completions 5 | local -a completions_with_descriptions 6 | local -a response 7 | (( ! $+commands[pgcli] )) && return 1 8 | 9 | response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) _PGCLI_COMPLETE=zsh_complete pgcli)}") 10 | 11 | for type key descr in ${response}; do 12 | if [[ "$type" == "plain" ]]; then 13 | if [[ "$descr" == "_" ]]; then 14 | completions+=("$key") 15 | else 16 | completions_with_descriptions+=("$key":"$descr") 17 | fi 18 | elif [[ "$type" == "dir" ]]; then 19 | _path_files -/ 20 | elif [[ "$type" == "file" ]]; then 21 | _path_files -f 22 | fi 23 | done 24 | 25 | if [ -n "$completions_with_descriptions" ]; then 26 | _describe -V unsorted completions_with_descriptions -U 27 | fi 28 | 29 | if [ -n "$completions" ]; then 30 | compadd -U -V unsorted -a completions 31 | fi 32 | } 33 | 34 | if [[ $zsh_eval_context[-1] == loadautofunc ]]; then 35 | # autoload from fpath, call function directly 36 | _pgcli_completion "$@" 37 | else 38 | # eval/source/. command, register function for later 39 | compdef _pgcli_completion pgcli 40 | fi 41 | 42 | -------------------------------------------------------------------------------- /src/_cookiecutter: -------------------------------------------------------------------------------- 1 | #compdef cookiecutter 2 | 3 | _cookiecutter_completion() { 4 | local -a completions 5 | local -a completions_with_descriptions 6 | local -a response 7 | (( ! $+commands[cookiecutter] )) && return 1 8 | 9 | response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) _COOKIECUTTER_COMPLETE=zsh_complete cookiecutter)}") 10 | 11 | for type key descr in ${response}; do 12 | if [[ "$type" == "plain" ]]; then 13 | if [[ "$descr" == "_" ]]; then 14 | completions+=("$key") 15 | else 16 | completions_with_descriptions+=("$key":"$descr") 17 | fi 18 | elif [[ "$type" == "dir" ]]; then 19 | _path_files -/ 20 | elif [[ "$type" == "file" ]]; then 21 | _path_files -f 22 | fi 23 | done 24 | 25 | if [ -n "$completions_with_descriptions" ]; then 26 | _describe -V unsorted completions_with_descriptions -U 27 | fi 28 | 29 | if [ -n "$completions" ]; then 30 | compadd -U -V unsorted -a completions 31 | fi 32 | } 33 | 34 | if [[ $zsh_eval_context[-1] == loadautofunc ]]; then 35 | # autoload from fpath, call function directly 36 | _cookiecutter_completion "$@" 37 | else 38 | # eval/source/. command, register function for later 39 | compdef _cookiecutter_completion cookiecutter 40 | fi 41 | 42 | -------------------------------------------------------------------------------- /src/_periscope: -------------------------------------------------------------------------------- 1 | #compdef periscope 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for Periscope (https://code.google.com/archive/p/periscope/). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Julien Nicoulaud 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | 17 | _arguments \ 18 | '(- : *)'{-h,--help}'[show help message and exit]' \ 19 | '(- : *)--version[show version number and exit]' \ 20 | '*'{-l,--language}'[wanted language]: :_language_codes ISO-639-1' \ 21 | '(-f --force)'{-f,--force}'[replace existing subtitle file]' \ 22 | '(-q --query)'{-q,--query}'[query to send to the subtitles website]:queries' \ 23 | '--list-plugins[list all plugins supported by periscope]' \ 24 | '--list-active-plugins[list all plugins used to search subtitles]' \ 25 | '--cache-folder[cache/config directory to use]: :_files -/' \ 26 | '--quiet[run in quiet mode (only show warn and error messages)]' \ 27 | '--debug[set the logging level to debug]' \ 28 | '*: :_files' 29 | 30 | # Local Variables: 31 | # mode: Shell-Script 32 | # sh-indentation: 2 33 | # indent-tabs-mode: nil 34 | # sh-basic-offset: 2 35 | # End: 36 | # vim: ft=zsh sw=2 ts=2 et 37 | -------------------------------------------------------------------------------- /src/_ecdsautil: -------------------------------------------------------------------------------- 1 | #compdef ecdsautil 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for ecdsaultils v0.4.0 (https://github.com/freifunk-gluon/ecdsautils) 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Robinhuett 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _ecdsautil_args() { 17 | case $words[1] in 18 | (sign) 19 | _arguments '1:somefile:_files' 20 | ;; 21 | (verify) 22 | _arguments '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' 23 | '-n[signaturecount]:signaturecount:""' ':file:_files' 24 | ;; 25 | esac 26 | } 27 | 28 | _ecdsautil() { 29 | local -a commands 30 | 31 | commands=( 32 | "help:Show help" 33 | "generate-key:generate a new secret on stdout" 34 | "show-key:output public key of secret read from stdin" 35 | "sign:sign file" 36 | "verify:verify signature of file" 37 | ) 38 | 39 | _arguments -C \ 40 | '1:cmd:->cmds' \ 41 | '*:: :->args' \ 42 | 43 | case "$state" in 44 | (cmds) 45 | _describe -t commands 'commands' commands 46 | ;; 47 | (*) 48 | _ecdsautil_args 49 | ;; 50 | esac 51 | } 52 | 53 | _ecdsautil "$@" 54 | -------------------------------------------------------------------------------- /src/_tldr: -------------------------------------------------------------------------------- 1 | # Old style completion for zsh users. 2 | # Its not using the new compdef syntax, which was introduced in 3.1 3 | # 4 | # Pull requests to update it to the new `compdef` style are welcome. 5 | # 6 | # Copyright (C) 2016 Arvid Gerstmann 7 | # 8 | 9 | _tldr_get_files() { 10 | local ret 11 | local files="$(find $HOME/.tldrc/tldr/pages/$1 -name '*.md' -exec basename -s .md {} +)" 12 | 13 | IFS=$'\n\t' 14 | for f in $files; do 15 | echo $f 16 | done 17 | } 18 | 19 | _tldr_complete() { 20 | local word="$1" 21 | local cmpl="" 22 | if [ "$word" = "-" ]; then 23 | cmpl=$(echo $'\n-v\n-h\n-u\n-c\n-p\n-r' | sort) 24 | elif [ "$word" = "--" ]; then 25 | cmpl=$(echo $'--version\n--help\n--update\n--clear-cache\n--platform\n--render' | sort) 26 | else 27 | if [ -d "$HOME/.tldrc/tldr/pages" ]; then 28 | local platform="$(uname)" 29 | cmpl="$(_tldr_get_files common | sort | uniq)" 30 | if [ "$platform" = "Darwin" ]; then 31 | cmpl="${cmpl}$(_tldr_get_files osx | sort | uniq)" 32 | elif [ "$platform" = "Linux" ]; then 33 | cmpl="${cmpl}$(_tldr_get_files linux | sort | uniq)" 34 | elif [ "$platform" = "SunOS" ]; then 35 | cmpl="${cmpl}$(_tldr_get_files sunos | sort | uniq)" 36 | fi 37 | fi 38 | fi 39 | reply=( "${(ps:\n:)cmpl}" ) 40 | } 41 | 42 | compctl -K _tldr_complete tldr 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The Z Shell is copyright (c) 1992-2017 Paul Falstad, Richard Coleman, 2 | Zoltán Hidvégi, Andrew Main, Peter Stephenson, Sven Wischnowsky, and 3 | others. All rights reserved. Individual authors, whether or not 4 | specifically named, retain copyright in all changes; in what follows, they 5 | are referred to as `the Zsh Development Group'. This is for convenience 6 | only and this body has no legal status. The Z shell is distributed under 7 | the following licence; any provisions made in individual files take 8 | precedence. 9 | 10 | Permission is hereby granted, without written agreement and without 11 | licence or royalty fees, to use, copy, modify, and distribute this 12 | software and to distribute modified versions of this software for any 13 | purpose, provided that the above copyright notice and the following 14 | two paragraphs appear in all copies of this software. 15 | 16 | In no event shall the Zsh Development Group be liable to any party for 17 | direct, indirect, special, incidental, or consequential damages arising out 18 | of the use of this software and its documentation, even if the Zsh 19 | Development Group have been advised of the possibility of such damage. 20 | 21 | The Zsh Development Group specifically disclaim any warranties, including, 22 | but not limited to, the implied warranties of merchantability and fitness 23 | for a particular purpose. The software provided hereunder is on an "as is" 24 | basis, and the Zsh Development Group have no obligation to provide 25 | maintenance, support, updates, enhancements, or modifications. -------------------------------------------------------------------------------- /src/_kdv: -------------------------------------------------------------------------------- 1 | #compdef kdv 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2017, Jonathan Levin (@Morpheus______ / http://newosxbook.com) 5 | # All rights reserved. 6 | # ----------------------------------------------------------------------------- 7 | # 8 | # kdv - KDebug Unleashed for OS X/iOS 9 | # http://newosxbook.com/tools/kdv.html 10 | # 11 | # version: 0.2 12 | # 13 | # ----------------------------------------------------------------------------- 14 | # 15 | # Usage: ./kdv [_pid_|all] 16 | # Where: _pid_ : optional PID to trace (all threads will be traced). Set to 0 for kernel_task :-) 17 | # all : Trace ALL pids (TONS of output!) 18 | # 19 | # This is J's kdebugview version 0.2. Based on Apple's system_cmd's fs_usage(1), sc_usage(1), and trace(1). 20 | # Get the latest version (+ source) at http://NewOSXBook.com/tools/kdv.html 21 | # Comments/Feature Requests always welcome at http://NewOSXBook.com/forum/# 22 | # 23 | # ----------------------------------------------------------------------------- 24 | 25 | function _kdv() { 26 | local curcontext=$curcontext context state line ret=1 27 | typeset -A opt_args 28 | 29 | local -a commands 30 | commands=( 31 | 'all:Trace ALL pids (TONS of output!)' 32 | ) 33 | 34 | _describe -t commands 'command' commands 35 | _message 'optional PID to trace (all threads will be traced). Set to 0 for kernel_task :-)' 36 | 37 | _arguments -C \ 38 | "*: :{_alternative 'processes:: _pids' 'jobs:: _jobs -t'}" \ 39 | && ret=0 40 | 41 | return ret 42 | } 43 | 44 | _kdv "$@" 45 | -------------------------------------------------------------------------------- /src/_sw_vers: -------------------------------------------------------------------------------- 1 | #compdef sw_vers 2 | 3 | # ----------------------------------------------------------------------------- 4 | # The MIT License (MIT) 5 | # 6 | # Copyright (c) 2016 Koichi Shiraishi 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy 9 | # of this software and associated documentation files (the "Software"), to deal 10 | # in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | # copies of the Software, and to permit persons to whom the Software is 13 | # furnished to do so, subject to the following conditions: 14 | # 15 | # The above copyright notice and this permission notice shall be included in 16 | # all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | # SOFTWARE. 25 | # ----------------------------------------------------------------------------- 26 | 27 | _sw_vers() { 28 | _arguments \ 29 | '-productName[Product name]' \ 30 | '-productVersion[Product version]' \ 31 | '-buildVersion[Build version]' 32 | } 33 | 34 | _sw_vers 35 | 36 | # vim:ft=zsh:et:sts=2:sw=2 37 | -------------------------------------------------------------------------------- /src/_age: -------------------------------------------------------------------------------- 1 | #compdef age 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for age 1.1.1 (https://github.com/FiloSottile/age). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Hydrargyrum (https://github.com/hydrargyrum) 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _arguments \ 17 | -A '-*' \ 18 | '(- *)'{-h,--help}'[show help message and exit]' \ 19 | '(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt INPUT to OUTPUT]' \ 20 | '(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt INPUT to OUTPUT]' \ 21 | \*{-i,--identity=}'[Encrypt/Decrypt using the identities at PATH]:IDENTITY:_files' \ 22 | '(-o --output)'{-o,--output=}'[Write encrypted/decrypted file to OUTPUT]:OUTPUT:_files' \ 23 | '(-j --plugin)'{-j,--plugin=}'[Encrypt/Decrypt using the data-less PLUGIN]:PLUGIN:' \ 24 | '(-d --decrypt)'\*{-r,--recipient=}'[Encrypt to the explicitly specified RECIPIENT]:RECIPIENT:' \ 25 | '(-d --decrypt)'\*{-R,--recipients-file=}'[Encrypt to the RECIPIENTS listed in the file at PATH]:RECIPIENTS_FILE:_files' \ 26 | '(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to an ASCII-only "armored" encoding]' \ 27 | '(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \ 28 | :INPUT:_files 29 | 30 | # Local Variables: 31 | # mode: Shell-Script 32 | # sh-indentation: 2 33 | # indent-tabs-mode: nil 34 | # sh-basic-offset: 2 35 | # End: 36 | # vim: ft=zsh sw=2 ts=2 et 37 | -------------------------------------------------------------------------------- /src/_debuild: -------------------------------------------------------------------------------- 1 | #compdef debuild 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for debuild 2.10. 7 | # 8 | # Status: incomplete. 9 | # 10 | # ------------------------------------------------------------------------------ 11 | # Authors 12 | # ------- 13 | # 14 | # * Julien Nicoulaud 15 | # 16 | # ------------------------------------------------------------------------------ 17 | 18 | 19 | # FIXME --noconf is only allowed in first position 20 | _arguments \ 21 | '(- 1 *)'{-h,--help}'[show help]' \ 22 | '(- 1 *)--version[show version and copyright information]' \ 23 | {--no-conf,--noconf}'[don'\''t read devscripts config files]' \ 24 | {-r-,--rootcmd=}'[command used to become root if debuild not setuid root (default: fakeroot)]: :_command_names' \ 25 | '*'{-e-,--preserve-envvar=}'[preserve environment variable]: :_vars' \ 26 | '(-e --preserve-envvar)--preserve-env[preserve all environment vars (except PATH)]' \ 27 | '*'{-e-,--set-envvar=}'[preserve environment variable]: :_vars -qS=' \ 28 | '--prepend-path=[prepend to the sanitised PATH]: :_files -/' \ 29 | '(-D)-d[skip checking of build dependencies]' \ 30 | '(-d)-D[force checking of build dependencies]' \ 31 | '--check-dirname-level[how much to check directory names]:level:((0\:never 1\:only\ if\ program\ changes\ directory\ \(default\) 2\:always))' \ 32 | '--check-dirname-regex[Perl regex defining matching directory names, the string PACKAGE will be replaced by the package name (default: '\''PACKAGE(-.+)?'\'')]:regex' 33 | 34 | # Local Variables: 35 | # mode: Shell-Script 36 | # sh-indentation: 2 37 | # indent-tabs-mode: nil 38 | # sh-basic-offset: 2 39 | # End: 40 | # vim: ft=zsh sw=2 ts=2 et 41 | -------------------------------------------------------------------------------- /src/_swift-demangle: -------------------------------------------------------------------------------- 1 | #compdef swift-demangle 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2015 Keith Smiley (http://keith.so) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the 'Software'), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | # ----------------------------------------------------------------------------- 23 | 24 | _arguments \ 25 | '*:Symbol(s):->' \ 26 | '-compact[Only print demangled names]' \ 27 | '-expand[Show expanded node structure]' \ 28 | '-help-list-hidden[Show all help options]' \ 29 | '-help[Show help]' \ 30 | '-no-sugar[Do not show language syntactic sugar]' \ 31 | '-simplified[Do not display module names or implicit self types]' \ 32 | '-test-remangle[Remangle the string]' \ 33 | '-tree-only[Only show details tree]' \ 34 | '-version[Print version]' 35 | 36 | # vim:ft=zsh:et:sts=2:sw=2 37 | -------------------------------------------------------------------------------- /src/_procexp: -------------------------------------------------------------------------------- 1 | #compdef procexp 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2017, Jonathan Levin (@Morpheus______ / http://newosxbook.com) 5 | # All rights reserved. 6 | # ----------------------------------------------------------------------------- 7 | # 8 | # procexp - Going over the top(1) 9 | # http://newosxbook.com/tools/procexp.html 10 | # 11 | # version: v1-(e^2) , compiled on Dec 11 2016, 14:18:01 12 | # 13 | # ----------------------------------------------------------------------------- 14 | # 15 | # Usage: procexp [pid|all] [binary|core|fds|ports|net|tree|threads|regions|all] 16 | # or 17 | # procexp vmmon 18 | # 19 | # This is J's Process Explorer v1-(e^2) , compiled on Dec 11 2016, 14:18:01 20 | # 21 | # ----------------------------------------------------------------------------- 22 | 23 | function _procexp() { 24 | local curcontext=$curcontext context state line ret=1 25 | typeset -A opt_args 26 | 27 | _args() { 28 | local -a commands 29 | commands=( 30 | 'all' 31 | 'vmmon' 32 | ) 33 | _describe -t commands 'command' commands 34 | _alternative 'processes:: _pids' 'jobs:: _jobs -t' 35 | } 36 | 37 | local -a _filter_option 38 | _filter_option=( 39 | 'core:filtered to core' 40 | 'fds:filtered to fds' 41 | 'ports:filtered to ports' 42 | 'net:filtered to net' 43 | 'tree:filtered to tree' 44 | 'threads:filtered to threads' 45 | 'regions:filtered to regions' 46 | 'all:show all dump' 47 | ) 48 | 49 | _arguments \ 50 | '1:arguments:_args' \ 51 | '*:: :->args' \ 52 | && ret=1 53 | 54 | case $state in 55 | args) 56 | case $words[1] in 57 | *) 58 | _arguments \ 59 | "*: :{_describe 'filter option' _filter_option}" \ 60 | && ret=1 61 | ;; 62 | esac 63 | ;; 64 | esac 65 | 66 | return ret 67 | } 68 | 69 | _procexp "$*" 70 | -------------------------------------------------------------------------------- /src/_genstrings: -------------------------------------------------------------------------------- 1 | #compdef genstrings 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2015 Keith Smiley (http://keith.so) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the 'Software'), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | # ----------------------------------------------------------------------------- 23 | 24 | _arguments \ 25 | '*: :->files' \ 26 | '-a[Appends output to old files]' \ 27 | '-macRoman[Read source files with Mac Roaman encoding]' \ 28 | '-noPositionalParameters[Turns off positional parameters]' \ 29 | '-o[Output directory for tables]:Tables output directory:->files' \ 30 | '-q[Turns off key/value pairs warning]' \ 31 | '-s[Specify custom NSLocalizedString function]:Custom function name:' \ 32 | '-skipTable[Skip over specified table]:Table to skip over:' \ 33 | '-u[Allows unicode in strings files]' 34 | 35 | case "$state" in 36 | files) 37 | _files 38 | ;; 39 | esac 40 | 41 | # vim:ft=zsh:et:sts=2:sw=2 42 | -------------------------------------------------------------------------------- /src/_rmlint.sh: -------------------------------------------------------------------------------- 1 | #compdef rmlint.sh -P rmlint.*.sh 2 | 3 | # Copyright (c) 2021 Github zsh-users - http://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, without written agreement and without 6 | # licence or royalty fees, to use, copy, modify, and distribute this 7 | # software and to distribute modified versions of this software for any 8 | # purpose, provided that the above copyright notice and the following 9 | # two paragraphs appear in all copies of this software. 10 | # 11 | # In no event shall the Zsh Development Group be liable to any party for 12 | # direct, indirect, special, incidental, or consequential damages arising out 13 | # of the use of this software and its documentation, even if the Zsh 14 | # Development Group have been advised of the possibility of such damage. 15 | # 16 | # The Zsh Development Group specifically disclaim any warranties, including, 17 | # but not limited to, the implied warranties of merchantability and fitness 18 | # for a particular purpose. The software provided hereunder is on an "as is" 19 | # basis, and the Zsh Development Group have no obligation to provide 20 | # maintenance, support, updates, enhancements, or modifications. 21 | # 22 | # Description 23 | # ----------- 24 | # 25 | # Zsh completion for shell scripts produced by rmlint (https://github.com/sahib/rmlint) 26 | # 27 | # Authors 28 | # ------- 29 | # 30 | # * oxiedi (https://github.com/oxiedi) 31 | 32 | _arguments -s : \ 33 | '(-)-h[show help message]' \ 34 | '-d[do not ask before running]' \ 35 | '-x[keep rmlint.sh; do not autodelete it]' \ 36 | '-p[recheck that files are still identical before removing duplicates]' \ 37 | '-r[allow deduplication of files on read-only btrfs snapshots (requires sudo)]' \ 38 | '(-d -x)-n[do not perform any modifications, just print what would be done (implies -d and -x)]' \ 39 | '-c[clean up empty directories while deleting duplicates]' \ 40 | '-q[do not show progress]' \ 41 | '-k[keep the timestamp of directories when removing duplicates]' \ 42 | '-i[ask before deleting each file]' 43 | -------------------------------------------------------------------------------- /src/_strings: -------------------------------------------------------------------------------- 1 | #compdef strings 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2015 Keith Smiley (http://keith.so) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the 'Software'), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | # ----------------------------------------------------------------------------- 23 | 24 | _arguments \ 25 | '*: :->files' \ 26 | '-[Search all bytes of file]' \ 27 | '-a[Search al sections of object file]' \ 28 | '-arch[Architecture type]:Architecture for use on universal files:->archs' \ 29 | '-n[Minimum string length]:Minimum string length:' \ 30 | '-o[Write offset in file before string]' \ 31 | '-t[Write offset in file with given format]:Offset format:(d o x)' 32 | 33 | case "$state" in 34 | archs) 35 | archs=( \ 36 | "arm64" \ 37 | "armv7" \ 38 | "armv7s" \ 39 | "i386" \ 40 | "x86_64" \ 41 | ) 42 | _values "Architecture for use on universal files" $archs 43 | ;; 44 | files) 45 | _files 46 | ;; 47 | esac 48 | 49 | # vim:ft=zsh:et:sts=2:sw=2 50 | -------------------------------------------------------------------------------- /src/_jmeter-plugins: -------------------------------------------------------------------------------- 1 | #compdef jmeter-plugins 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for jmeter-plugins command line tool 0.4.2 7 | # (https://jmeter-plugins.org/). 8 | # 9 | # ------------------------------------------------------------------------------ 10 | # Authors 11 | # ------- 12 | # 13 | # * Julien Nicoulaud 14 | # 15 | # ------------------------------------------------------------------------------ 16 | 17 | 18 | _arguments \ 19 | '(- 1 *)--help[show help options]' \ 20 | '--generate-png[generate PNG file containing graph]:PNG file name:_files -g "*.png"' \ 21 | '--generate-csv[generate CSV file containing graph data]:CSV file name:_files -g "*.csv"' \ 22 | '--input-jtl[load data from specified JTL file]:JTL file:_files -g "*.jtl"' \ 23 | '--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))' \ 24 | '--width[set graph width]:graph width (pixels)' \ 25 | '--height[set graph height]::graph height (pixels)' \ 26 | '--granulation[granulation time for samples]:time (ms)' \ 27 | '--relative-times[use relative X axis times, no will set absolute times]: :((yes no))' \ 28 | '--aggregate-rows[aggregate all rows into one]: :((yes no))' \ 29 | '--paint-gradient[paint gradient background]: :((yes no))' \ 30 | '--paint-zeroing[paint zeroing lines]: :((yes no))' \ 31 | '--prevent-outliers[prevent outliers on distribution graph]: :((yes no))' \ 32 | '--limit-rows[limit number of points in row]:number of points' \ 33 | '--force-y[force Y axis limit]:limit' \ 34 | '--hide-low-counts[hide points with sample count below limit]:limit' 35 | 36 | # Local Variables: 37 | # mode: Shell-Script 38 | # sh-indentation: 2 39 | # indent-tabs-mode: nil 40 | # sh-basic-offset: 2 41 | # End: 42 | # vim: ft=zsh sw=2 ts=2 et 43 | -------------------------------------------------------------------------------- /src/_xcode-select: -------------------------------------------------------------------------------- 1 | #compdef xcode-select 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2015 Keith Smiley (http://keith.so) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the 'Software'), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | # ----------------------------------------------------------------------------- 23 | 24 | _arguments \ 25 | '(-h --help)'{-h,--help}'[Print the usage message]' \ 26 | '(-p --print-path)'{-p,--print-path}'[Prints the current developer directory]' \ 27 | '(-r --reset)'{-r,--reset}'[Unsets any user-specified developer directory]' \ 28 | '(-s --switch)'{-s,--switch}'[Set the active developer directory]:Set active developer directory:->switch' \ 29 | '(-v --version)'{-v,--version}'[Prints the xcode-select version]' \ 30 | '--install[Opens UI to install the command line tools]:Installs command line tools' 31 | 32 | case "$state" in 33 | switch) 34 | local -a xcodes 35 | xcodes=(/Applications/Xcode*.app) 36 | if [[ $xcodes != "" ]]; then 37 | _values "Available Xcodes" $xcodes 38 | fi 39 | ;; 40 | esac 41 | 42 | # vim:ft=zsh:et:sts=2:sw=2 43 | -------------------------------------------------------------------------------- /src/_xattr: -------------------------------------------------------------------------------- 1 | #compdef xattr 2 | # zsh completion for OSX's xattr 3 | # 4 | # usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...] 5 | # xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...] 6 | # xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...] 7 | # xattr -d [-r] [-s] attr_name file [file ...] 8 | # xattr -c [-r] [-s] file [file ...] 9 | # 10 | # The first form lists the names of all xattrs on the given file(s). 11 | # The second form (-p) prints the value of the xattr attr_name. 12 | # The third form (-w) sets the value of the xattr attr_name to the string attr_value. 13 | # The fourth form (-d) deletes the xattr attr_name. 14 | # The fifth form (-c) deletes (clears) all xattrs. 15 | # 16 | # options: 17 | # -h: print this help 18 | # -l: print long format (attr_name: attr_value and hex output has offsets and 19 | # ascii representation) 20 | # -r: act recursively 21 | # -s: act on the symbolic link itself rather than what the link points to 22 | # -v: also print filename (automatic with -r and with multiple files) 23 | # -x: attr_value is represented as a hex string for input and output 24 | 25 | local extra 26 | local -a _xattr_options 27 | 28 | _xattr_options=( 29 | '(-w -d -c)-p[prints the value of the xattr attr_name]' 30 | '(-p -d -c -v)-w[sets the value of the xattr attr_name to the string attr_value]' 31 | '(-p -w -c -l -v -x)-d[deletes the xattr attr_name]' 32 | '(-p -w -d -l -v -x)-c[deletes (clears) all xattrs]' 33 | '(- *)-h[print help]' 34 | '-l[print long format (attr_name: attr_value and hex output has offsets and ascii representation)]' 35 | '-r[act recursively]' 36 | '-s[act on the symbolic link itself rather than what the link points to]' 37 | '-v[also print filename (automatic with -r and with multiple files)]' 38 | '-x[attr_value is represented as a hex string for input and output]' 39 | ) 40 | 41 | if [[ $words =~ 'p|d' ]]; then 42 | [[ ${words[$(($#words-1))]} =~ "^-" ]] && extra='(-)*:attribut name' 43 | elif [[ $words =~ 'w' ]]; then 44 | [[ ${words[$(($#words-2))]} =~ "^-" || ${words[$(($#words-1))]} =~ "^-" ]] && extra=(':attribut name' '(-):attribut value') 45 | fi 46 | _arguments -s $_xattr_options ${extra:-'(-)*: :_files'} 47 | -------------------------------------------------------------------------------- /src/_rdfind: -------------------------------------------------------------------------------- 1 | #compdef rdfind 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for rdfind (https://rdfind.pauldreik.se/). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Hydrargyrum (https://github.com/hydrargyrum) 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _arguments \ 17 | "-ignoreempty[ignore empty files]:flag:(true false)" \ 18 | "-minsize[ignore files with less than N bytes]: :_numbers -d 1" \ 19 | "-maxsize[ignore files with N bytes or more]: :_numbers" \ 20 | "-followsymlinks[follow symlinks]:flag:(true false)" \ 21 | "-removeidentinode[remove items found which have identical inode and device ID]:flag:(true false)" \ 22 | "-checksum[type of checksum to be used]:algo:(md5 sha1 sha256 sha512)" \ 23 | "-deterministic[if set (the default), sort files of equal rank in an unspecified but deterministic order]:flag:(true false)" \ 24 | "(-makehardlinks -deleteduplicates)-makesymlinks[replace duplicate files with symbolic links]:flag:(true false)" \ 25 | "(-makesymlinks -deleteduplicates)-makehardlinks[replace duplicate files with hard links]:flag:(true false)" \ 26 | "(-makehardlinks -makesymlinks)-deleteduplicates[delete (unlink) files]:flag:(true false)" \ 27 | "-makeresultsfile[make a results file in the current directory]:flag:(true false)" \ 28 | "-outputname[make the results file name to be \"name\" instead of the default results.txt]:name" \ 29 | "(-n -dryrun)"{-n,-dryrun}"[display what should have been done, don’t actually delete or link anything]:flag:(true false)" \ 30 | "-sleep[sleeps X milliseconds between reading each file, to reduce load]: :_numbers -u ms -d 0" \ 31 | "(-h -help --help)"{-h,-help,--help}"[display a brief help message]" \ 32 | "(-v -version --version)"{-v,-version,--version}"[display the version number]" \ 33 | "*:file or directory:_files" 34 | 35 | # Local Variables: 36 | # mode: Shell-Script 37 | # sh-indentation: 2 38 | # indent-tabs-mode: nil 39 | # sh-basic-offset: 2 40 | # End: 41 | # vim: ft=zsh sw=2 ts=2 et 42 | -------------------------------------------------------------------------------- /src/_filemon: -------------------------------------------------------------------------------- 1 | #compdef filemon 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2017, Jonathan Levin (@Morpheus______ / http://newosxbook.com) 5 | # All rights reserved. 6 | # ----------------------------------------------------------------------------- 7 | # 8 | # filemon - An FSEvents client 9 | # http://newosxbook.com/tools/filemon.html 10 | # 11 | # version: compiled on Jul 21 2016 12 | # 13 | # ----------------------------------------------------------------------------- 14 | # 15 | # Usage: filemon [options] 16 | # Where [options] are optional, and may be any of: 17 | # -p|--proc pid/procname: filter only this process or PID 18 | # -f|--file string[,string]: filter only paths containing this string (/ will catch everything) 19 | # -e|--event event[,event]: filter only these events 20 | # -s|--stop: auto-stop the process generating event 21 | # -l|--link: auto-create a hard link to file (prevents deletion by program :-) 22 | # -c|--color (or set JCOLOR=1 first) 23 | # This is J's filemon, compiled on Jul 21 2016 24 | # 25 | # ----------------------------------------------------------------------------- 26 | 27 | function _filemon() { 28 | local curcontext=$curcontext context state line ret=1 29 | typeset -A opt_args 30 | 31 | _arguments -C \ 32 | '(-p --proc)'{-p,--proc}'[filter only this process or PID]:pid/procname:->proc' \ 33 | '(-f --file)'{-f,--file}'[filter only paths containing this string (/ will catch everything)]:string\[,string\]:_files' \ 34 | '(-e --event)'{-e,--event}'[filter only these events]:event\[,event\]' \ 35 | '(-s --stop)'{-s,--stop}'[auto-stop the process generating event]' \ 36 | '(-l --link)'{-l,--link}'[auto-create a hard link to file (prevents deletion by program :-)]' \ 37 | '(-c --color)'{-c,--color}'[Colorize output (or set JCOLOR=1 first)]' \ 38 | && ret=0 39 | 40 | case $state in 41 | proc) 42 | local cmd 43 | cmd="$(ps -axc -o command=)" 44 | _wanted pname expl $ispat'process name' compadd ${(u)${(f)${cmd}}} \ 45 | && ret=0 46 | 47 | _alternative 'processes:: _pids' 'jobs:: _jobs -t' \ 48 | && ret=0 49 | ;; 50 | esac 51 | 52 | return ret 53 | } 54 | 55 | _filemon "$*" 56 | -------------------------------------------------------------------------------- /src/_gcloud: -------------------------------------------------------------------------------- 1 | #compdef gcloud 2 | autoload -U +X bashcompinit && bashcompinit 3 | zmodload -i zsh/parameter 4 | if ! (( $+functions[compdef] )) ; then 5 | autoload -U +X compinit && compinit 6 | fi 7 | 8 | _python_argcomplete() { 9 | local prefix= 10 | if [[ $COMP_LINE == 'gcloud '* ]]; then 11 | if [[ $3 == ssh && $2 == *@* ]] ;then 12 | # handle ssh user@instance specially 13 | prefix=${2%@*}@ 14 | COMP_LINE=${COMP_LINE%$2}"${2#*@}" 15 | elif [[ $2 == *'='* ]] ; then 16 | # handle --flag=value 17 | prefix=${2%=*}'=' 18 | COMP_LINE=${COMP_LINE%$2}${2/'='/' '} 19 | fi 20 | fi 21 | local IFS=' ' 22 | COMPREPLY=( $(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1 "$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) ) 23 | if [[ $? != 0 ]]; then 24 | unset COMPREPLY 25 | return 26 | fi 27 | # if one completion without a trailing space, add the space 28 | if [[ ${#COMPREPLY[@]} == 1 && $COMPREPLY != *[=' '] ]]; then 29 | COMPREPLY+=' ' 30 | fi 31 | if [[ $prefix != '' ]]; then 32 | typeset -i n 33 | for ((n=0; n < ${#COMPREPLY[@]}; n++));do 34 | COMPREPLY[$n]=$prefix${COMPREPLY[$n]} 35 | done 36 | fi 37 | } 38 | complete -o nospace -o default -F _python_argcomplete "gcloud" 39 | 40 | _completer() { 41 | command=$1 42 | name=$2 43 | eval '[[ -n "$'"${name}"'_COMMANDS" ]] || '"${name}"'_COMMANDS="$('"${command}"')"' 44 | set -- $COMP_LINE 45 | shift 46 | while [[ $1 == -* ]]; do 47 | shift 48 | done 49 | [[ -n "$2" ]] && return 50 | grep -q "${name}\s*$" <<< $COMP_LINE && 51 | eval 'COMPREPLY=($'"${name}"'_COMMANDS)' && 52 | return 53 | [[ "$COMP_LINE" == *" " ]] && return 54 | [[ -n "$1" ]] && 55 | eval 'COMPREPLY=($(echo "$'"${name}"'_COMMANDS" | grep ^'"$1"'))' 56 | } 57 | 58 | unset bq_COMMANDS 59 | _bq_completer() { 60 | _completer "CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK=1 bq help | grep '^[^ ][^ ]* ' | sed 's/ .*//'" bq 61 | } 62 | 63 | complete -o default -F _bq_completer bq 64 | complete -o nospace -F _python_argcomplete gsutil 65 | 66 | -------------------------------------------------------------------------------- /update-completions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | cwd=$(cd "$(dirname "$0")" && pwd) 4 | 5 | # Terminate early on dirty repository 6 | ! git diff --quiet --exit-code . && [ "$1" != "--dry-run" ] && { echo "!!!!!Dirty repository. Exiting...!!!!!"; exit 1; }>&2 7 | 8 | mkdir -p "$cwd/src/" 9 | 10 | git submodule sync --recursive 11 | git submodule update --recursive --remote 12 | 13 | ################################################ 14 | # copy nilsonholger/zsh-completions/ => src/ 15 | ################################################ 16 | cp -Lrf \ 17 | "$cwd/nilsonholger_zsh-completions/_"* \ 18 | "$cwd/src/" 19 | 20 | ################################################ 21 | # copy zchee/zsh-completions/ => src/ 22 | ################################################ 23 | cp -Lrf \ 24 | "$cwd/zchee_zsh-completions/src/zsh/_"* \ 25 | "$cwd/zchee_zsh-completions/src/macOS/_"* \ 26 | "$cwd/src/" 27 | 28 | ################################################ 29 | # copy zsh-users/zsh-completions/ => src/ 30 | ################################################ 31 | cp -Lrf \ 32 | "$cwd/zsh-users_zsh-completions/src/_"* \ 33 | "$cwd/src/" 34 | 35 | ################################################ 36 | # copy various completion files => src/ 37 | ################################################ 38 | cp -Lrf \ 39 | "/usr/local/share/zsh/site-functions/_"* \ 40 | "/usr/local/share/zsh/site-functions/"*".bash" \ 41 | "$cwd/src/" 42 | 43 | #command -v poetry >/dev/null && poetry completions zsh >"$cwd/src/_poetry" 44 | command -v kind >/dev/null && kind completion zsh >"$cwd/src/_kind" 45 | command -v glooctl >/dev/null && glooctl completion zsh >"$cwd/src/_glooctl" 46 | command -v gh >/dev/null && gh completion -s zsh >"$cwd/src/_gh" 47 | 48 | cp -Lrf \ 49 | "$HOME/google-cloud-sdk/completion.zsh.inc" \ 50 | "$cwd/src/_gcloud" && \ 51 | sed -i '1i #compdef gcloud' "$cwd/src/_gcloud" 52 | 53 | ################################################ 54 | # copy override/ => src/ 55 | ################################################ 56 | cp -Lrf \ 57 | "$cwd/override/_"* \ 58 | "$cwd/src/" 59 | 60 | ################################################ 61 | # handle options 62 | ################################################ 63 | if [ "$1" != "--dry-run" ]; then 64 | git pull && git add . && git commit -m "$(date -Iseconds)" && git push origin master || echo "nothing to commit :)" 65 | fi 66 | -------------------------------------------------------------------------------- /src/_networkQuality: -------------------------------------------------------------------------------- 1 | #compdef networkQuality 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for networkQuality on macOS 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Shohei Yoshida (https://github.com/syohex) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments \ 38 | '-C[Use custom configuration URL or path]:url_or_path' \ 39 | '-I[Bind test to interface]:interface:_net_interfaces' \ 40 | '-r[Connect to host or IP]:host' \ 41 | '-c[Produce computer-readable output]' \ 42 | '-h[Show help]' \ 43 | '-k[Disable verification of the server identity via TLS]' \ 44 | '-s[Run tests sequentially instead of parallel upload/download]' \ 45 | '-v[Verbose output]' 46 | 47 | # Local Variables: 48 | # mode: Shell-Script 49 | # sh-indentation: 2 50 | # indent-tabs-mode: nil 51 | # sh-basic-offset: 2 52 | # End: 53 | # vim: ft=zsh sw=2 ts=2 et 54 | -------------------------------------------------------------------------------- /src/_git-pulls: -------------------------------------------------------------------------------- 1 | #compdef git-pulls 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for git-pulls 0.3.1 (https://git-pulls.com/schacon/git-pulls). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Julien Nicoulaud (https://github.com/nicoulaj) 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | 17 | _git-pulls() { 18 | typeset -A opt_args 19 | local context state line curcontext="$curcontext" 20 | 21 | local ret=1 22 | 23 | _arguments -C \ 24 | '(- 1 *)--help[show usage]' \ 25 | '1:cmd:->cmds' \ 26 | '*::arg:->args' \ 27 | && ret=0 28 | 29 | case "$state" in 30 | (cmds) 31 | local commands; commands=( 32 | 'update:update pull requests list' 33 | 'list:list pull requests' 34 | 'show:show pull request' 35 | 'browse:open pull request in a web browser' 36 | 'merge:merge pull request' 37 | ) 38 | _describe -t commands 'command' commands && ret=0 39 | ;; 40 | (args) 41 | curcontext="${curcontext%:*:*}:git-pulls-cmd-$words[1]:" 42 | case $words[1] in 43 | (update) 44 | _message 'no more arguments' && ret=0 45 | ;; 46 | (list) 47 | _arguments \ 48 | '--reverse[list in reverse order]' \ 49 | && ret=0 50 | ;; 51 | (show) 52 | _arguments \ 53 | '1: :_git-pulls_pull_requests_numbers' \ 54 | '--full[use verbose output]' \ 55 | && ret=0 56 | ;; 57 | (browse|merge) 58 | _arguments \ 59 | '1: :_git-pulls_pull_requests_numbers' \ 60 | && ret=0 61 | ;; 62 | esac 63 | ;; 64 | esac 65 | 66 | return ret 67 | } 68 | 69 | (( $+functions[_git-pulls_pull_requests_numbers] )) || 70 | _git-pulls_pull_requests_numbers() { 71 | local pull_requests; pull_requests=(${${${(M)${(f)"$(_call_program users $service list)"}:#[[:digit:]]##[[:space:]]*}//:/\\:}/[[:space:]]##/:}) 72 | _describe -t pull-request-numbers 'pull request number' pull_requests "$@" 73 | } 74 | 75 | _git-pulls "$@" 76 | 77 | # Local Variables: 78 | # mode: Shell-Script 79 | # sh-indentation: 2 80 | # indent-tabs-mode: nil 81 | # sh-basic-offset: 2 82 | # End: 83 | # vim: ft=zsh sw=2 ts=2 et 84 | -------------------------------------------------------------------------------- /src/_tmuxinator: -------------------------------------------------------------------------------- 1 | #compdef tmuxinator mux 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2010-2016 Christopher Chow 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be 14 | # included in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # 25 | # Description 26 | # ----------- 27 | # 28 | # Completion script for tmuxinator (https://github.com/tmuxinator/tmuxinator) 29 | # 30 | # ------------------------------------------------------------------------------ 31 | # Authors 32 | # ------- 33 | # 34 | # * Christopher Chow (https://github.com/Soliah) 35 | # 36 | # ------------------------------------------------------------------------------ 37 | 38 | _tmuxinator() { 39 | local commands projects 40 | commands=(${(f)"$(tmuxinator commands zsh)"}) 41 | projects=(${(f)"$(tmuxinator completions start)"}) 42 | 43 | if (( CURRENT == 2 )); then 44 | _describe -t commands "tmuxinator subcommands" commands 45 | _describe -t projects "tmuxinator projects" projects 46 | elif (( CURRENT == 3)); then 47 | case $words[2] in 48 | copy|debug|delete|open|start) 49 | _arguments '*:projects:($projects)' 50 | ;; 51 | esac 52 | fi 53 | 54 | return 55 | } 56 | 57 | _tmuxinator 58 | 59 | # Local Variables: 60 | # mode: Shell-Script 61 | # sh-indentation: 2 62 | # indent-tabs-mode: nil 63 | # sh-basic-offset: 2 64 | # End: 65 | # vim: ft=zsh sw=2 ts=2 et 66 | -------------------------------------------------------------------------------- /src/_trash: -------------------------------------------------------------------------------- 1 | #compdef trash 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2022 Github zsh-users - http://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, without written agreement and without 6 | # licence or royalty fees, to use, copy, modify, and distribute this 7 | # software and to distribute modified versions of this software for any 8 | # purpose, provided that the above copyright notice and the following 9 | # two paragraphs appear in all copies of this software. 10 | # 11 | # In no event shall the Zsh Development Group be liable to any party for 12 | # direct, indirect, special, incidental, or consequential damages arising out 13 | # of the use of this software and its documentation, even if the Zsh 14 | # Development Group have been advised of the possibility of such damage. 15 | # 16 | # The Zsh Development Group specifically disclaim any warranties, including, 17 | # but not limited to, the implied warranties of merchantability and fitness 18 | # for a particular purpose. The software provided hereunder is on an "as is" 19 | # basis, and the Zsh Development Group have no obligation to provide 20 | # maintenance, support, updates, enhancements, or modifications. 21 | # 22 | # ------------------------------------------------------------------------------ 23 | # Description 24 | # ----------- 25 | # 26 | # Completion script for trash-d (https://github.com/rushsteve1/trash-d) 27 | # 28 | # ------------------------------------------------------------------------------ 29 | # Authors 30 | # ------- 31 | # 32 | # * danso (https://danso.ca) 33 | # 34 | # ------------------------------------------------------------------------------ 35 | 36 | 37 | _arguments -C \ 38 | '--version[display version information and exit]' \ 39 | {-h,--help}'[display usage information]' \ 40 | {-d,--directory}'[remove empty directories]' \ 41 | {-r,-R,--recursive}'[delete directories and their contents recursively]' \ 42 | {-v,--verbose}'[print more information]' \ 43 | {-i,--interactive}'[ask before each deletion]' \ 44 | {-I,--interactive-once}'[ask once if deleting 3 or more]' \ 45 | {-f,--force}"[don't prompt and ignore errors]" \ 46 | --list'[list out the files in the trash]' \ 47 | --orphans'[list orphaned files in the trash]' \ 48 | --restore'[restore a file from the trash]' \ 49 | --delete'[delete a file from the trash]' \ 50 | --empty'[empty the trash bin]' \ 51 | --rm'[bypass trash bin and permanently delete a file]' \ 52 | '*: :_files' 53 | -------------------------------------------------------------------------------- /src/_homestead: -------------------------------------------------------------------------------- 1 | #compdef homestead 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for homestead (http://laravel.com/docs/homestead). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * loranger (https://github.com/loranger) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _homestead_get_command_list () { 43 | homestead --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' 44 | } 45 | 46 | _homestead () { 47 | if [ -f homestead ]; then 48 | compadd `_homestead_get_command_list` 49 | fi 50 | } 51 | 52 | compdef _homestead php homestead 53 | compdef _homestead homestead 54 | -------------------------------------------------------------------------------- /src/_prlctl: -------------------------------------------------------------------------------- 1 | #compdef prlctl 2 | # 3 | # Parallels prlctl zsh completion 4 | # 5 | # Using this PDF as a reference for the available commands and parameters: 6 | # http://www.parallels.com/fileadmin/parallels/documents/support/pdfm/Parallels_Command_Line_Reference_Guide.pdf 7 | 8 | local -a _1st_arguments 9 | _1st_arguments=( 10 | 'set' 11 | 'backup' 12 | 'backup-delete' 13 | 'backup-list' 14 | 'capture' 15 | 'change-password' 16 | 'clone' 17 | 'create' 18 | 'delete' 19 | 'encrypt' 20 | 'decrypt' 21 | 'enter' 22 | 'exec' 23 | 'installtools' 24 | 'list' 25 | 'migrate' 26 | 'pause' 27 | 'suspend' 28 | 'resume' 29 | 'problem-report' 30 | 'register' 31 | 'unregister' 32 | 'restore' 33 | 'server' 34 | 'snapshot' 35 | 'snapshot-delete' 36 | 'snapshot-list' 37 | 'snapshot-switch' 38 | 'start' 39 | 'stop' 40 | 'reset' 41 | ) 42 | 43 | _prlmachines() { 44 | prlctl list --all --no-header -o name 2>/dev/null | while read machine; do 45 | _wanted 'machine' expl 'machine' compadd $machine 46 | done 47 | } 48 | 49 | _arguments '*:: :->subcmds' && return 0 50 | 51 | if (( CURRENT == 1 )); then 52 | _describe -t commands "prctl commands" _1st_arguments -V1 53 | return 54 | fi 55 | 56 | case "$words[1]" in 57 | installtools) 58 | _arguments \ 59 | :machine:_prlmachines 60 | ;; 61 | 62 | list) 63 | _arguments \ 64 | {-a,--all}'[List all, running, stopped, suspended, and paused virtual machines]' \ 65 | {-t,--template}'[List the available virtual machine templates]' \ 66 | '--no-header[Do not display column headers]' \ 67 | {-o,--output}'[Specify field(s) to output]:type:(uuid name status)' \ 68 | {-s,--sort}'[Sort output in ascending order by specified field]:type:(uuid name status)' \ 69 | {-i,--info}'[Display detailed information about a virtual machine]' 70 | ;; 71 | 72 | start) 73 | _arguments \ 74 | :machine:_prlmachines 75 | ;; 76 | 77 | stop) 78 | _arguments \ 79 | :machine:_prlmachines \ 80 | '--kill' 81 | ;; 82 | 83 | reset) 84 | _arguments \ 85 | :machine:_prlmachines 86 | ;; 87 | 88 | pause) 89 | _arguments \ 90 | :machine:_prlmachines 91 | ;; 92 | 93 | suspend) 94 | _arguments \ 95 | :machine:_prlmachines 96 | ;; 97 | 98 | resume) 99 | _arguments \ 100 | :machine:_prlmachines 101 | ;; 102 | 103 | esac 104 | 105 | # vim:ft=zsh:et:sts=2:sw=2 106 | -------------------------------------------------------------------------------- /src/_class-dump: -------------------------------------------------------------------------------- 1 | #compdef class-dump 2 | 3 | # ----------------------------------------------------------------------------- 4 | # The MIT License (MIT) 5 | # 6 | # Copyright (c) 2016 Koichi Shiraishi 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy 9 | # of this software and associated documentation files (the "Software"), to deal 10 | # in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | # copies of the Software, and to permit persons to whom the Software is 13 | # furnished to do so, subject to the following conditions: 14 | # 15 | # The above copyright notice and this permission notice shall be included in 16 | # all copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | # SOFTWARE. 25 | # ----------------------------------------------------------------------------- 26 | 27 | _class-dump() { 28 | _arguments \ 29 | '-a[show instance variable offsets]' \ 30 | '-A[show implementation addresses]' \ 31 | '--arch[choose a specific architecture from a universal binary]:arch:(ppc ppc64 i386 x86_64 armv6 armv7 armv7s arm64)' \ 32 | '-C[only display classes matching regular expression]:regex' \ 33 | '-f[find string in method name]:str' \ 34 | '-H[generate header files in current directory, or directory specified with -o]' \ 35 | '-I[sort classes, categories, and protocols by inheritance (overrides -s)]' \ 36 | '-o[output directory used for -H]:dir' \ 37 | '-r[recursively expand frameworks and fixed VM shared libraries]' \ 38 | '-s[sort classes and categories by name]' \ 39 | '-S[sort methods by name]' \ 40 | '-t[suppress header in output, for testing]' \ 41 | '--list-arches[list the arches in the file, then exit]' \ 42 | '--sdk-ios[specify iOS SDK version]' \ 43 | '--sdk-mac[specify Mac OS X version]' \ 44 | '--sdk-root[specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)]' \ 45 | '*:mach-o-file:_files' 46 | } 47 | 48 | _class-dump 49 | 50 | # vim:ft=zsh:et:sts=2:sw=2 51 | -------------------------------------------------------------------------------- /src/_geany: -------------------------------------------------------------------------------- 1 | #compdef geany 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for Geany (http://www.geany.org). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Julien Nicoulaud 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | 17 | _arguments \ 18 | '(- 1 *)'{-h,--help}'[Show help options]' \ 19 | '(- 1 *)--help-all[Show all help options]' \ 20 | '(- 1 *)--help-gtk[Show GTK+ Options]' \ 21 | '(- 1 *)'{-V,--version}'[Show version and exit]' \ 22 | '(--column)--column[Set initial column number for the first opened file (useful in conjunction with --line)]:column number' \ 23 | '(-c --config)'{-c,--config}'[Use an alternate configuration directory]:configuration file:_files' \ 24 | '(--ft-names)--ft-names[Print internal filetype names]' \ 25 | '(-g --generate-tags)'{-g,--generate-tags}'[Generate global tags file (see documentation)]' \ 26 | '(-P --no-preprocessing)'{-P,--no-preprocessing}'[Don'\''t preprocess C/C++ files when generating tags]' \ 27 | '(-i --new-instance)'{-i,--new-instance}'[Don'\''t open files in a running instance, force opening a new instance]' \ 28 | '(--socket-file)--socket-file[Use this socket filename for communication with a running Geany instance]:socket file:_files' \ 29 | '(--list-documents)--list-documents[Return a list of open documents in a running Geany instance]' \ 30 | '(-l --line)'{-l,--line}'[Set initial line number for the first opened file]:line number' \ 31 | '(-m --no-msgwin)'{-m,--no-msgwin}'[Don'\''t show message window at startup]' \ 32 | '(-n --no-ctags)'{-n,--no-ctags}'[Don'\''t load auto completion data (see documentation)]' \ 33 | '(-p --no-plugins)'{-p,--no-plugins}'[Don'\''t load plugins]' \ 34 | '(--print-prefix)--print-prefix[Print Geany'\''s installation prefix]' \ 35 | '(-s --no-session)'{-s,--no-session}'[Don'\''t load the previous session'\''s files]' \ 36 | '(-t --no-terminal)'{-t,--no-terminal}'[Don'\''t load terminal support]' \ 37 | '(--vte-lib)--vte-lib[Filename of libvte.so]:libvte.so filename:_files -g "*.so"' \ 38 | '(-v --verbose)'{-v,--verbose}'[Be verbose]' \ 39 | '(--display)--display[X display to use]:X display:_x_display' \ 40 | '*: :_files' 41 | 42 | # Local Variables: 43 | # mode: Shell-Script 44 | # sh-indentation: 2 45 | # indent-tabs-mode: nil 46 | # sh-basic-offset: 2 47 | # End: 48 | # vim: ft=zsh sw=2 ts=2 et 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | zsh-completions ![GitHub release](https://img.shields.io/github/release/clarketm/zsh-completions.svg) 2 | ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 3 | 4 | **Additional completion definitions for [Zsh](http://www.zsh.org).** 5 | 6 | This project aggregates zsh completions from: 7 | 1. [zsh-users/zsh-completions](https://github.com/zsh-users/zsh-completions) 8 | 2. [zchee/zsh-completions](https://github.com/zchee/zsh-completions) 9 | 3. [nilsonholger/osx-zsh-completions](https://github.com/nilsonholger/osx-zsh-completions) 10 | 4. and *various* other [custom] or third-party sources. 11 | 12 | *This projects 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.* 13 | 14 | 15 | ## Usage 16 | 17 | ### Using zsh frameworks 18 | 19 | #### [antigen](https://github.com/zsh-users/antigen) 20 | 21 | Add `antigen bundle clarketm/zsh-completions` to your `~/.zshrc`. 22 | 23 | #### [oh-my-zsh](http://github.com/robbyrussell/oh-my-zsh) 24 | 25 | * Clone the repository inside your oh-my-zsh repo: 26 | 27 | git clone https://github.com/clarketm/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions 28 | 29 | * Enable it in your `.zshrc` by adding it to your plugin list and reloading the completion: 30 | 31 | plugins=(... zsh-completions) 32 | autoload -U compinit && compinit 33 | 34 | ### Manual installation 35 | 36 | * Clone the repository: 37 | 38 | git clone git://github.com/clarketm/zsh-completions.git 39 | 40 | * Include the directory in your `$fpath`, for example by adding in `~/.zshrc`: 41 | 42 | fpath=(path/to/zsh-completions/src $fpath) 43 | 44 | * You may have to force rebuild `zcompdump`: 45 | 46 | rm -f ~/.zcompdump; compinit 47 | 48 | 49 | ## License 50 | Completions use the Zsh license, unless explicitly mentioned in the file header. 51 | See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information. 52 | 53 | [custom]: https://github.com/clarketm/zsh-completions/blob/03471ae0d49beb7d90e2900b45e54cbefa353e83/update-completions.sh#L35-L59 54 | -------------------------------------------------------------------------------- /src/_container-builder-local: -------------------------------------------------------------------------------- 1 | #compdef container-builder-local 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2017 The Go Authors. All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # ----------------------------------------------------------------------------- 32 | 33 | function _container-builder-local() { 34 | local context curcontext=$curcontext state line ret=1 35 | declare -A opt_args 36 | 37 | _arguments -C \ 38 | '-config=[cloud build config file path (default "cloudbuild.yaml")]:config file:_files' \ 39 | '-dryrun[If true, nothing will be run (default true)]' \ 40 | '-help[If true, print the help message]' \ 41 | '-push[If true, the images will be pushed]' \ 42 | '-substitutions[substitutions key=value pairs separated by comma; for example _FOO=bar,_BAZ=baz]:key=value' \ 43 | '-version[If true, print the local builder version]' \ 44 | '*:source:_files' \ 45 | && ret=0 46 | 47 | return ret 48 | } 49 | 50 | _container-builder-local "$*" 51 | 52 | # vim:ft=zsh:et:sts=2:sw=2 53 | -------------------------------------------------------------------------------- /src/_trash-list: -------------------------------------------------------------------------------- 1 | #compdef trash-list 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for trash-list a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _arguments \ 43 | '--version[show programs version number and exit]' \ 44 | {-h,--help}'[show help message and exit]' \ 45 | '*: :' 46 | 47 | # Local Variables: 48 | # mode: Shell-Script 49 | # sh-indentation: 2 50 | # indent-tabs-mode: nil 51 | # sh-basic-offset: 2 52 | # End: 53 | # vim: ft=zsh sw=2 ts=2 et 54 | -------------------------------------------------------------------------------- /src/_trash-restore: -------------------------------------------------------------------------------- 1 | #compdef trash-restore 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for trash-restore a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _trash-restore() { 43 | 44 | _arguments -C \ 45 | '--version[Show programs version number and exit]' \ 46 | '*: :' \ 47 | 48 | } 49 | 50 | _trash-restore 51 | 52 | # Local Variables: 53 | # mode: Shell-Script 54 | # sh-indentation: 2 55 | # indent-tabs-mode: nil 56 | # sh-basic-offset: 2 57 | # End: 58 | # vim: ft=zsh sw=2 ts=2 et 59 | -------------------------------------------------------------------------------- /src/_trash-empty: -------------------------------------------------------------------------------- 1 | #compdef trash-empty 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for trash-empty a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _trash-empty() { 43 | 44 | _arguments -C \ 45 | '--version[Show programs version number and exit]' \ 46 | {-h,--help}'[Show help message and exit]' \ 47 | '*: :' \ 48 | 49 | } 50 | 51 | _trash-empty 52 | 53 | # Local Variables: 54 | # mode: Shell-Script 55 | # sh-indentation: 2 56 | # indent-tabs-mode: nil 57 | # sh-basic-offset: 2 58 | # End: 59 | # vim: ft=zsh sw=2 ts=2 et 60 | -------------------------------------------------------------------------------- /src/_caffeinate: -------------------------------------------------------------------------------- 1 | #compdef caffeinate 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------- 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for the macOS 'caffeinate' tool (man 8 caffeinate). 32 | # 33 | # ------------------------------------------------------------------------- 34 | # Authors 35 | # ------- 36 | # 37 | # * Nicolas Despres (initial version) 38 | # 39 | # ------------------------------------------------------------------------- 40 | 41 | _arguments -s \ 42 | '-d[prevent the display from sleeping]' \ 43 | '-i[prevent the system from idle sleeping]' \ 44 | '-m[prevent the disk from idle sleeping]' \ 45 | '-s[prevent the system from sleeping but only when running on AC power]' \ 46 | '-u[declare that user is active]' \ 47 | '-t+[assertion timeout value]:delay in seconds' \ 48 | '-w+[waits for process to exit]:pid:_pids' \ 49 | '(-):command: _command_names -e' \ 50 | '*::args: _normal' 51 | -------------------------------------------------------------------------------- /src/_gas: -------------------------------------------------------------------------------- 1 | #compdef gas 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for gas (https://github.com/walle/gas). 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Fredrik Wallgren 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | local curcontext="$curcontext" state line cmds ret=1 38 | 39 | _arguments -C \ 40 | '(- 1 *)'{-v,--version}'[display version information]' \ 41 | '(-h|--help)'{-h,--help}'[show help information]' \ 42 | '1: :->cmds' \ 43 | '*: :->args' && ret=0 44 | 45 | case "$state" in 46 | (cmds) 47 | cmds=( 48 | "version:Prints Gas's version" 49 | "use:Uses author" 50 | "show:Shows your current user" 51 | "list:Lists your authors" 52 | "import:Imports current user to gasconfig" 53 | "help:Describe available tasks or one specific task" 54 | "delete:Deletes author" 55 | "add:Adds author to gasconfig" 56 | ) 57 | _describe -t commands 'gas command' cmds && ret=0 58 | ;; 59 | (args) 60 | case "$line[1]" in 61 | (use|delete) 62 | _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0 63 | ;; 64 | esac 65 | ;; 66 | esac 67 | 68 | return ret 69 | 70 | -------------------------------------------------------------------------------- /src/_mkcert: -------------------------------------------------------------------------------- 1 | #compdef mkcert 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for mkcert v1.4.4 (https://github.com/FiloSottile/mkcert) 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Shohei Yoshida (https://github.com/syohex) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments \ 38 | '(- *)-help[Print help message]' \ 39 | '(- *)-version[Print version information]' \ 40 | '-install[Install the local CA in the system trust store]' \ 41 | '-uninstall[Uninstall the local CA]' \ 42 | '-cert-file[Specify cert file output path]:path:_files' \ 43 | '-key-file[Specify key file output path]:path:_files' \ 44 | '-p12-file[Specify p12 file output path]:path:_files' \ 45 | '-client[Generate a certificate for client authentication]' \ 46 | '-ecdsa[Generate a certificate with an ECDSA key]' \ 47 | '-pkcs12[Generate a ".p12" PKCS #12 file]' \ 48 | '-csr[Generate a certificate based on the supplied CSR]:csr' \ 49 | '(- *)-CAROOT[Print the CA certificate and key storage location]' \ 50 | && return 0 51 | 52 | # Local Variables: 53 | # mode: Shell-Script 54 | # sh-indentation: 2 55 | # indent-tabs-mode: nil 56 | # sh-basic-offset: 2 57 | # End: 58 | # vim: ft=zsh sw=2 ts=2 et 59 | -------------------------------------------------------------------------------- /src/_envdir: -------------------------------------------------------------------------------- 1 | #compdef envdir 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016, Github zsh-users (https://github.com/zsh-users) 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY DIRECT, 21 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for envdir (https://github.com/jezdez/envdir). 32 | # It completes its few options and then a directory and command. 33 | # 34 | # ------------------------------------------------------------------------------ 35 | # Authors 36 | # ------- 37 | # 38 | # * Daniel Hahler 39 | # 40 | # ------------------------------------------------------------------------------ 41 | 42 | local -a args=( 43 | '(-h --help)'{-h+,--help}'[show this help message and exit]' 44 | '(-)'--version'[display version information and exit]' 45 | '(-)1:directory: _path_files -/' 46 | '(-)2:command: _command_names -e' 47 | '*::arguments: _precommand' 48 | ) 49 | _arguments -S $args 50 | 51 | # Local Variables: 52 | # mode: Shell-Script 53 | # sh-indentation: 2 54 | # indent-tabs-mode: nil 55 | # sh-basic-offset: 2 56 | # End: 57 | # vim: ft=zsh sw=2 ts=2 et 58 | -------------------------------------------------------------------------------- /src/_lsattr: -------------------------------------------------------------------------------- 1 | #compdef lsattr 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for lsattr a tool which lists file attributes on a Linux second extended file system. (http://e2fsprogs.sourceforge.net/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _lsattr() { 43 | 44 | _arguments -C \ 45 | "(-d)-R[Recursively list attributes of directories and their contents.]" \ 46 | "-V[Display the program version.]" \ 47 | "(-d)-a[List all files in directories, including files that start with '.']" \ 48 | "(-a -R)-d[List directories like other files, rather than listing their contents.]" \ 49 | "-v[List the file\'s version/generation number.]" \ 50 | '*:files:_files' \ 51 | } 52 | 53 | _lsattr 54 | 55 | -------------------------------------------------------------------------------- /src/_exportfs: -------------------------------------------------------------------------------- 1 | #compdef exportfs 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for nfs's exportfs - maintain table of exported NFS file systems. 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Timofey Titovets 38 | # 39 | # ------------------------------------------------------------------------------ 40 | _exportfs() { 41 | _values -w 'option' \ 42 | '(-i)-a[Export or unexport all directories]' \ 43 | '(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \ 44 | '(-i)-r[Reexport all directories]' \ 45 | '(-i)-u[Unexport one or more directories]' \ 46 | '-f[Flush everything out of export table]' \ 47 | '-o[option1,option2.. Specify a list of export options]' \ 48 | '-s[Display the current export list suitable for /etc/exports]' \ 49 | '-v[Be verbose]' 50 | } 51 | _exportfs "$@" 52 | -------------------------------------------------------------------------------- /src/_joker: -------------------------------------------------------------------------------- 1 | #compdef joker 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2017, Jonathan Levin (@Morpheus______ / http://newosxbook.com) 5 | # All rights reserved. 6 | # ----------------------------------------------------------------------------- 7 | # 8 | # joker - A quick and dirty iOS kernelcache handling utility 9 | # http://newosxbook.com/tools/joker.html 10 | # 11 | # version: Compiled on Sep 9 2016 12 | # 13 | # ----------------------------------------------------------------------------- 14 | # 15 | # Usage: joker [-j] [-MmaSsKk] _filename_ 16 | # _filename_ should be a decrypted iOS kernelcache, or kernel dump. Tested on ARMv7/s 3.x-9.3, and ARM64 through 10.0.1GM 17 | # 18 | # -m: dump Mach Traps and MIG tables (NEW) 19 | # -a: dump everything 20 | # -k: dump kexts 21 | # -K: kextract [kext_bundle_id_or_name_shown_in_-k|all] to JOKER_DIR or /tmp 22 | # -S: dump sysctls 23 | # -s: dump UNIX syscalls 24 | # -j: Jtool compatible output (to companion file) 25 | # 26 | # -dec: Decompress kernelcache to /tmp/kernel (complzss only at this stage) 27 | # 28 | # Kernels not included. Get your own dump or decrypted kernel from iPhoneWiki, or Apple itself (as of iOS 10b1! Thanks, guys!) 29 | # 30 | # 3.0 with MACF Policies, stub symbolication, SPLIT KEXTS, Sandbox Profiles (beta, collections only at this point) , kpp and (coming soon) IOUserClients! 31 | # Compiled on Sep 9 2016 32 | # 33 | # Contains code from Haruhiko Okumura (CompuServe 74050,1022) from BootX-81//bootx.tproj/sl.subproj/lzss.c 34 | # 35 | # ----------------------------------------------------------------------------- 36 | 37 | function _joker() { 38 | local context curcontext=$curcontext state line 39 | declare -A opt_args 40 | local ret=1 41 | 42 | _arguments -S \ 43 | '-m[dump Mach Traps and MIG tables]' \ 44 | '-a[dump everything]' \ 45 | '-k[dump kexts]' \ 46 | '-K[kextract to JOKER_DIR or /tmp]:kext bundle id/kexts name:->kextract' \ 47 | '-S[dump sysctls]' \ 48 | '-s[dump UNIX syscalls]' \ 49 | '-j[Jtool compatible output (to companion file)]' \ 50 | '-dec[Decompress kernelcache to /tmp/kernel (complzss only at this stage)]' \ 51 | '1:Decrypted iOS kernelcache or kernel dump:_files' \ 52 | && ret=0 53 | 54 | case $state in 55 | kextract) 56 | # TODO(zchee): support of '_name_shown_in_-k' 57 | # if (( CURRENT == 1 )); then 58 | # echo $CURRENT 59 | # local _names 60 | # _names=$(joker $CURRENT -k) 61 | # _arguments '*:kext name:_names' 62 | # return 63 | # fi 64 | local commands 65 | commands=( 66 | 'all:extract all' 67 | ) 68 | _describe '' commands 69 | ;; 70 | esac 71 | 72 | return ret 73 | } 74 | 75 | _joker "$*" 76 | -------------------------------------------------------------------------------- /src/_artisan: -------------------------------------------------------------------------------- 1 | #compdef artisan 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for artisan (http://laravel.com/docs/artisan). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * loranger (https://github.com/loranger) 38 | # * Yohan Tambè (https://github.com/Cronos87) 39 | # 40 | # ------------------------------------------------------------------------------ 41 | 42 | 43 | _artisan_get_command_list () { 44 | IFS=" " 45 | php artisan --no-ansi | \ 46 | sed "1,/Available commands/d" | \ 47 | awk '/ [a-z]+/ { print $1 }' | \ 48 | sed -E 's/^[ ]+//g' | \ 49 | sed -E 's/[:]+/\\:/g' | \ 50 | sed -E 's/[ ]{2,}/\:/g' 51 | } 52 | 53 | _artisan () { 54 | if [ -f artisan ]; then 55 | local -a commands 56 | IFS=$'\n' 57 | commands=(`_artisan_get_command_list`) 58 | _describe 'commands' commands 59 | fi 60 | } 61 | 62 | compdef _artisan php artisan 63 | compdef _artisan artisan 64 | -------------------------------------------------------------------------------- /src/_do-release-upgrade: -------------------------------------------------------------------------------- 1 | #compdef do-release-upgrade 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for do-release-upgrade 23.10.10 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Shohei Yoshida (https://github.com/syohex) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments \ 38 | '(- *)'{-h,--help}'[Show this help message and exit]' \ 39 | '(- *)'{-v,--version}'[Show version and exit]' \ 40 | '(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \ 41 | '--data-dir=[Directory that contains the data files]:dir:_files -/' \ 42 | '(-p --proposed)'{-p,--proposed}'[Try upgrading to the latest release using the upgrade from \$distro-proposed]' \ 43 | '(-m --mode)'{-m,--mode=}'[Run in a special upgrade mode]:mode:(desktop server)' \ 44 | '(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \ 45 | '(- *)--check-dist-upgrade-only[Check only if a new distribution release is available]' \ 46 | '--allow-third-party[Try the upgrade with third party mirrors and repositories]' \ 47 | '(-q --quiet)'{-q,--quiet}'[Quiet mode]' \ 48 | \*{-e,--env=}'[A comma-separated list of environment variables]' 49 | 50 | # Local Variables: 51 | # mode: Shell-Script 52 | # sh-indentation: 2 53 | # indent-tabs-mode: nil 54 | # sh-basic-offset: 2 55 | # End: 56 | # vim: ft=zsh sw=2 ts=2 et 57 | -------------------------------------------------------------------------------- /src/_issw: -------------------------------------------------------------------------------- 1 | #compdef issw 2 | 3 | # ----------------------------------------------------------------------------- 4 | # 5 | # Copyright 2024, The zsh-completions Authors 6 | # All rights reserved. 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions are met: 10 | # 11 | # * Redistributions of source code must retain the above copyright notice, this 12 | # list of conditions and the following disclaimer. 13 | # 14 | # * Redistributions in binary form must reproduce the above copyright notice, 15 | # this list of conditions and the following disclaimer in the documentation 16 | # and/or other materials provided with the distribution. 17 | # 18 | # * Neither the name of que nor the names of its 19 | # contributors may be used to endorse or promote products derived from 20 | # this software without specific prior written permission. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | # ----------------------------------------------------------------------------- 35 | # 36 | # github.com/vovkasm/input-source-switcher 37 | # 38 | # ----------------------------------------------------------------------------- 39 | 40 | function _issw() { 41 | local context curcontext=$curcontext state line expl ret=1 42 | declare -A opt_args 43 | 44 | _input_sources() { 45 | for p in $(issw -l); do 46 | _alternative ":input-source-id:($p)" 47 | done 48 | } 49 | 50 | _arguments -C \ 51 | "-h[show help message]" \ 52 | "-l[list all selectable input sources]" \ 53 | "-V[print version number#]" \ 54 | "1: :_input_sources" \ 55 | && ret=0 56 | 57 | return ret 58 | } 59 | 60 | _issw "$*" 61 | 62 | # ----------------------------------------------------------------------------- 63 | # 64 | # issw [-h] [-l] [] 65 | # 66 | # -h - show help message 67 | # -l - list all selectable input sources 68 | # -V - print version number# 69 | # 70 | # ----------------------------------------------------------------------------- 71 | 72 | # vim:ft=zsh:et:sts=2:sw=2 73 | -------------------------------------------------------------------------------- /src/_subl: -------------------------------------------------------------------------------- 1 | #compdef subl 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for Sublime Text (https://www.sublimetext.com/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Fabian Klötzl (https://github.com/kloetzl) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | local I="-h --help -v --version" 43 | local -a args 44 | args+=( 45 | "(- *)"{-h,--help}'[display usage information]' 46 | "(- *)"{-v,--version}'[display version information]' 47 | "($I)--project[load the given project]:project" 48 | "($I)--command[run the given command]:command" 49 | "($I -n --new-window)"{-n,--new-window}'[open a new window]' 50 | "($I -a --add)"{-a,--add}'[add folders to the current window]' 51 | "($I -w --wait)"{-w,--wait}'[wait for the files to be closed before returning]' 52 | "($I -b --background)"{-b,--background}"[don't activate the application]" 53 | ) 54 | _arguments "$args[@]" '*:file:_files' 55 | 56 | -------------------------------------------------------------------------------- /src/_ffind: -------------------------------------------------------------------------------- 1 | #compdef ffind 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for ffind (https://github.com/jaimebuelta/ffind). 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Sergei Eremenko (https://github.com/SmartFinn) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments -C \ 38 | '(-h --help)'{-h,--help}'[show help message and exit]' \ 39 | '--version[show version number and exit]' \ 40 | '-p[match whole path, not only name of files]' \ 41 | '--nocolor[do not display color]' \ 42 | '--nosymlinks[do not follow symlinks]' \ 43 | '--hidden[do not ignore hidden directories]' \ 44 | '-c[force case sensitive]' \ 45 | '-i[force case insensitive]' \ 46 | '--delete[delete files found]' \ 47 | '--exec[execute the given command with the file found]:command:_command_names' \ 48 | '--module[execute the given module with the file found]:module_name args:' \ 49 | '--command[execute the given python program with the file found]:program:_files' \ 50 | '--ignore-vcs[ignore version control system files and directories]' \ 51 | '-f[experimental fuzzy search]' \ 52 | '--return-results[for testing purposes only]' \ 53 | '1:directory to search:_path_files -/' \ 54 | '*:filepattern:' 55 | 56 | # Local Variables: 57 | # mode: Shell-Script 58 | # sh-indentation: 2 59 | # indent-tabs-mode: nil 60 | # sh-basic-offset: 2 61 | # End: 62 | # vim: ft=zsh sw=2 ts=2 et 63 | -------------------------------------------------------------------------------- /src/_flake8: -------------------------------------------------------------------------------- 1 | #compdef flake8 2 | 3 | _flake8() { 4 | _arguments \ 5 | '--version[show programs version number and exit]' \ 6 | {-h,--help}'[show this help message and exit]' \ 7 | {-v,-vv,--verbose}'[print status messages, or debug with -vv]' \ 8 | {-q,-qq,--quiet}'[report only file names, or nothing with -qq]' \ 9 | '--first[show first occurrence of each error]' \ 10 | '--exclude[exclude files or directories which match these comma separated patterns (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox)]':patterns \ 11 | '--filename=[when parsing directories, only check filenames matching these comma separated patterns (default: *.py)]':patterns \ 12 | '--select=[select errors and warnings (e.g. E,W6)]':'select errors': \ 13 | '--ignore=[skip errors and warnings (e.g. E4,W) (default: E121,E123,E126,E226,E24,E704,W503)]':'ignore errors' \ 14 | '--show-source[show source code for each error]' \ 15 | '--show-pep8[show text of PEP 8 for each error (implies --first)]' \ 16 | '--statistics[count errors and warnings]' \ 17 | '--count[print total number of errors and warnings to standard error and set exit code to 1 if total is not null]' \ 18 | '--max-line-length=[set maximum allowed line length (default: 79)]:number' \ 19 | '--hang-closing[hang closing bracket instead of matching indentation of opening brackets line]' \ 20 | '--format=[set the error format \[default|pylint|\]]':format \ 21 | '--diff[report changes only within line number ranges in the unified diff received on STDIN]' \ 22 | {-j,--jobs}="[number of jobs to run simultaneously, or 'auto'. This=JOBS is ignored on Windows]:number of jos" \ 23 | '--exit-zero[exit with code 0 even if there are errors]' \ 24 | '--builtins=[define more built-ins, comma separated]:BUILTINS' \ 25 | '--doctests[check syntax of the doctests]' \ 26 | '--include-in-doctest=[Run doctests only on these files]:INCLUDE_IN_DOCTEST' \ 27 | '--exclude-from-doctest=[Skip these files when running doctests]:EXCLUDE_FROM_DOCTEST:_files' \ 28 | '--application-import-names=[Import names to consider as application specific]:APPLICATION_IMPORT_NAMES' \ 29 | '--import-order-style=[Style to follow. Available: cryptography, google, smarkets, pep8]:IMPORT_ORDER_STYLE:(cryptography google smarkets pep8)' \ 30 | '--show-pep257[show explanation of each PEP 257 error]' \ 31 | '--max-complexity=[McCabe complexity threshold]:MAX_COMPLEXITY' \ 32 | '--install-hook[Install the appropriate hook for this repository]' \ 33 | '--output-file=[Redirect report to a file]:OUTPUT_FILE' \ 34 | '--enable-extensions=[Enable plugins and extensions that are disabled by default]:ENABLE_EXTENSIONS' \ 35 | '--benchmark[measure processing speed]' \ 36 | '--config[user config file location]:_files' \ 37 | '*:filename:_files' 38 | } 39 | 40 | _flake8 41 | 42 | # vim:ft=zsh:et:sts=2:sw=2 43 | -------------------------------------------------------------------------------- /src/_l3build: -------------------------------------------------------------------------------- 1 | #compdef l3build 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for l3build (https://github.com/latex3/l3build/). 7 | # Modified from rejected https://github.com/latex3/l3build/pull/267 8 | # 9 | # ------------------------------------------------------------------------------ 10 | # Authors 11 | # ------- 12 | # 13 | # * Wu Zhenyu 14 | # 15 | # ------------------------------------------------------------------------------ 16 | 17 | __l3build() { 18 | local targets=( 19 | 'check:Run\ all\ automated\ tests' 20 | 'clean:Clean\ out\ directory\ tree' 21 | 'ctan:Create\ CTAN-ready\ archive' 22 | 'doc:Typesets\ all\ documentation\ files' 23 | 'install:Installs\ files\ into\ the\ local\ texmf\ tree' 24 | 'manifest:Creates\ a\ manifest\ file' 25 | 'save:Saves\ test\ validation\ log' 26 | 'tag:Updates\ release\ tags\ in\ files' 27 | 'uninstall:Uninstalls\ files\ from\ the\ local\ texmf\ tree' 28 | 'unpack:Unpacks\ the\ source\ files\ into\ the\ build\ tree' 29 | 'upload:Send\ archive\ to\ CTAN\ for\ public\ release' 30 | ) 31 | local options=( 32 | {--config,-c}'[Sets the config(s) used for running tests]':lua_file:'_files -g "*.lua"' 33 | --date'[Sets the date to insert into sources]': 34 | --debug'[Runs target in debug mode]' 35 | --dirty'[Skip cleaning up the test area]' 36 | --dry-run'[Dry run for install or upload]' 37 | --email'[Email address of CTAN uploader]': 38 | {--engine,-e}'[Sets the engine(s) to use for running test]':engine:'(pdftex xetex luatex ptex uptex)' 39 | --epoch'[Sets the epoch for tests and typesetting]': 40 | {--file,-F}'[Take the upload announcement from the given file]':file:_files 41 | --first'[Name of first test to run]': 42 | {--force,-f}'[Force tests to run if engine is not set up]' 43 | --full'[Install all files]' 44 | {--halt-on-error,-H}'[Stops running tests after the first failure]' 45 | '(- : *)'{--help,-h}'[Print this message and exit]' 46 | --last'[Name of last test to run]': 47 | {--message,-m}'[Text for upload announcement message]': 48 | {--quiet,-q}'[Suppresses TeX output when unpacking]' 49 | --rerun'[Skip setup\: simply rerun tests]' 50 | --show-log-on-error'[Show the full log of the failure with '\''halt-on-error'\'']' 51 | {--show-saves,-S}'[Show the invocation to update failing .tlg files]' 52 | --shuffle'[Shuffle order of tests]' 53 | --texmfhome'[Location of user texmf tree]': 54 | '(- : *)'--version'[Print version information and exit]' 55 | ) 56 | _arguments -s -S $options "1:target:(($targets))" 57 | } 58 | 59 | __l3build 60 | 61 | # Local Variables: 62 | # mode: Shell-Script 63 | # sh-indentation: 2 64 | # indent-tabs-mode: nil 65 | # sh-basic-offset: 2 66 | # End: 67 | # vim: ft=zsh sw=2 ts=2 et 68 | -------------------------------------------------------------------------------- /src/_tarsnap: -------------------------------------------------------------------------------- 1 | #compdef tarsnap 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2014-2017 Daniel Teunis - https://github.com/danteu 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | # ------------------------------------------------------------------------------ 23 | # Description 24 | # ----------- 25 | # 26 | # Completion script for tarsnap 1.0.39 (http://tarsnap.com). 27 | # 28 | # ------------------------------------------------------------------------------ 29 | # Author 30 | # ------- 31 | # 32 | # * Daniel Teunis 33 | # 34 | # ------------------------------------------------------------------------------ 35 | 36 | _arguments \ 37 | '(- 1 *)--help[prints tarsnap help]' \ 38 | '(- 1 *)--version[prints tarsnap version number]' \ 39 | '(- 1 *)--verify-config[checks configuration files for syntactic errors]' \ 40 | '--fsck[performs integrity checks on the stored archives]' \ 41 | '--fsck-prune[performs integrity checks and prunes broken data]' \ 42 | '--list-archives[prints names of stored archives]' \ 43 | '--nuke[deletes all stored archives]' \ 44 | '--print-stats[prints archive statistics]' \ 45 | '--recover[recovers partial archive]' \ 46 | '-c[creates archive]' \ 47 | '-d[deletes specified archive]' \ 48 | '-r[prints content of specified archive]' \ 49 | '-t[lists archive content]' \ 50 | '-x[extracts specified archive]' \ 51 | '--lowmem[reduces memory usage by not caching small files]' \ 52 | '--quiet[silences some warnings]' \ 53 | '--keyfile[specifies keyfile]:keyfile:->file' \ 54 | '--cachedir[specifies cache directory]:cachedir:->directory' \ 55 | '-f[specifies archive name]:archivename:->file' 56 | 57 | case "$state" in 58 | file) 59 | _files 60 | ;; 61 | directory) 62 | _path_files -/ 63 | ;; 64 | esac 65 | -------------------------------------------------------------------------------- /src/_chatblade: -------------------------------------------------------------------------------- 1 | #compdef chatblade 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for chatblade (https://github.com/npiv/chatblade) 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Johannes Bittner (https://github.com/johannes87) 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _chatblade() { 17 | local -a args 18 | local context state state_descr line 19 | typeset -A opt_args 20 | 21 | args+=( 22 | '(- *)'{-h,--help}'[show this help message and exit]' 23 | '--openai-api-key[the OpenAI API key can also be set as env variable OPENAI_API_KEY]:key' 24 | '--temperature[temperature (openai setting)]:temperature' 25 | '(-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)' 26 | '(-i --interactive)'{-i,--interactive}'[start an interactive chat session. This will implicitly continue the conversation]' 27 | '(-s --stream)'{-s,--stream}'[Stream the incoming text to the terminal]' 28 | '(-t --tokens)'{-t,--tokens}'[display what *would* be sent, how many tokens, and estimated costs]' 29 | '(-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' 30 | '(-e --extract)'{-e,--extract}'[extract content from response if possible (either json or code block)]' 31 | '(-r --raw)'{-r,--raw}'[print session as pure text, dont pretty print or format]' 32 | '(-n --no-format)'{-n,--no-format}'[do not add pretty print formatting to output]' 33 | '(-o --only)'{-o,--only}'[Only display the response, omit query]' 34 | '--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' 35 | '(-l --last)'{-l,--last}'[alias for -S last, the default session if none is specified]' 36 | '(-S --session)'{-S,--session}'[initiate or continue named session]:session:->sessions' 37 | '--session-list[list sessions]' 38 | '--session-path[show path to session file]' 39 | '--session-dump[dump session to stdout]' 40 | '--session-delete[delete session]' 41 | '--session-rename[rename session]:new session:->sessions' 42 | ) 43 | 44 | _arguments -s $args 45 | 46 | case $state in 47 | (sessions) 48 | local -a sessions 49 | sessions=("${(@f)$(chatblade --session-list)}") 50 | _describe 'session' sessions 51 | ;; 52 | esac 53 | } 54 | 55 | _chatblade 56 | 57 | # Local Variables: 58 | # mode: Shell-Script 59 | # sh-indentation: 2 60 | # indent-tabs-mode: nil 61 | # sh-basic-offset: 2 62 | # End: 63 | # vim: ft=zsh sw=2 ts=2 et 64 | -------------------------------------------------------------------------------- /src/_teamocil: -------------------------------------------------------------------------------- 1 | #compdef teamocil 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for Teamocil 1.4.2 (https://github.com/remiprev/teamocil). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Petr Zelenin 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | _arguments \ 42 | '--here[set up the first window in the current window]' \ 43 | '--edit[edit the YAML layout file instead of using it]' \ 44 | '--layout [use a specific layout file, instead of \`~/.teamocil/.yml\`]' \ 45 | '--list[list all available layouts in \`~/.teamocil/\`]' \ 46 | '--show[show the content of the layout file instead of executing it]' \ 47 | '--debug[show the commands Teamocil will execute instead of actually executing them]' \ 48 | '*:teamocil layouts:_files -W ~/.teamocil -g "*.yml(:r)"' 49 | 50 | # Local Variables: 51 | # mode: Shell-Script 52 | # sh-indentation: 2 53 | # indent-tabs-mode: nil 54 | # sh-basic-offset: 2 55 | # End: 56 | # vim: ft=zsh sw=2 ts=2 et 57 | -------------------------------------------------------------------------------- /src/_choc: -------------------------------------------------------------------------------- 1 | #compdef choc 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for choc (https://chocolatapp.com/) 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Nicholas Penree (https://github.com/drudge) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | local curcontext="$curcontext" state line ret=1 42 | typeset -A opt_args 43 | 44 | _arguments -C \ 45 | '(-a --async)'{-a,--async}'[do not wait for the user to close the file in Chocolat]' \ 46 | '(-w --wait)'{-w,--wait}'[wait for file to be closed by Chocolat]' \ 47 | '(-n --no-reactivation)'{-n,--no-reactivation}'[after editing with -w, do not reactivate the calling app]' \ 48 | '(-h --help)'{-h,--help}'[show help information]' \ 49 | '(-v --version)'{-v,--version}'[print version information]' \ 50 | '*:script or directory:_files' && ret=0 51 | 52 | return ret 53 | 54 | # Local Variables: 55 | # mode: Shell-Script 56 | # sh-indentation: 2 57 | # indent-tabs-mode: nil 58 | # sh-basic-offset: 2 59 | # End: 60 | # vim: ft=zsh sw=2 ts=2 et 61 | -------------------------------------------------------------------------------- /src/_git-revise: -------------------------------------------------------------------------------- 1 | #compdef git-revise 2 | #description update, split and rearrange commits 3 | # ------------------------------------------------------------------------------ 4 | # Description 5 | # ----------- 6 | # 7 | # Completion script for git-revise 0.7.0 8 | # (https://github.com/mystor/git-revise/). 9 | # 10 | # ------------------------------------------------------------------------------ 11 | # Authors 12 | # ------- 13 | # 14 | # * Hannu Hartikainen (https://github.com/dancek) 15 | # 16 | # ------------------------------------------------------------------------------ 17 | 18 | __git-revise_commits() { 19 | local -a commits 20 | if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then 21 | commits=(${(f)"$(git log -20 --pretty=format:'%h:%d %s' | sed 's/: /:/')"}) 22 | _describe -V 'commit' commits 23 | else 24 | _message 'not a git repository' 25 | fi 26 | } 27 | 28 | __git-revise_branches() { 29 | local -a branches 30 | if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then 31 | branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) 32 | _describe 'branch' branches 33 | else 34 | _message 'not a git repository' 35 | fi 36 | } 37 | 38 | _git-revise() { 39 | local curcontext="$curcontext" ret=1 40 | 41 | _arguments -s \ 42 | '(- :)'{-h,--help}'[show help message and exit]' \ 43 | '--root[revise starting at the root commit]' \ 44 | '--ref=[reference to update]: :__git-revise_branches' \ 45 | '--reauthor[reset the author of the targeted commit]' \ 46 | '(- :)--version[show version number and exit]' \ 47 | '(--edit -e)'{--edit,-e}'[edit commit message of targeted commit(s)]' \ 48 | '(--no-autosquash)--autosquash[automatically apply fixup! and squash! commits to their targets]' \ 49 | '(--autosquash)--no-autosquash[force disable revise.autoSquash behaviour]' \ 50 | '(--all -a)--no-index[ignore the index while rewriting history]' \ 51 | '(--no-index --all -a)'{--all,-a}'[stage all tracked files before running]' \ 52 | '(--interactive -i --message -m --cut -c --patch -p)'{--patch,-p}'[interactively stage hunks before running]' \ 53 | '(--interactive -i --message -m --cut -c --patch -p)'{--interactive,-i}'[interactively edit commit stack]' \ 54 | '(--interactive -i --message -m --cut -c --patch -p)'{--message,-m}'[specify commit message on command line]:MESSAGE:()' \ 55 | '(--interactive -i --message -m --cut -c --patch -p)'{--cut,-c}'[interactively cut a commit into two smaller commits]' \ 56 | '(--gpg-sign -S --no-gpg-sign)'{--gpg-sign,-S}'[GPG sign commits]' \ 57 | '(--gpg-sign -S --no-gpg-sign)--no-gpg-sign[do not GPG sign commits]' \ 58 | '1: :__git-revise_commits' && ret=0 59 | 60 | return $ret 61 | } 62 | 63 | _git-revise "$@" 64 | 65 | # Local Variables: 66 | # mode: Shell-Script 67 | # sh-indentation: 2 68 | # indent-tabs-mode: nil 69 | # sh-basic-offset: 2 70 | # End: 71 | # vim: ft=zsh sw=2 ts=2 et 72 | -------------------------------------------------------------------------------- /src/_brew_services: -------------------------------------------------------------------------------- 1 | #compdef 'brew services' 2 | #autoload 3 | 4 | __brew_installed_services() { 5 | local -a services 6 | services=($(brew services list | awk '{print $1}' | tail -n+2)) 7 | _describe -t services 'installed services' services 8 | } 9 | 10 | __brew_services_commands() { 11 | local -a commands 12 | commands=( 13 | 'cleanup:Get rid of stale services and unused plists' 14 | 'list:List all services managed by brew services' 15 | 'restart:Gracefully restart selected service' 16 | "run:Run selected service. Don't start at login (nor boot)." 17 | 'start:Start selected service' 18 | 'stop:Stop selected service' 19 | ) 20 | _describe -t commands 'commands' commands 21 | } 22 | 23 | __brew_services_expand_alias() 24 | { 25 | local command_or_alias="$1" 26 | local -A aliases 27 | aliases=( 28 | clean cleanup 29 | cl cleanup 30 | rm cleanup 31 | ls list 32 | r restart 33 | relaunch restart 34 | reload restart 35 | launch start 36 | load start 37 | l start 38 | s start 39 | unload stop 40 | terminate stop 41 | u stop 42 | t stop 43 | ) 44 | command="${aliases[$command_or_alias]:-$command_or_alias}" 45 | print "${command}" 46 | } 47 | 48 | _brew_services_cleanup() { 49 | return 1 50 | } 51 | 52 | _brew_services_list() { 53 | return 1 54 | } 55 | 56 | _brew_services_restart() { 57 | _arguments \ 58 | '(2)--all[operate on all services]' \ 59 | '(--all)2:service:__brew_installed_services' 60 | } 61 | 62 | _brew_services_run() { 63 | _arguments \ 64 | '(2)--all[operate on all services]' \ 65 | '(--all)2:service:__brew_installed_services' 66 | } 67 | 68 | _brew_services_start() { 69 | _arguments \ 70 | '(2)--all[operate on all services]' \ 71 | '(--all)2:service:__brew_installed_services' \ 72 | '*:plist: ' 73 | } 74 | 75 | _brew_services_stop() { 76 | _arguments \ 77 | '(2)--all[operate on all services]' \ 78 | '(--all)2:service:__brew_installed_services' 79 | } 80 | 81 | 82 | 83 | _brew_services() { 84 | local curcontext="$curcontext" state state_descr line expl 85 | local ret=1 86 | 87 | _arguments -C \ 88 | '1: :->command' \ 89 | '*: :->service' && return 0 90 | 91 | case $state in 92 | command) 93 | __brew_services_commands ;; 94 | service) 95 | local command_or_alias command 96 | command_or_alias="${line[1]}" 97 | command=$(__brew_services_expand_alias "$command_or_alias") 98 | 99 | # change context to e.g. brew-service-list 100 | curcontext="${curcontext%:*:*}:brew-services-${command}" 101 | local completion_func="_brew_services_${command//-/_}" 102 | _call_function ret "${completion_func}" && return ret 103 | 104 | _message "a completion function is not defined for brew service ${command}" 105 | return 1 106 | ;; 107 | esac 108 | } 109 | 110 | _brew_services "$@" 111 | -------------------------------------------------------------------------------- /src/_trash-put: -------------------------------------------------------------------------------- 1 | #compdef trash-put trash 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for trash-put a tool from trash management package trash-cli (http://code.google.com/p/trash-cli). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _arguments -C \ 43 | '--version[display version information]' \ 44 | {-h,--help}'[display usage information]' \ 45 | {-d,--directory}'[remove empty directories - ignored (for GNU rm compatibility)]' \ 46 | {-f,--force}'[ignore nonexistent arguments and never prompt - ignored (for GNU rm compatibility)]' \ 47 | {-i,--interactive}'[prompt before every removal - ignored (for GNU rm compatibility)]' \ 48 | {-r,-R,--recursive}'[remove directories and their content recursively - ignored (for GNU rm compatibility)]' \ 49 | {-v,--verbose}'[explain what is being done]' \ 50 | '*: :_files' 51 | 52 | # Local Variables: 53 | # mode: Shell-Script 54 | # sh-indentation: 2 55 | # indent-tabs-mode: nil 56 | # sh-basic-offset: 2 57 | # End: 58 | # vim: ft=zsh sw=2 ts=2 et 59 | -------------------------------------------------------------------------------- /src/_atach: -------------------------------------------------------------------------------- 1 | #compdef atach 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for atach (https://github.com/sorin-ionescu/atach). 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Sorin Ionescu 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | local state mode_values existing_sessions ret=1 38 | 39 | mode_values=( 40 | "none:disable redrawing" 41 | "ctrl_l:use ctrl + l to redraw" 42 | "winch:use sigwinch to redraw" 43 | ) 44 | 45 | existing_sessions=($(_call_program session atach)) 46 | 47 | _arguments -C -s -S \ 48 | '(--list -l)'{--list,-l}'[list sessions]' \ 49 | '(--sockets -L)'{--sockets,-L}'[list sockets]' \ 50 | '(--session -s)'{--session=,-s+}'[set the session name]:session' \ 51 | '(--char -c)'{--char=,-c+}'[set the detach character (default: ^\\)]:char' \ 52 | '(--redraw -r)'{--redraw=,-r+}'[set the redraw method (none, ctrl_l, or winch)]:mode:->mode' \ 53 | '(--detached -d)'{--detached,-d}'[start the session detached]' \ 54 | '(--no-detach -D)'{--no-detach,-D}'[disable detaching]' \ 55 | '(--no-suspend -Z)'{--no-suspend,-Z}'[disable suspending]' \ 56 | '(--version -v)'{--version,-v}'[display version and copyright]' \ 57 | '(--help -h)'{--help,-h}'[display help]' \ 58 | '(-)::args:->session-or-command' && ret=0 59 | 60 | case "$state" in 61 | (mode) 62 | _describe -t mode 'redraw mode' mode_values && ret=0 63 | ;; 64 | (session-or-command) 65 | _describe -t 'session' 'sessions' existing_sessions && ret=0 66 | _path_commands && ret=0 67 | ;; 68 | esac 69 | 70 | return $ret 71 | 72 | -------------------------------------------------------------------------------- /src/_llvm-objdump: -------------------------------------------------------------------------------- 1 | #compdef llvm-objdump 2 | 3 | # ----------------------------------------------------------------------------- 4 | # The BSD-3-Clause License 5 | # 6 | # Copyright (c) 2016, Koichi Shiraishi 7 | # All rights reserved. 8 | # 9 | # Redistribution and use in source and binary forms, with or without 10 | # modification, are permitted provided that the following conditions are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright notice, this 13 | # list of conditions and the following disclaimer. 14 | # 15 | # * Redistributions in binary form must reproduce the above copyright notice, 16 | # this list of conditions and the following disclaimer in the documentation 17 | # and/or other materials provided with the distribution. 18 | # 19 | # * Neither the name of que nor the names of its 20 | # contributors may be used to endorse or promote products derived from 21 | # this software without specific prior written permission. 22 | # 23 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 | # POSSIBILITY OF SUCH DAMAGE. 34 | # ----------------------------------------------------------------------------- 35 | 36 | function _llvm-objdump() { 37 | local context curcontext=$curcontext state line ret=1 38 | declare -A opt_args 39 | 40 | _arguments -- -help-list-hidden '*:object file:_files' 41 | 42 | # _arguments -C \ 43 | # '*:: :->args' \ 44 | # && ret=0 45 | # 46 | # case $state in 47 | # (args) 48 | # if (( CURRENT == 2 )); then 49 | # _arguments '*:after the (( CURRENT == 2 )) comment:' 50 | # return 51 | # fi 52 | # _arguments '*:before the (( CURRENT == 2 )) comment:_files' 53 | # ;; 54 | # 55 | # case $words[1] in 56 | # subcommand1) 57 | # _arguments \ 58 | # '-foo[subcommand2 -foo argument comment]' 59 | # '*:file:_files' 60 | # ;; 61 | # subcommand2) 62 | # _arguments \ 63 | # '-bar[subcommand2 -bar argument comment]' \ 64 | # '-baz[subcommand2 -baz argument comment]' 65 | # '*:devices:_devices' 66 | # ;; 67 | # subcommand3) 68 | # _arguments \ 69 | # ;; 70 | # esac 71 | # ;; 72 | # esac 73 | # 74 | # return ret 75 | } 76 | 77 | _llvm-objdump "$*" 78 | 79 | # vim:ft=zsh:et:sts=2:sw=2 80 | -------------------------------------------------------------------------------- /src/_shutdown: -------------------------------------------------------------------------------- 1 | #compdef shutdown 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for shutdown - Shut down the system 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Timofey Titovets 38 | # 39 | # ------------------------------------------------------------------------------ 40 | _shutdown(){ 41 | local -a _1st_arguments 42 | _1st_arguments=( 43 | "--help:Show help" 44 | "-H:Halt the machine" "--halt:Halt the machine" 45 | "-P:Power-off the machine" "--poweroff:Power-off the machine" 46 | "-r:Reboot the machine" "--reboot:Reboot the machine" 47 | "-h:Equivalent to --poweroff, overridden by --halt" 48 | "-k:Dont halt/power-off/reboot, just send warnings" 49 | "--no-wall:Dont send wall message before halt/power-off/reboot" 50 | "-c:Cancel a pending shutdown" 51 | ) 52 | 53 | local context state line expl 54 | local -A opt_args 55 | 56 | _arguments '*:: :->subcmds' && return 0 57 | 58 | if (( CURRENT == 1 )); then 59 | _describe -t commands "shutdown commands" _1st_arguments -V1 60 | return 61 | fi 62 | 63 | case "$words[1]" in 64 | *) 65 | _arguments \ 66 | ':list option:(now +{0,5,10,15,30} hh:mm)' 67 | ;; 68 | esac 69 | } 70 | 71 | _shutdown "$@" 72 | -------------------------------------------------------------------------------- /src/_mina: -------------------------------------------------------------------------------- 1 | #compdef mina 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for Mina (http://nadarei.co/mina/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Kazuya Takeshima (https://github.com/mitukiii) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | local curcontext="$curcontext" state line cmds ret=1 43 | 44 | _arguments -C \ 45 | {-h,--help}'[Show help]' \ 46 | {-V,--version}'[Show program version]' \ 47 | {-v,--verbose}'[Show commands as they happen]' \ 48 | {-s,--simulate}'[Run in simulation mode]' \ 49 | {-t,--trace}'[Show backtraces when errors occur]' \ 50 | -f'[Use FILE as the deploy configuration]:file:_files' \ 51 | '*: :->cmds' && ret=0 52 | 53 | case $state in 54 | cmds) 55 | cmds=( ${(f)"$(_call_program commands mina -T 2> /dev/null | sed -e 's/:/\\:/g; s/\[/\\[/g; s/\]/\\]/g; s/mina \([^ ]*\) .*# /\1:/g')"} ) 56 | _describe -t commands 'mina command' cmds && ret=0 57 | ;; 58 | esac 59 | 60 | return ret 61 | 62 | # Local Variables: 63 | # mode: Shell-Script 64 | # sh-indentation: 2 65 | # indent-tabs-mode: nil 66 | # sh-basic-offset: 2 67 | # End: 68 | # vim: ft=zsh sw=2 ts=2 et 69 | -------------------------------------------------------------------------------- /src/_column: -------------------------------------------------------------------------------- 1 | #compdef column 2 | # 3 | # ------------------------------------------------------------------------------ 4 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are met: 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the zsh-users nor the 15 | # names of its contributors may be used to endorse or promote products 16 | # derived from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 22 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # ------------------------------------------------------------------------------ 29 | # Description 30 | # ----------- 31 | # 32 | # Completion script for column (from util-linux 2.27.1->) 33 | # (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | # Authors 37 | # ------- 38 | # 39 | # * Ole Jørgen Brønner 40 | # 41 | # ------------------------------------------------------------------------------ 42 | # 43 | # Note: column has upstream bash completions. 44 | # 45 | # Automatically generated with http://github.com/RobSis/zsh-completion-generator 46 | 47 | local arguments 48 | 49 | arguments=( 50 | '(-c --columns)'{-c,--columns}'[width of output in number of characters]:width:' 51 | '(-t --table)'{-t,--table}'[create a table]' 52 | '(-s --separator)'{-s,--separator}'[possible table delimiters]:separator:' 53 | '(-o --output-separator)'{-o,--output-separator}'[columns separator for table output; default is two spaces]:separator:' 54 | '(-x --fillrows)'{-x,--fillrows}'[fill rows before columns]' 55 | '(-h --help)'{-h,--help}'[display this help and exit]' 56 | '(-V --version)'{-V,--version}'[output version information and exit]' 57 | '*:filename:_files' 58 | ) 59 | 60 | _arguments -s $arguments 61 | -------------------------------------------------------------------------------- /src/_dad: -------------------------------------------------------------------------------- 1 | #compdef dad 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for dad a command line manager of aria2 daemon. (https://github.com/baskerville/diana). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | _dad() { 42 | typeset -A opt_args 43 | local context state line 44 | local curcontext="$curcontext" 45 | 46 | local -a commands=( 47 | "start:Start aria2c daemon" 48 | "stop:Stop aria2c daemon" 49 | ) 50 | 51 | _arguments -C \ 52 | '(- 1 *)'-h"[Show help and exit]" \ 53 | "-d[Set download dir]:download_dir:->val" \ 54 | "-s[Set secret token]:secret_token:->val" \ 55 | "-u[Set aria2c username]:username:->val" \ 56 | "-p[Set aria2c password]:password:->val" \ 57 | '1:cmd:->cmds' \ 58 | '*: : :->args' 59 | 60 | case "$state" in 61 | (cmds) 62 | _describe -t commands 'commands' commands 63 | ;; 64 | esac 65 | } 66 | 67 | _dad 68 | 69 | # Local Variables: 70 | # mode: Shell-Script 71 | # sh-indentation: 2 72 | # indent-tabs-mode: nil 73 | # sh-basic-offset: 2 74 | # End: 75 | # vim: ft=zsh sw=2 ts=2 et 76 | -------------------------------------------------------------------------------- /src/_sdkmanager: -------------------------------------------------------------------------------- 1 | #compdef sdkmanager 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for sdkmanager(https://developer.android.com/studio/command-line/sdkmanager) 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Shohei Yoshida (https://github.com/syohex) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments \ 38 | '(- *)--help[show help message]' \ 39 | '(- *)--version[print the current version of sdkmanager]' \ 40 | '--install[install or update package]' \ 41 | '--uninstall[uninstall the listed packages]' \ 42 | '--update[all installed packages are updated to the latest version]' \ 43 | '--list_installed[all installed packages are printed out]' \ 44 | '--licenses[show and offer the option to accept licenses for all available packages]' \ 45 | '--sdk_root=[use the specified SDK root instead of the SDK containing this tool]: :_files -/' \ 46 | '--channel=[include packages in channels up to channel ID]: :((0\:Stable 1\:Beta 2\:Dev 3\:Canary))' \ 47 | '--include_obsolete[show/update obsolete packages in the package listing]' \ 48 | '--newer[show only new and/or updatable packages]' \ 49 | '--no_https[force all connections to use http rather than https]' \ 50 | '--proxy=[connect via a proxy of the given type]: :(http socks)' \ 51 | '--proxy_host=[IP or DNS address of the proxy to use]:address' \ 52 | '--proxy_port=[proxy port to connect to]:port' \ 53 | '--verbose[enable verbose output]' 54 | 55 | # Local Variables: 56 | # mode: Shell-Script 57 | # sh-indentation: 2 58 | # indent-tabs-mode: nil 59 | # sh-basic-offset: 2 60 | # End: 61 | # vim: ft=zsh sw=2 ts=2 et 62 | -------------------------------------------------------------------------------- /src/_cheat: -------------------------------------------------------------------------------- 1 | #compdef cheat 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for Cheat an interactive cheatsheets on the command-line. (https://github.com/chrisallenlane/cheat/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | local cheats 42 | 43 | _cheat_load_cheats() { 44 | cheats=("${(f)$(cheat -l | cut -d' ' -f1)}") 45 | } 46 | 47 | 48 | _cheat() { 49 | 50 | 51 | _arguments -C -s -S -n \ 52 | '(- 1 *)'{-d,--directories}'[List directories on CHEATPATH]: :->full' \ 53 | '(- 1 *)'{-e,--edit}'[Edit cheatsheet]:cheat:->cheats' \ 54 | '(- 1 *)'{-l,--list}'[List cheatsheets]: :->full' \ 55 | '(- 1 *)'{-s,--search}'[Search cheatsheets for ]: :->full' \ 56 | '(- 1 *)'{-v,--version}'[display version and copyright information]: :->full' \ 57 | 58 | case "$state" in 59 | (full) 60 | ;; 61 | (cheats) 62 | _cheat_load_cheats 63 | _describe -t cheats 'cheats' cheats 64 | ;; 65 | (*) 66 | _cheat_load_cheats 67 | _describe -t cheats 'cheats' cheats 68 | ;; 69 | esac 70 | } 71 | 72 | _cheat 73 | 74 | -------------------------------------------------------------------------------- /src/_ninja: -------------------------------------------------------------------------------- 1 | #compdef ninja 2 | # Copyright 2011 Google Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Add the following to your .zshrc to tab-complete ninja targets 17 | # fpath=(path/to/ninja/misc/zsh-completion $fpath) 18 | 19 | (( $+functions[_ninja-get-targets] )) || _ninja-get-targets() { 20 | dir="." 21 | if [ -n "${opt_args[-C]}" ]; 22 | then 23 | eval dir="${opt_args[-C]}" 24 | fi 25 | file="build.ninja" 26 | if [ -n "${opt_args[-f]}" ]; 27 | then 28 | eval file="${opt_args[-f]}" 29 | fi 30 | targets_command="ninja -f \"${file}\" -C \"${dir}\" -t targets all" 31 | eval ${targets_command} 2>/dev/null | cut -d: -f1 32 | } 33 | 34 | (( $+functions[_ninja-get-tools] )) || _ninja-get-tools() { 35 | # remove the first line; remove the leading spaces; replace spaces with colon 36 | ninja -t list 2> /dev/null | sed -e '1d;s/^ *//;s/ \+/:/' 37 | } 38 | 39 | (( $+functions[_ninja-get-modes] )) || _ninja-get-modes() { 40 | # remove the first line; remove the last line; remove the leading spaces; replace spaces with colon 41 | ninja -d list 2> /dev/null | sed -e '1d;$d;s/^ *//;s/ \+/:/' 42 | } 43 | 44 | (( $+functions[_ninja-modes] )) || _ninja-modes() { 45 | local -a modes 46 | modes=(${(fo)"$(_ninja-get-modes)"}) 47 | _describe 'modes' modes 48 | } 49 | 50 | (( $+functions[_ninja-tools] )) || _ninja-tools() { 51 | local -a tools 52 | tools=(${(fo)"$(_ninja-get-tools)"}) 53 | _describe 'tools' tools 54 | } 55 | 56 | (( $+functions[_ninja-targets] )) || _ninja-targets() { 57 | local -a targets 58 | targets=(${(fo)"$(_ninja-get-targets)"}) 59 | _describe 'targets' targets 60 | } 61 | 62 | _arguments \ 63 | '(- *)'{-h,--help}'[Show help]' \ 64 | '(- *)--version[Print ninja version]' \ 65 | '-C+[Change to directory before doing anything else]:directories:_directories' \ 66 | '-f+[Specify input build file (default=build.ninja)]:files:_files' \ 67 | '-j+[Run N jobs in parallel (default=number of CPUs available)]:number of jobs' \ 68 | '-l+[Do not start new jobs if the load average is greater than N]:number of jobs' \ 69 | '-k+[Keep going until N jobs fail (default=1)]:number of jobs' \ 70 | '-n[Dry run (do not run commands but act like they succeeded)]' \ 71 | '(-v --verbose --quiet)'{-v,--verbose}'[Show all command lines while building]' \ 72 | "(-v --verbose --quiet)--quiet[Don't show progress status, just command output]" \ 73 | '-d+[Enable debugging (use -d list to list modes)]:modes:_ninja-modes' \ 74 | '-t+[Run a subtool (use -t list to list subtools)]:tools:_ninja-tools' \ 75 | '*::targets:_ninja-targets' 76 | -------------------------------------------------------------------------------- /src/_composer: -------------------------------------------------------------------------------- 1 | #compdef composer 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for composer (https://getcomposer.org/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Daniel Gomes (me@danielcsgomes.com) 38 | # * Valerii Hiora (https://github.com/vhbit) 39 | # * loranger (https://github.com/loranger) 40 | # 41 | # ------------------------------------------------------------------------------ 42 | 43 | local curcontext=$curcontext state line 44 | declare -A opt_args 45 | 46 | _composer_get_command_list () { 47 | composer --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }' 48 | } 49 | 50 | _composer_get_required_list () { 51 | composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }' 52 | } 53 | 54 | 55 | _composer () { 56 | local curcontext="$curcontext" state line 57 | typeset -A opt_args 58 | 59 | _arguments \ 60 | '1: :->command'\ 61 | '*: :->args' 62 | if [ -f composer.json ]; then 63 | case $state in 64 | command) 65 | compadd `_composer_get_command_list` 66 | ;; 67 | *) 68 | compadd `_composer_get_required_list` 69 | ;; 70 | esac 71 | else 72 | compadd create-project init search selfupdate show 73 | fi 74 | } 75 | 76 | compdef _composer composer -------------------------------------------------------------------------------- /src/_clang-check: -------------------------------------------------------------------------------- 1 | #compdef clang-check 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for clang-check v15.0.2 (https://clang.llvm.org/docs/ClangCheck.html) 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Shohei Yoshida (https://github.com/syohex) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | _arguments \ 38 | '(- *)--help[Display available options]' \ 39 | '(- *)--help-hidden[Display available more options]' \ 40 | '(- *)--version[Display the version of this program]' \ 41 | '--analyze[Run static analysis engine]' \ 42 | '--analyzer-output-path=[Write output to file]: :_files' \ 43 | '--ast-dump[Build ASTs and then debug dump them]' \ 44 | '--ast-dump-filter=[Use with -ast-dump or -ast-print to dump/print only AST declaration nodes having a certain substring]:string' \ 45 | '--ast-list[Build ASTs and print the list of declaration node qualified names]' \ 46 | '--ast-print[Build ASTs and then pretty-print them]' \ 47 | '*--extra-arg=[Additional argument to append to the compiler command line]:arg' \ 48 | '*--extra-arg-before=[Additional argument to prepend to the compiler command line]:arg' \ 49 | '--fix-what-you-can[Apply fix-it advice even in the presence of unfixable errors]' \ 50 | '--fixit[Apply fix-it advice to the input source]' \ 51 | '-p[Build directory where compile_commands.json is]: :_files -/' \ 52 | '--syntax-tree-dump[dump the syntax tree]' \ 53 | '--tokens-dump[dump the preprocessed tokens]' \ 54 | '*: :_files' 55 | 56 | # Local Variables: 57 | # mode: Shell-Script 58 | # sh-indentation: 2 59 | # indent-tabs-mode: nil 60 | # sh-basic-offset: 2 61 | # End: 62 | # vim: ft=zsh sw=2 ts=2 et 63 | -------------------------------------------------------------------------------- /src/_jmeter: -------------------------------------------------------------------------------- 1 | #compdef jmeter 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for JMeter (https://jmeter.apache.org/). 7 | # 8 | # Status: incomplete 9 | # 10 | # ------------------------------------------------------------------------------ 11 | # Authors 12 | # ------- 13 | # 14 | # * Julien Nicoulaud 15 | # 16 | # ------------------------------------------------------------------------------ 17 | 18 | 19 | _arguments \ 20 | '(- 1 *)--?[print command line options and exit]' \ 21 | '(- 1 *)'{-h,--help}'[print usage information and exit]' \ 22 | '(- 1 *)'{-v,--version}'[print the version information and exit]' \ 23 | {-p,--propfile}'[the jmeter property file to use]:properties file:_files -g "*.properties"' \ 24 | '*'{-q,--addprop}'[additional property file(s)]:properties file:_files -g "*.properties"' \ 25 | {-t,--testfile}'[the jmeter test plan file to run]:JMeter test plan file:_files -g "*.jmx"' \ 26 | {-j,--jmeterlogfile}'[the jmeter log file]: :_files -g "*.log"' \ 27 | {-l,--logfile}'[the file to log samples to]: :_files -g "*.jtl"' \ 28 | {-i,--jmeterlogconf}'[jmeter logging configuration file]: :_files -g "*.xml"' \ 29 | {-j,--jmeterlogfile}'[jmeter run file]: :_files -g "*.log"' \ 30 | {-n,--nongui}'[run JMeter in nongui mode]' \ 31 | {-s,--server}'[run the JMeter server]' \ 32 | {-E,--proxyScheme}'[set a proxy scheme to use for the proxy server]:scheme' \ 33 | {-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \ 34 | {-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \ 35 | {-N,--nonProxyHosts}'[set non proxy host list]:host' \ 36 | {-u,--username}'[set username for proxy server that JMeter is to use]:username:_users' \ 37 | {-a,--password}'[set password for proxy server that JMeter is to use]:password' \ 38 | {-J-,--jmeterproperty}'[define additional JMeter properties]:argument=value' \ 39 | {-G-,--globalproperty}'[define Global properties (sent to servers)]:argument=value' \ 40 | {-D-,--systemproperty}'[define additional System properties]:argument=value' \ 41 | {-S,--systemPropertyFile}'[a property file to be added as System properties]:properties file:_files -g "*.properties"' \ 42 | {-f,--forceDeleteResultFile}'[force delete existing results files and web report folder]' \ 43 | {-L,--loglevel}'[define loglevel]:[category=]level' \ 44 | {-r,--runremote}'[start remote servers (as defined by the jmeter property remote_hosts)]' \ 45 | {-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \ 46 | {-d,--homedir}'[the JMeter home directory to use]: :_files -/' \ 47 | {-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]' \ 48 | {-g,--removeonly}'[generate report dashboard only, from a test results file]: :_files' \ 49 | {-e,--reportatendofloadtests}'[generate report dashboard after load test]' \ 50 | {-o,--reportoutputfolder}'[output folder for report dashboard]: :_files -/' 51 | 52 | # Local Variables: 53 | # mode: Shell-Script 54 | # sh-indentation: 2 55 | # indent-tabs-mode: nil 56 | # sh-basic-offset: 2 57 | # End: 58 | # vim: ft=zsh sw=2 ts=2 et 59 | -------------------------------------------------------------------------------- /src/_xcrun: -------------------------------------------------------------------------------- 1 | #compdef xcrun 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Copyright (c) 2015 Keith Smiley (http://keith.so) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | # this software and associated documentation files (the 'Software'), to deal in 8 | # the Software without restriction, including without limitation the rights to 9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | # the Software, and to permit persons to whom the Software is furnished to do so, 11 | # subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | # ----------------------------------------------------------------------------- 23 | 24 | _sdks() { 25 | local -a sdks 26 | sdks=$(xcodebuild -showsdks 2>/dev/null | grep -o "\-sdk.*" | sed -E 's/.* ([a-z]+).*/\1/' | uniq) 27 | echo $sdks 28 | } 29 | 30 | _arguments \ 31 | '(-f --find)'{-f,--find}'[Find and print tool path]' \ 32 | '(-h --help)'{-h,--help}'[Show help]' \ 33 | '(-k --kill-cache)'{-k,--kill-cache}'[Invalidate existing cache]' \ 34 | '(-l --log)'{-l,--log}'[Show commands to be executed]' \ 35 | '(-n --no-cache)'{-n,--no-cache}'[Do not use lookup cache]' \ 36 | '(-r --run)'{-r,--run}'[Execute tool (default)]' \ 37 | '(-v --verbose)'{-v,--verbose}'[Show verbose output]' \ 38 | '*: :->executables' \ 39 | '--sdk[Specify SDK]:SDKs:->sdks' \ 40 | '--show-sdk-path[Show selected SDK path]' \ 41 | '--show-sdk-platform-path[Show selected SDK platform path]' \ 42 | '--show-sdk-platform-version[Show selected SDK platform version]' \ 43 | '--show-sdk-version[Show selected SDK version]' \ 44 | '--toolchain[Specify toolchain]:Toolchains:->toolchains' \ 45 | '--version[Print version]' 46 | 47 | case "$state" in 48 | executables) 49 | executables=($(ls $(dirname $(xcrun -f swift)))) 50 | if [[ $executables != "" ]]; then 51 | _values "Executables" $executables 52 | fi 53 | ;; 54 | sdks) 55 | if ([[ ${+installed_sdks_platforms} -eq 0 ]] || _cache_invalid SDK_PLATFORMS) && ! _retrieve_cache SDK_PLATFORMS; then 56 | installed_sdks_platforms=($(_sdks)) 57 | _store_cache SDK_PLATFORMS installed_sdks_platforms 58 | fi 59 | 60 | if [[ $installed_sdks_platforms != "" ]]; then 61 | _values "SDK to use" $installed_sdks_platforms 62 | fi 63 | ;; 64 | toolchains) 65 | toolchains=($(ls $(xcode-select -p)/Toolchains/*.xctoolchain)) 66 | if [[ $toolchains != "" ]]; then 67 | _values "Toolchains" $toolchains 68 | fi 69 | ;; 70 | esac 71 | 72 | # vim:ft=zsh:et:sts=2:sw=2 73 | -------------------------------------------------------------------------------- /src/_git-wtf: -------------------------------------------------------------------------------- 1 | #compdef git-wtf 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for git-wtf, authored by 32 | # William Morgan (http://git-wt-commit.rubyforge.org/git-wtf) 33 | # 34 | # ------------------------------------------------------------------------------ 35 | # Authors 36 | # ------- 37 | # 38 | # * Mario Fernandez (https://github.com/sirech) 39 | # * Shohei YOSHIDA (https://github.com/syohex) 40 | # 41 | # ------------------------------------------------------------------------------ 42 | 43 | __git_wtf_branches() { 44 | local -a branches 45 | branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"}) 46 | _describe 'branch' branches 47 | } 48 | 49 | _arguments -w -C -s \ 50 | '(--long --short)'{-l,--long}'[include author info and date for each commit]' \ 51 | '(--long --short)'{-s,--short}'[do not show commits]' \ 52 | '(--all)'{-a,--all}'[show all branches across all remote repos, not just those from origin]' \ 53 | '(--all-commits)'{-A,--all-commits}'[show all commits, not just the first 5]' \ 54 | '(--key)'{-k,--key}'[show key]' \ 55 | '(--relations)'{-r,--relations}'[show relation to features / integration branches]' \ 56 | '(--dump-config)--dump-config[print out current configuration and exit]' \ 57 | '*: :__git_wtf_branches' 58 | 59 | # Local Variables: 60 | # mode: Shell-Script 61 | # sh-indentation: 2 62 | # indent-tabs-mode: nil 63 | # sh-basic-offset: 2 64 | # End: 65 | # vim: ft=zsh sw=2 ts=2 et 66 | -------------------------------------------------------------------------------- /src/_googler: -------------------------------------------------------------------------------- 1 | #compdef googler 2 | # 3 | # Completion definition for googler. 4 | # 5 | # Author: 6 | # Zhiming Wang 7 | # 8 | 9 | setopt localoptions noshwordsplit noksharrays 10 | 11 | _googler_query_caching_policy () { 12 | # rebuild if cache is more than a day old 13 | local -a oldp 14 | oldp=( $1(Nm+1) ) 15 | (( $#oldp )) 16 | } 17 | 18 | _googler_complete_query () { 19 | local prefix=$words[CURRENT] 20 | [[ -n $prefix && $prefix != -* ]] || return 21 | 22 | local cache_id=googler_$prefix 23 | zstyle -s :completion:${curcontext}: cache-policy update_policy 24 | [[ -z $update_policy ]] && zstyle :completion:${curcontext}: cache_policy _googler_query_caching_policy 25 | 26 | local -a completions 27 | if _cache_invalid $cache_id || ! _retrieve_cache $cache_id; then 28 | completions=( ${(f)"$(googler --complete $prefix 2>/dev/null)"} ) 29 | _store_cache $cache_id completions 30 | fi 31 | 32 | compadd $@ -- $completions 33 | } 34 | 35 | local -a args 36 | args=( 37 | '(- : *)'{-h,--help}'[show help text and exit]' 38 | '(-s --start)'{-s,--start}'[start at the Nth result]:result number' 39 | '(-n --count)'{-n,--count}'[show specified number of results (default 10)]:count' 40 | '(-N --news)'{-N,--news}'[show results from news section]' 41 | '(-V --videos)'{-V,--videos}'[show results from videos section]' 42 | '(-c --tld)'{-c,--tld}'[country-specific search with top-level domain]:top level domain without dot' 43 | '(-l --lang)'{-l,--lang}'[display in specified language]:language code' 44 | '(-g --geoloc)'{-g,--geoloc}'[specify geolocation]:code' 45 | '(-x --exact)'{-x,--exact}'[disable automatic spelling correction]' 46 | '(--colorize)--colorize[whether to colorize output]:auto/always/never' 47 | '(-C --nocolor)'{-C,--nocolor}'[disable color output]' 48 | '(--colors)--colors[set output colors]:six-letter string' 49 | '(-j --first --lucky)'{-j,--first,--lucky}'[open the first result in a web browser]' 50 | '(-t --time)'{-t,--time}'[time limit search]:period (h/d/w/m/y + number)' 51 | '(--from)--from[starting date/month/year of date range]:date m/d/yyyy' 52 | '(--to)--to[ending date/month/year of date range]:date m/d/yyyy' 53 | '(-w --site)'{-w,--site}'[search a site using Google]:domain' 54 | '(-e --exclude)'{-e,--exclude}'[exclude site from results]:domain' 55 | '(--unfilter)--unfilter[do not omit similar results]' 56 | '(-p --proxy)'{-p,--proxy}'[proxy in HOST:PORT format]:proxy details' 57 | '(--notweak)--notweak[disable TCP optimizations, forced TLS 1.2]' 58 | '(--json)--json[output in JSON format; implies --exact and --noprompt]' 59 | '(--url-handler)--url-handler[cli script or utility]:url opener' 60 | '(--show-browser-logs)--show-browser-logs[do not suppress browser output]' 61 | '(--np --noprompt)'{--np,--noprompt}'[perform search and exit, do not prompt for further interactions]' 62 | '(-u --upgrade)'{-u,--upgrade}'[perform in-place self-upgrade]' 63 | '(--include-git)--include-git[when used with --upgrade, upgrade to git master]' 64 | '(- : *)'{-v,--version}'[show version number and exit]' 65 | '(-d --debug)'{-d,--debug}'[enable debugging]' 66 | '*:::query:_googler_complete_query' 67 | ) 68 | _arguments -S -s $args 69 | -------------------------------------------------------------------------------- /src/_sdd: -------------------------------------------------------------------------------- 1 | #compdef sdd 2 | # ------------------------------------------------------------------------------ 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of the zsh-users nor the 11 | # names of its contributors may be used to endorse or promote products 12 | # derived from this software without specific prior written permission. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 18 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | # Description 26 | # ----------- 27 | # 28 | # Completion script for sdd (http://freshmeat.net/projects/sdd/). 29 | # 30 | # ------------------------------------------------------------------------------ 31 | # Authors 32 | # ------- 33 | # 34 | # * Massimiliano Torromeo 35 | # 36 | # ------------------------------------------------------------------------------ 37 | 38 | _values -w 'option' \ 39 | 'if[specify input file]:input file:_tilde_files' \ 40 | 'of[specify output file]:output file:_tilde_files' \ 41 | '(bs)ibs[input block size]:block size (bytes)' \ 42 | '(bs)obs[output block size]:block size (bytes)' \ 43 | '(ibs obs)bs[block size]:block size (bytes)' \ 44 | 'cbs[conversion buffer size]:buffer size (bytes)' \ 45 | 'skip[input/output initially skipped]:bytes' \ 46 | 'seek[input/output initially skipped]:bytes' \ 47 | 'count[number of input blocks to copy]:blocks' \ 48 | '-notrunc[do not truncate existing output file]' \ 49 | '-pg[print a dot on each write to indicate progress]' \ 50 | '-noerror[do not stop on error]' \ 51 | '-noerrwrite[do not write blocks not read correctly]' \ 52 | "-noseek[don't seek]" \ 53 | 'try[error retry count]:number' \ 54 | '-debug[print debugging messages]' \ 55 | '-fill[fill each record with zeros up to obs]' \ 56 | '-swab' '-block' '-unblock' '-lcase' '-ucase' '-ascii' '-ebcdic' '-ibm' \ 57 | '-help[show help]' \ 58 | '-version[show version]' 59 | 60 | # Local Variables: 61 | # mode: Shell-Script 62 | # sh-indentation: 2 63 | # indent-tabs-mode: nil 64 | # sh-basic-offset: 2 65 | # End: 66 | # vim: ft=zsh sw=2 ts=2 et 67 | -------------------------------------------------------------------------------- /src/_neo: -------------------------------------------------------------------------------- 1 | #compdef neo 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for neo (https://github.com/st3w/neo). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Hydrargyrum (https://github.com/hydrargyrum) 13 | # 14 | # ------------------------------------------------------------------------------ 15 | 16 | _arguments \ 17 | '(-a --async)'{-a,--async}'[make each column of characters scroll at an independent speed]' \ 18 | '(-b --bold)'{-b+,--bold=}'[control if and how neo displays bold characters]:choice [1]:((0\:off 1\:random\ \(default\) 2\:all))' \ 19 | '(-C --colorfile -c --color)'{-C+,--colorfile=}'[read the colors from a file]: :_files' \ 20 | '(-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)' \ 21 | '(-D --defaultbg)'{-D,--defaultbg}'[use the default terminal background color]' \ 22 | '(-d --density)'{-d+,--density=}'[control how many droplets will appear onscreen]: :_numbers -f -d 1.0' \ 23 | '(-F --fullwidth)'{-F,--fullwidth}'[use two columns per character]' \ 24 | '(-f --fps)'{-f+,--fps=}'[set a frame rate target]: :_numbers -d 60' \ 25 | '(-G --glitchpct)'{-G+,--glitchpct=}'[set the percentage of characters onscreen that glitch]: :_numbers -f -d 10.0' \ 26 | '(-g --glitchms)'{-g+,--glitchms=}'[control how often the characters on screen glitch]:N [300,400]]' \ 27 | '(-h --help)'{-h,--help}'[shows the help message]' \ 28 | '(-l --lingerms)'{-l+,--lingerms=}'[control how long characters stay onscreen after they finish scrolling]:N [1,3000]' \ 29 | '(-M --shadingmode)'{-M+,--shadingmode=}'[control how neo assigns color values to characters on the screen]:choice [1]:((0\:random\ \(default\) 1\:gradient))' \ 30 | '(-m --message)'{-m+,--message=}'[display a message in the center of the screen]:message' \ 31 | '(-p --profile)'{-p,--profile}'[turn on the profiling mode]' \ 32 | '(-r --rippct)'{-r+,--rippct=}'[set the percentage of droplets that stop scrolling before reaching the bottom of the screen]: :_numbers -f -d 33.0' \ 33 | '(-S --speed)'{-S+,--speed=}'[control how fast characters scroll down the screen]: :_numbers -f -d 8.0' \ 34 | '(-s --screensaver)'{-s,--screensaver}'[exit on the first key press]' \ 35 | '(-V --version)'{-V,--version}'[display the version, build date, copyright, and license]' \ 36 | --noglitch'[disable character glitching]' \ 37 | --chars='[display Unicode characters between NUM1 and NUM2 inclusive]:CHAR,CHAR' \ 38 | --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)' \ 39 | --colormode='[set the color mode]:flag:((0\:mono 16\:16\ colors 32\:32-bit\ color 256\:256\ colors))' \ 40 | --maxdpc='[set the maximum number of droplets per column]: :_numbers -d 3' \ 41 | --shortpct='[set the percentage of shortened droplets]: :_numbers -f -d 50.0' 42 | 43 | # Local Variables: 44 | # mode: Shell-Script 45 | # sh-indentation: 2 46 | # indent-tabs-mode: nil 47 | # sh-basic-offset: 2 48 | # End: 49 | # vim: ft=zsh sw=2 ts=2 et 50 | -------------------------------------------------------------------------------- /src/_subliminal: -------------------------------------------------------------------------------- 1 | #compdef subliminal 2 | # ------------------------------------------------------------------------------ 3 | # Description 4 | # ----------- 5 | # 6 | # Completion script for Subliminal (https://github.com/Diaoul/subliminal). 7 | # 8 | # ------------------------------------------------------------------------------ 9 | # Authors 10 | # ------- 11 | # 12 | # * Julien Nicoulaud 13 | # * Shohei Yoshida 14 | # 15 | # ------------------------------------------------------------------------------ 16 | 17 | _subliminal() { 18 | typeset -A opt_args 19 | local context state line 20 | local curcontext="$curcontext" 21 | local ret=1 22 | 23 | _arguments -C \ 24 | '--addic7ed[Addic7ed configuration]:user name:' \ 25 | '--legendastv[LegendasTV configuration]:user name:' \ 26 | '--opensubtitles[OpenSubtitles configuration]:user name:' \ 27 | '--omdb[OMDB API key]:key' \ 28 | '--cache-dir[Path to the cache directory]: :_files -/' \ 29 | '--debug[Print useful information for debugging]' \ 30 | '(- : *)--version[show version number and exit]' \ 31 | '(- : *)--help[show help message and exit]' \ 32 | '1: :(cache download)' \ 33 | '*::arg:->command' \ 34 | && ret=0 35 | 36 | case "$state" in 37 | (command) 38 | case $words[1] in 39 | (cache) 40 | _arguments -C \ 41 | '(- *)--help[Show help message and exit]' \ 42 | "--clear-subliminal[Clear subliminal's cache]" \ 43 | '*: :_files' \ 44 | && ret=0 45 | ;; 46 | (download) 47 | _arguments -C \ 48 | '(-l --language)'{-l,--language}'[Language as IETF code]:lang' \ 49 | \*{-p,--provider}'[Provider to use]: :(argenteam legendastv opensubtitles opensubtitlesvip podnapisi shooter thesubdb tvsubtit)' \ 50 | \*{-r,--refiner}'[Refiner to use]: :(hash metadata omdb tvdb)' \ 51 | '(-a --age)'{-a,--age}'[Filter videos newer than AGE]:age' \ 52 | '(-d --directory)'{-d,--directory}'[Directory where to save subtitles]: :_files -/' \ 53 | '(-e --encoding)'{-e,--encoding}'[Subtitle file encoding]:encoding' \ 54 | '(-s --single)'{-s,--single}'[Save subtitle without language code in the file name]' \ 55 | '(-f --force)'{-f,--force}'[Force download even if a subtitle already exist]' \ 56 | '(-hi,--hearing-impaired)'{-hi,--hearing-impaired}'[Prefer hearing impaired subtitles]' \ 57 | '(-m --min-score)'{-m,--min-score}'[Minimum score for a subtitle to be downloaded]:integer range:' \ 58 | '(-w --max-worked)'{-w,--max-workers}'[Maximum number of threads to use]:integer range:' \ 59 | '(-z --archives -Z --no-archives)'{-z,--archives}'[Scan archives for videos]' \ 60 | '(-z --archives -Z --no-archives)'{-Z,--no-archives}'[Scan archives for videos]' \ 61 | '--verbose[Increase verbosity]' \ 62 | '(- *)--help[Show help message and exit]' \ 63 | '*: :_files' \ 64 | && ret=0 65 | ;; 66 | esac 67 | ;; 68 | esac 69 | 70 | return ret 71 | } 72 | 73 | _subliminal "$@" 74 | 75 | # Local Variables: 76 | # mode: Shell-Script 77 | # sh-indentation: 2 78 | # indent-tabs-mode: nil 79 | # sh-basic-offset: 2 80 | # End: 81 | # vim: ft=zsh sw=2 ts=2 et 82 | -------------------------------------------------------------------------------- /src/_youtube-dl: -------------------------------------------------------------------------------- 1 | #compdef youtube-dl 2 | 3 | __youtube_dl() { 4 | local curcontext="$curcontext" fileopts diropts cur prev 5 | typeset -A opt_args 6 | fileopts="--download-archive|-a|--batch-file|--load-info-json|--load-info|--cookies" 7 | diropts="--cache-dir" 8 | cur=$words[CURRENT] 9 | case $cur in 10 | :) 11 | _arguments '*: :(::ytfavorites ::ytrecommended ::ytsubscriptions ::ytwatchlater ::ythistory)' 12 | ;; 13 | *) 14 | prev=$words[CURRENT-1] 15 | if [[ ${prev} =~ ${fileopts} ]]; then 16 | _path_files 17 | elif [[ ${prev} =~ ${diropts} ]]; then 18 | _path_files -/ 19 | elif [[ ${prev} == "--recode-video" ]]; then 20 | _arguments '*: :(mp4 flv ogg webm mkv)' 21 | else 22 | _arguments '*: :(--help --version --update --ignore-errors --abort-on-error --dump-user-agent --list-extractors --extractor-descriptions --force-generic-extractor --default-search --ignore-config --config-location --flat-playlist --mark-watched --no-mark-watched --no-color --proxy --socket-timeout --source-address --force-ipv4 --force-ipv6 --geo-verification-proxy --cn-verification-proxy --geo-bypass --no-geo-bypass --geo-bypass-country --geo-bypass-ip-block --playlist-start --playlist-end --playlist-items --match-title --reject-title --max-downloads --min-filesize --max-filesize --date --datebefore --dateafter --min-views --max-views --match-filter --no-playlist --yes-playlist --age-limit --download-archive --include-ads --limit-rate --retries --fragment-retries --skip-unavailable-fragments --abort-on-unavailable-fragment --keep-fragments --buffer-size --no-resize-buffer --http-chunk-size --test --playlist-reverse --playlist-random --xattr-set-filesize --hls-prefer-native --hls-prefer-ffmpeg --hls-use-mpegts --external-downloader --external-downloader-args --batch-file --id --output --autonumber-size --autonumber-start --restrict-filenames --auto-number --title --literal --no-overwrites --continue --no-continue --no-part --no-mtime --write-description --write-info-json --write-annotations --load-info-json --cookies --cache-dir --no-cache-dir --rm-cache-dir --write-thumbnail --write-all-thumbnails --list-thumbnails --quiet --no-warnings --simulate --skip-download --get-url --get-title --get-id --get-thumbnail --get-description --get-duration --get-filename --get-format --dump-json --dump-single-json --print-json --newline --no-progress --console-title --verbose --dump-pages --write-pages --youtube-print-sig-code --print-traffic --call-home --no-call-home --encoding --no-check-certificate --prefer-insecure --user-agent --referer --add-header --bidi-workaround --sleep-interval --max-sleep-interval --format --all-formats --prefer-free-formats --list-formats --youtube-include-dash-manifest --youtube-skip-dash-manifest --merge-output-format --write-sub --write-auto-sub --all-subs --list-subs --sub-format --sub-lang --username --password --twofactor --netrc --video-password --ap-mso --ap-username --ap-password --ap-list-mso --extract-audio --audio-format --audio-quality --recode-video --postprocessor-args --keep-video --no-post-overwrites --embed-subs --embed-thumbnail --add-metadata --metadata-from-title --xattrs --fixup --prefer-avconv --prefer-ffmpeg --ffmpeg-location --exec --convert-subs)' 23 | fi 24 | ;; 25 | esac 26 | } 27 | 28 | __youtube_dl -------------------------------------------------------------------------------- /src/_rslsync: -------------------------------------------------------------------------------- 1 | #compdef rslsync 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for resilio sync 2.7.3 (https://www.resilio.com/individuals/). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Fabian Klötzl (https://github.com/kloetzl) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | _rslsync(){ 42 | integer ret=1 43 | local -a args 44 | args+=( 45 | '(- *)--help[Print help]' 46 | '--config[Use a configuration file]:file:_files' 47 | '--storage[Storage path for identity and license]:path:_files -/' 48 | '--identity[Creates user identity]:name:' 49 | '--license[Apply owner license]:file:_files' 50 | '--decrypt[Decrypt encrypted folder]:' 51 | '--upgradedb[Upgrade databases in specified storage or upgrade a single db]:db:_files' 52 | '--nodaemon[Do not daemonize]' 53 | '--dump-sample-config[Print a sample configuration file]' 54 | '--log[Set log file]:file:_files' 55 | '(--help)--webui.listen[Set the webui listening interface]:ip\:port:' 56 | '--generate-secret[Generate a read/write key]::version:(2)' 57 | '--get-ro-secret[Get the read-only key associated to a read/write key]:key:' 58 | '--server[Set Management Console address]:ip\:port:' 59 | ) 60 | _arguments $args[@] && ret=0 61 | return ret 62 | } 63 | 64 | _rslsync 65 | 66 | # Local Variables: 67 | # mode: Shell-Script 68 | # sh-indentation: 2 69 | # indent-tabs-mode: nil 70 | # sh-basic-offset: 2 71 | # End: 72 | # vim: ft=zsh sw=2 ts=2 et 73 | -------------------------------------------------------------------------------- /src/_llvm-dsymutil: -------------------------------------------------------------------------------- 1 | #compdef llvm-dsymutil 2 | 3 | # ----------------------------------------------------------------------------- 4 | # The BSD-3-Clause License 5 | # 6 | # Copyright (c) 2016, Koichi Shiraishi 7 | # All rights reserved. 8 | # 9 | # Redistribution and use in source and binary forms, with or without 10 | # modification, are permitted provided that the following conditions are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright notice, this 13 | # list of conditions and the following disclaimer. 14 | # 15 | # * Redistributions in binary form must reproduce the above copyright notice, 16 | # this list of conditions and the following disclaimer in the documentation 17 | # and/or other materials provided with the distribution. 18 | # 19 | # * Neither the name of que nor the names of its 20 | # contributors may be used to endorse or promote products derived from 21 | # this software without specific prior written permission. 22 | # 23 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 | # POSSIBILITY OF SUCH DAMAGE. 34 | # ----------------------------------------------------------------------------- 35 | # 36 | # OVERVIEW: manipulate archived DWARF debug symbol files. 37 | # 38 | # dsymutil links the DWARF debug information found in the object files 39 | # for the executable by using debug symbols information 40 | # contained in its symbol table. 41 | # 42 | # USAGE: llvm-dsymutil [options] 43 | # 44 | # ----------------------------------------------------------------------------- 45 | 46 | function _llvm-dsymutil() { 47 | local context curcontext=$curcontext state line ret=1 48 | declare -A opt_args 49 | 50 | _arguments -C \ 51 | '-arch=[Link DWARF debug information only for specified CPU architecture types]' \ 52 | '-dump-debug-map[Parse and dump the debug map to standard output. Not DWARF link will take place]' \ 53 | '-flat[Produce a flat dSYM file (not a bundle)]' \ 54 | '-no-odr[Do not use ODR (One Definition Rule) for type uniquing]' \ 55 | '-no-output[Do the link in memory, but do not emit the result file]' \ 56 | '-o=[Specify the output file. default: .dwarf]:filename:_files' \ 57 | '-oso-prepend-path=[Specify a directory to prepend to the paths of object files]:path:_files' \ 58 | '-symtab[Dumps the symbol table found in executable or object file(s) and exits]' \ 59 | '-verbose[Verbosity level]' \ 60 | '-version[Display the version of this program]' \ 61 | '-y[Treat the input file is a YAML debug map rather than a binary]' \ 62 | '*:file:_files' \ 63 | && ret=0 64 | 65 | return ret 66 | } 67 | 68 | _llvm-dsymutil "$*" 69 | 70 | # vim:ft=zsh:et:sts=2:sw=2 71 | -------------------------------------------------------------------------------- /src/_rsvm: -------------------------------------------------------------------------------- 1 | #compdef rsvm 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for rsvm (https://github.com/sdepold/rsvm). 32 | # Adapted from Docker Machine completion by hhatto (https://github.com/ilkka) 33 | # 34 | # ------------------------------------------------------------------------------ 35 | # Authors 36 | # ------- 37 | # 38 | # * michaelmior (https://github.com/michaelmior) 39 | # 40 | # ------------------------------------------------------------------------------ 41 | 42 | # helper function for completing available rusts 43 | __rusts() { 44 | declare -a rusts_cmd 45 | rusts_cmd=($(ls "$HOME/.rsvm/versions")) 46 | _describe 'rusts' rusts_cmd 47 | } 48 | 49 | # subcommands 50 | local -a _rsvm_cmds 51 | 52 | _rsvm_cmds=( 53 | 'help:Show a help message' \ 54 | 'install:Download and install a version' \ 55 | 'uninstall:Uninstall a version' \ 56 | 'use:Activate a version for now and the future' \ 57 | 'ls:List all installed versions of rust' \ 58 | 'ls-remote:List remote versions available for install' \ 59 | 'ls-channel:Print a channel version available for install' \ 60 | ) 61 | 62 | # subcommand completion functions 63 | __uninstall() { 64 | __rusts 65 | } 66 | 67 | __use() { 68 | __rusts 69 | } 70 | 71 | # common args 72 | _arguments \ 73 | '--help[show help]' \ 74 | '--version[print the version]' \ 75 | '*:: :->command' 76 | 77 | # start rusts! 78 | if (( CURRENT == 1 )); then 79 | _describe -t commands 'rsvm command' _rsvm_cmds 80 | fi 81 | 82 | local -a _command_args 83 | case "$words[1]" in 84 | uninstall) 85 | __uninstall ;; 86 | use) 87 | __use ;; 88 | esac 89 | -------------------------------------------------------------------------------- /src/_archlinux-java: -------------------------------------------------------------------------------- 1 | #compdef archlinux-java 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the zsh-users nor the 14 | # names of its contributors may be used to endorse or promote products 15 | # derived from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY 21 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # ------------------------------------------------------------------------------ 28 | # Description 29 | # ----------- 30 | # 31 | # Completion script for archlinux-java a tool for selecting default Java runtime (https://wiki.archlinux.org/index.php/java). 32 | # 33 | # ------------------------------------------------------------------------------ 34 | # Authors 35 | # ------- 36 | # 37 | # * Jindřich Pilař (https://github.com/JindrichPilar) 38 | # 39 | # ------------------------------------------------------------------------------ 40 | 41 | 42 | _archlinux-java_command_arguments() { 43 | case $words[1] in 44 | (set) 45 | local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}") 46 | _describe -t output 'Downloads to delete' java_versions 47 | ;; 48 | esac 49 | } 50 | 51 | _archlinux-java() { 52 | local -a commands 53 | 54 | commands=( 55 | "status:List installed Java environments and enabled one" 56 | "get:Return the short name of the Java environment set as default" 57 | "set:Force as default" 58 | "unset:Unset current default Java environment" 59 | "fix:Fix an invalid/broken default Java environment configuration" 60 | "help:Show help" 61 | ) 62 | 63 | _arguments -C \ 64 | '1:cmd:->cmds' \ 65 | '*:: :->args' \ 66 | 67 | case "$state" in 68 | (cmds) 69 | _describe -t commands 'commands' commands 70 | ;; 71 | (*) 72 | _archlinux-java_command_arguments 73 | ;; 74 | esac 75 | } 76 | 77 | _archlinux-java 78 | 79 | # Local Variables: 80 | # mode: Shell-Script 81 | # sh-indentation: 2 82 | # indent-tabs-mode: nil 83 | # sh-basic-offset: 2 84 | # End: 85 | # vim: ft=zsh sw=2 ts=2 et 86 | -------------------------------------------------------------------------------- /src/_patool: -------------------------------------------------------------------------------- 1 | #compdef patool 2 | # ------------------------------------------------------------------------------ 3 | # Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining 6 | # a copy of this software and associated documentation files (the 7 | # "Software"), to deal in the Software without restriction, including 8 | # without limitation the rights to use, copy, modify, merge, publish, 9 | # distribute, sublicense, and/or sell copies of the Software, and to 10 | # permit persons to whom the Software is furnished to do so, subject to 11 | # the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included 14 | # in all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | # OTHER DEALINGS IN THE SOFTWARE. 23 | # ------------------------------------------------------------------------------ 24 | # Description 25 | # ----------- 26 | # 27 | # Completion script for patool (https://github.com/wummel/patool). 28 | # 29 | # ------------------------------------------------------------------------------ 30 | # Authors 31 | # ------- 32 | # 33 | # * Sergei Eremenko (https://github.com/SmartFinn) 34 | # 35 | # ------------------------------------------------------------------------------ 36 | 37 | local state line ret=1 38 | 39 | _arguments -C \ 40 | '(-h --help)'{-h,--help}'[show help message and exit]' \ 41 | '(--non-interactive)'--non-interactive'[do not query for user input]' \ 42 | '(-v --verbose)'{-v,--verbose}'[verbose operation]' \ 43 | '1:cmd:->cmds' \ 44 | '*:arg:->args' && ret=0 45 | 46 | case $state in 47 | (cmds) 48 | local -a cmds 49 | 50 | cmds=( 51 | 'create:create an archive from given files' 52 | 'diff:show differences between two archives' 53 | 'extract:extract files from given archives' 54 | 'formats:show all supported archive formats' 55 | 'list:list files in archives' 56 | 'repack:repackage archive to a different format' 57 | 'recompress:recompress an archive to smaller size' 58 | 'search:search in archive contents for given pattern' 59 | 'test:test the given archives' 60 | ) 61 | 62 | _describe -t commands 'patool commands' cmds && ret=0 63 | ;; 64 | (args) 65 | case $line[1] in 66 | (extract) 67 | _arguments \ 68 | '--outdir[extract to the given output directory]:select directory:_files -/' \ 69 | '*:files:_files' && ret=0 70 | ;; 71 | (formats) 72 | _message 'no more arguments' && ret=0 73 | ;; 74 | (search) 75 | _arguments \ 76 | '2:search pattern:' \ 77 | '*:files:_files' && ret=0 78 | ;; 79 | (*) 80 | _arguments \ 81 | '*:files:_files' && ret=0 82 | ;; 83 | esac 84 | ;; 85 | esac 86 | 87 | return $ret 88 | 89 | # Local Variables: 90 | # mode: Shell-Script 91 | # sh-indentation: 2 92 | # indent-tabs-mode: nil 93 | # sh-basic-offset: 2 94 | # End: 95 | # vim: ft=zsh sw=2 ts=2 et 96 | --------------------------------------------------------------------------------