Unverified Commit cad48e38 authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

Merge branch 'master' into fabric_task_description

parents 225425fe 40df67bc
# Ruby plugin
This plugin adds aliases for common commands used in dealing with [Ruby](https://www.ruby-lang.org/en/) and [gem packages](https://rubygems.org/).
To use it, add `ruby` to the plugins array in your zshrc file:
```zsh
plugins=(... ruby)
```
## Aliases
| Alias | Command | Description |
|-------|----------------------------------------|------------------------------------------------------|
| rb | `ruby` | The Ruby command |
| sgem | `sudo gem` | Run sudo gem on the system ruby, not the active ruby |
| rfind | `find . -name "*.rb" \| xargs grep -n` | Find ruby file |
| gin | `gem install` | Install a gem into the local repository |
| gun | `gem uninstall` | Uninstall gems from the local repository |
| gli | `gem list` | Display gems installed locally |
......@@ -4,3 +4,11 @@ alias sgem='sudo gem'
# Find ruby file
alias rfind='find . -name "*.rb" | xargs grep -n'
# Shorthand Ruby
alias rb="ruby"
# Gem Command Shorthands
alias gin="gem install"
alias gun="gem uninstall"
alias gli="gem list"
# rust
This plugin adds completion for [`rustc`](https://doc.rust-lang.org/rustc/index.html), the compiler for the Rust programming language.
To use it, add `rust` to the plugins array in your zshrc file:
```zsh
plugins=(... rust)
```
......@@ -15,59 +15,93 @@ _rustc_crate_types=(
'lib'
'rlib'
'dylib'
'cdylib'
'staticlib'
'proc-macro'
)
_rustc_emit_types=(
'asm'
'bc'
'ir'
'llvm-bc'
'llvm-ir'
'obj'
'metadata'
'link'
'dep-info'
'mir'
)
_rustc_print_types=(
'crate-name'
'file-names'
'sysroot'
'cfg'
'target-list'
'target-cpus'
'target-features'
'relocation-models'
'code-models'
'target-spec-json'
'native-static-libs'
)
_rustc_pretty_types=(
'normal[un-annotated source]'
'expanded[crates expanded]'
'typed[crates expanded, with type annotations]'
'identified[fully parenthesized, AST nodes and blocks with IDs]'
'expanded,identified[fully parenthesized, AST nodes with IDs]'
)
_rustc_unpretty_types=(
'normal[un-annotated source]'
'expanded[crates expanded]'
'expanded,identified[fully parenthesized, AST nodes with IDs]'
'flowgraph=[graphviz formatted flowgraph for node]:NODEID:'
'everybody_loops[all function bodies replaced with `loop {}`]'
'hir[the HIR]'
'hir,identified'
'hir,typed[HIR with types for each node]'
)
_rustc_color_types=(
'auto[colorize, if output goes to a tty (default)]'
'always[always colorize output]'
'never[never colorize output]'
)
_rustc_error_format=(
'human'
'json'
)
_rustc_opts_vals=(
--cfg='[Configure the compilation environment]:SPEC:'
-L'[Add a directory to the library search path]:DIR:_files -/'
--crate-name='[Specify the name of the crate being built]'
--crate-type='[Comma separated list of types of crates for the compiler to emit]:TYPES:_values -s "," "Crate types" "$_rustc_crate_types[@]"'
--emit='[Comma separated list of types of output for the compiler to emit]:TYPES:_values -s "," "Emit Targets" "$_rustc_emit_types[@]"'
--print='[Comma separated list of compiler information to print on stdout]:TYPES:_values -s "," "Printable info" "$_rustc_print_types[@]"'
-o'[Write output to <filename>. Ignored if more than one --emit is specified.]:FILENAME:_files'
--out-dir='[Write output to compiler-chosen filename in <dir>. Ignored if -o is specified. (default the current directory)]:DIR:_files -/'
--explain='[Provide a detailed explanation of an error message]:OPT:'
--target='[Target triple cpu-manufacturer-kernel\[-os\] to compile]:TRIPLE:'
--extern'[Specify where an external rust library is located]:ARG:'
--sysroot='[Override the system root]:PATH:_files -/'
--error-format='[How errors and other messages are produced]:TYPES:_values "$_rustc_error_format"'
--debuginfo='[Emit DWARF debug info to the objects created]:LEVEL:_values "Debug Levels" "$_rustc_debuginfo_levels[@]"'
--dep-info='[Output dependency info to <filename> after compiling]::FILE:_files -/'
--sysroot='[Override the system root]:PATH:_files -/'
--cfg='[Configure the compilation environment]:SPEC:'
--out-dir='[Write output to compiler-chosen filename in <dir>. Ignored if -o is specified. (default the current directory)]:DIR:_files -/'
-o'[Write output to <filename>. Ignored if more than one --emit is specified.]:FILENAME:_files'
--opt-level='[Optimize with possible levels 0-3]:LEVEL:(0 1 2 3)'
--pretty='[Pretty-print the input instead of compiling]::TYPE:_values "TYPES" "$_rustc_pretty_types[@]"'
-L'[Add a directory to the library search path]:DIR:_files -/'
--target='[Target triple cpu-manufacturer-kernel\[-os\] to compile]:TRIPLE:'
--unpretty='[Present the input source, unstable (and less-pretty)]::TYPE:_values "TYPES" "$_rustc_unpretty_types[@]"'
--color='[Configure coloring of output]:CONF:_values "COLORS" "$_rustc_color_types[@]"'
{-v,--version}'[Print version info and exit]::VERBOSE:(verbose)'
--explain='[Provide a detailed explanation of an error message]:OPT:'
--extern'[Specify where an external rust library is located]:ARG:'
)
_rustc_opts_switches=(
-g'[Equivalent to --debuginfo=2]'
-O'[Equivalent to --opt-level=2]'
--test'[Build a test harness]'
{-v,--verbose}'[Use verbose output]'
{-V,--version}'[Print version info and exit]'
{-h,--help}'[Display this message]'
--no-analysis'[Parse and expand the output, but run no analysis or produce output]'
--no-trans'[Run all passes except translation; no output]'
-O'[Equivalent to --opt-level=2]'
--parse-only'[Parse only; do not compile, assemble, or link]'
--print-crate-name'[Output the crate name and exit]'
--print-file-name'[Output the file(s) that would be written if compilation continued and exit]'
--test'[Build a test harness]'
)
_rustc_opts_codegen=(
'ar=[Path to the archive utility to use when assembling archives.]:BIN:_path_files'
......@@ -139,6 +173,9 @@ _rustc_opts_lint=(
_rustc_opts_debug=(
'verbose[in general, enable more debug printouts]'
'span-free-formats[when debug-printing compiler state, do not include spans]'
"identify-regions[make unnamed regions display as '# (where # is some non-ident unique id)]"
'emit-end-regions[emit EndRegion as part of MIR; enable transforms that solely process EndRegion]'
'time-passes[measure time of each rustc pass]'
'count-llvm-insns[count where LLVM instrs originate]'
'time-llvm-passes[measure time of each LLVM pass]'
......
# Ruby Version Manager plugin
This plugin adds some utility functions and completions for [Ruby Version Manager](https://rvm.io/).
To use it, add `rvm` to the plugins array in your zshrc file:
```zsh
plugins=(... rvm)
```
## Functions
| Alias | Command |
|----------------|----------------------|
| `rb18` | `rvm use ruby-1.8.7` |
| `rb19` | `rvm use ruby-1.9.3` |
| `rb20` | `rvm use ruby-2.0.0` |
| `rb21` | `rvm use ruby-2.1.2` |
| `rvm-update` | `rvm get head` |
| `gems` | `gem list` |
# safe-paste
Preventing any code from actually running while pasting, so you have a chance to review what was actually pasted before running it.
To use it, add `safe-paste` to the plugins array in your zshrc file:
```zsh
plugins=(... safe-paste)
```
# Code from Mikael Magnusson: http://www.zsh.org/mla/users/2011/msg00367.html
# Code from Mikael Magnusson: https://www.zsh.org/mla/users/2011/msg00367.html
#
# Requires xterm, urxvt, iTerm2 or any other terminal that supports bracketed
# paste mode as documented: http://www.xfree86.org/current/ctlseqs.html
# paste mode as documented: https://www.xfree86.org/current/ctlseqs.html
# create a new keymap to use while pasting
bindkey -N paste
......
## Salt autocomplete plugin
A copy of the completion script from the
[salt](https://github.com/saltstack/salt/blob/develop/pkg/zsh_completion.zsh)
git repo.
#compdef salt salt-call salt-cp salt-run salt-key
# The use-cache style is checked in a few places to allow caching minions, modules,
# or the directory salt is installed in.
# you can cache those three with:
# zstyle ':completion:*:salt(|-cp|-call|-run|-key):*' use-cache true
# and/or selectively:
# zstyle ':completion::complete:salt-key:set-option-a-1:' use-cache false
# zstyle ':completion::complete:salt(|-cp|-call):minions:' use-cache true
# zstyle ':completion::complete:salt(|-call):modules:' use-cache true
# zstyle ':completion::complete:salt(|-cp|-call|-run|-key):salt_dir:' use-cache true
#
# cache validation can be controled with the style cache-ttl.
# it expects two arguments: number (days|hours|weeks|months)
# to invalidate the minion cache after four days:
# zstyle ':completion::complete:salt(|-cp|-call):minions:' cache-ttl 4 days
local state line curcontext="$curcontext" salt_dir
_modules(){
local _funcs expl curcontext=${curcontext%:*}:modules
if ! zstyle -m ":completion:$curcontext:" cache-policy '*'; then
zstyle ":completion:$curcontext:" cache-policy _salt_caching_policy
fi
if _cache_invalid salt/modules || ! _retrieve_cache salt/modules; then
_funcs=( ${${(Q)${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_functions)"}%%[],]##}#\[}:#local:} )
_store_cache salt/modules _funcs
fi
_wanted modules expl modules _multi_parts "$@" . _funcs
}
_runners(){
local _runs expl curcontext=${curcontext%:*}:runners
if ! zstyle -m ":completion:$curcontext:" cache-policy '*'; then
zstyle ":completion:$curcontext:" cache-policy _salt_caching_policy
fi
if _cache_invalid salt/runners || ! _retrieve_cache salt/runners; then
_runs=( ${${(Q)${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_runner_functions)"}%%[],]##}#\[}:#local:} )
_store_cache salt/runners _runs
fi
_wanted modules expl runners _multi_parts "$@" . _runs
}
_minions(){
local type requested_type include_all key expl; typeset -A _peons
# when completing the minion argument for salt and salt-cp, set the argument section
# of the context to `minion' not `argument-1'
if [[ $service = salt(|-cp) ]]; then
curcontext=${curcontext%:*}:minions
fi
# only pass the argument accepted, unaccepted, rejected, denied or all to -t/-T
# the argument is used as part of an tag, accepted-minions, rejected-minions, etc.
# while un, acc, den, etc will work, you will possibly ignore user customized tags.
zparseopts -D -E 't+:=requested_type' 'T+:=include_all'
if ! zstyle -m ":completion:$curcontext:" cache-policy '*'; then
zstyle ":completion:$curcontext:" cache-policy _salt_caching_policy
fi
if _cache_invalid salt/minions || ! _retrieve_cache salt/minions; then
# it would be awesome if salt-key could prefix or suffix a word to denote
# the key's state. It would remove the need for this loop, calling salt-key N times.
for type in accepted unaccepted rejected denied; do
salt-key -l $type 2>/dev/null | while read -r key; do
[[ $key == *' Keys:' ]] && continue
_peons+=( "$key" $type )
done
done
_store_cache salt/minions _peons
fi
# if salt-key's --include-all option isn't on the line, ignore the -T options
(( words[(I)--include-all] )) || unset include_all
if (( requested_type[(I)all] )); then
requested_type=( -t accepted -t unaccepted -t rejected -t denied )
unset include_all
fi
for type in ${${requested_type:#-t}:-accepted} ${include_all:#-T}; do
_wanted $type-minions expl minion compadd "$@" -M 'r:|.=* r:|=*' ${(k)_peons[(R)$~type]}
done
}
(( $+functions[_salt_caching_policy] )) ||
_salt_caching_policy() {
local oldp ttl d t
zstyle -a ":completion:$curcontext:" cache-ttl ttl
if (( $#ttl >= 2 )); then
[[ $ttl[1] == <-> ]] && integer t=$ttl[1]
case $ttl[2] in
seconds#)d=s;;
months#) d=M;;
weeks#) d=w;;
hours#) d=h;;
*) d=d;;
esac
fi
oldp=( "$1"(Nm${d:-d}+${t:-1}) )
(( $#oldp ))
}
local -a _{target,master,logging,minion}_options _{common,out}_opts _target_opt_pat
_target_opt_pat=(
'(-[ELGNRCIS]|--(pcre|list|grain(|-pcre)|nodegroup|range|compound|pillar|ipcidr))'
'(-E --pcre -L --list -G --grain --grain-pcre -N --nodegroup -R --range -C --compound -I --pillar -S --ipcidr)'
)
_target_options=(
"$_target_opt_pat[2]"{-E,--pcre}'[use pcre regular expressions]:pcre:'
"$_target_opt_pat[2]"{-L,--list}'[take a comma or whitespace delimited list of servers.]:list:'
"$_target_opt_pat[2]"{-G,--grain}'[use a grain value to identify targets]:Grains:'
"$_target_opt_pat[2]--grain-pcre[use a grain value to identify targets.]:pcre:"
"$_target_opt_pat[2]"{-N,--nodegroup}'[use one of the predefined nodegroups to identify a list of targets.]:Nodegroup:'
"$_target_opt_pat[2]"{-R,--range}'[use a range expression to identify targets.]:Range:'
"$_target_opt_pat[2]"{-C,--compound}'[Use multiple targeting options.]:Compound:'
"$_target_opt_pat[2]"{-I,--pillar}'[use a pillar value to identify targets.]:Pillar:'
"$_target_opt_pat[2]"{-S,--ipcidr}'[Match based on Subnet (CIDR notation) or IPv4 address.]:Cidr:'
)
_common_opts=(
"--version[show program's version number and exit]"
"--versions-report[show program's dependencies version number and exit]"
'(-h --help)'{-h,--help}'[show this help message and exit]'
'(-c --config-dir)'{-c,--config-dir}'[Pass in an alternative configuration directory.(default: /etc/salt/)]:Config Directory:_files -/'
'(-t --timeout)'{-t,--timeout}'[Change the timeout for the running command; default=5]:Timeout (seconds):'
)
_master_options=(
'(-s --static)'{-s,--static}'[Return the data from minions as a group after they all return.]'
"--async[Run the salt command but don't wait for a reply]"
'(--state-output --state_output)'{--state-output,--state_output}'[Override the configured state_output value for minion output. Default: full]:Outputs:(full terse mixed changes)'
'--subset[Execute the routine on a random subset of the targeted minions]:Subset:'
'(-v --verbose)'{-v,--verbose}'[Turn on command verbosity, display jid and active job queries]'
'--hide-timeout[Hide minions that timeout]'
'(-b --batch --batch-size)'{-b,--batch,--batch-size}'[Execute the salt job in batch mode, pass number or percentage to batch.]:Batch Size:'
'(-a --auth --eauth --extrenal-auth)'{-a,--auth,--eauth,--external-auth}'[Specify an external authentication system to use.]:eauth:'
'(-T --make-token)'{-T,--make-token}'[Generate and save an authentication token for re-use.]'
'--return[Set an alternative return method.]:Returners:_path_files -W "$salt_dir/returners" -g "[^_]*.py(\:r)"'
'(-d --doc --documentation)'{-d,--doc,--documentation}'[Return the documentation for the specified module]'
'--args-separator[Set the special argument used as a delimiter between command arguments of compound commands.]:Arg separator:'
)
_minion_options=(
'--return[Set an alternative return method.]:Returners:_path_files -W "$salt_dir"/returners" -g "[^_]*.py(\:r)"'
'(-d --doc --documentation)'{-d,--doc,--documentation}'[Return the documentation for the specified module]'
'(-g --grains)'{-g,--grains}'[Return the information generated by the salt grains]'
{*-m,*--module-dirs}'[Specify an additional directory to pull modules from.]:Module Dirs:_files -/'
'--master[Specify the master to use.]:Master:'
'--local[Run salt-call locally, as if there was no master running.]'
'--file-root[Set this directory as the base file root.]:File Root:_files -/'
'--pillar-root[Set this directory as the base pillar root.]:Pillar Root:_files -/'
'--retcode-passthrough[Exit with the salt call retcode and not the salt binary retcode]'
'--id[Specify the minion id to use.]:Minion ID:'
'--skip-grains[Do not load grains.]'
'--refresh-grains-cache[Force a refresh of the grains cache]'
)
_runner_options=(
'--hard-crash[raise any original exception rather than exiting gracefully]'
'(-d --doc --documentation)'{-d,--doc,--documentation}'[Return the documentation for the specified module]'
)
_key_options=(
'(-u --user)'{-u+,--user=}'[specify user to run salt-key]:user:_users'
'--hard-crash[raise any original exception rather than exiting gracefully]'
'(-q --quiet)'{-q,--quiet}'[quiet mode]'
'(-y --yes)'{-y,--yes}'[assume yes]'
'--rotate-aes-key[prevents the master from refreshing the key session when keys are deleted or rejected]:boolean:(true false)'
'--gen-keys=[set a name to generate a keypair for use with salt]:key name'
'--gen-keys-dir=[set the directory to save the generated keypair]: : _directories'
'--keysize=[set the size for keypair]:key size'
'--gen-signature[create a signature file of the masters public-key]'
'--priv=[the private-key file to create a signature with]:private key:_files'
'--signature-path=[the path where the signature file should be written]: : _directories'
'--pub=[the public-key file to create a signature for]:public key:_files'
'--auto-create[auto-create a signing key-pair if it does not yet exist]'
'--include-all[include non-pending keys when accepting/rejecting]'
- '(set)'
{-l+,--list=}'[list public keys]:key type:((
preaccepted\:"unaccepted/unsigned keys" unaccepted\:"unaccepted/unsigned keys" un\:"unaccepted/unsigned keys"
accepted\:"accepted/signed keys" acc\:"accepted/signed keys"
rejected\:"rejected keys" rej\:"rejected keys"
den\:"denied keys" denied\:"denied keys" all
))'
{-a+,--accept=}'[accept key]:key:_minions -t unaccepted -T rejected'
{-A,--accept-all}'[accept all keys]'
{-r+,--reject=}'[reject key]:key:_minions -t rejected -T accepted'
{-p+,--print=}'[print the specified public key]:key:_minions -t all'
{-P,--print-all}'[print all public keys]'
{-d+,--delete=}'[delete the specified public key]:key:_minions -t all'
{-D,--delete-all}'[delete all public keys]'
{-f+,--finger=}'[print the specified key'\''s fingerprint]:key:_minions -t all'
{-F,--finger-all}'[print the fingerprint of all keys]'
)
_logging_options=(
'(-l --log-level)'{-l,--log-level}'[Console logging log level.(default: warning)]:Log Level:(all garbage trace debug info warning error critical quiet)'
'--log-file[Log file path. Default: /var/log/salt/master.]:Log File:_files'
'--log-file-level=[Logfile logging log level.Default: warning]:Log Level:(all garbage trace debug info warning error critical quiet)'
)
_out_opts=(
'(--out --output)'{--out,--output}'[Print the output using the specified outputter.]:Outputters:_path_files -W "$salt_dir/output" -g "[^_]*.py(\:r)"'
'(--out-indent --output-indent)'{--out-indent,--output-indent}'[Print the output indented by the provided value in spaces.]:Number:'
'(--out-file --output-file)'{--out-file,--output-file}'[Write the output to the specified file]:Output File:_files'
'(--no-color --no-colour)'{--no-color,--no-colour}'[Disable all colored output]'
'(--force-color --force-colour)'{--force-color,--force-colour}'[Force colored output]'
)
_salt_comp(){
case "$service" in
salt)
_arguments -C \
"${words[(r)$_target_opt_pat[1]]+!}:minions:_minions" \
':modules:_modules' \
"$_target_options[@]" \
"$_common_opts[@]" \
"$_master_options[@]" \
"$_logging_options[@]" \
"$_out_opts[@]"
;;
salt-call)
_arguments -C \
':modules:_modules' \
"$_minion_options[@]" \
"$_common_opts[@]" \
"$_logging_options[@]" \
"$_out_opts[@]"
;;
salt-cp)
_arguments -C \
"${words[(r)$_target_opt_pat[1]]+!}:minions:_minions" \
"$_target_options[@]" \
"$_common_opts[@]" \
"$_logging_options[@]" \
':Source File:_files' \
':Destination File:_files'
;;
salt-run)
_arguments -C \
":runners:_runners" \
"$_runner_options[@]" \
"$_common_opts[@]" \
"$_logging_options[@]"
;;
salt-key)
_arguments -C \
"$_key_options[@]" \
"${_common_opts[@]:#'-t --timeout\)'*}" \
"${_logging_options[@]:#'(-l --log-level)'*}"
;;
esac
}
() {
local curcontext=${curcontext%:*}:salt_dir
if ! zstyle -m ":completion:$curcontext:" cache-policy '*'; then
zstyle ":completion:$curcontext:" cache-policy _salt_caching_policy
fi
if _cache_invalid salt/salt_dir || ! _retrieve_cache salt/salt_dir; then
salt_dir="${$(python2 -c 'import salt; print(salt.__file__);')%__init__*}"
_store_cache salt/salt_dir salt_dir
fi
}
_salt_comp "$@"
# sbt plugin
This plugin adds completion for the [sbt, the interactive build tool](https://scala-sbt.org/),
as well as some aliases for common sbt commands.
To use it, add `sbt` to the plugins array in your zshrc file:
```zsh
plugins=(... sbt)
```
## Aliases
| Alias | Command | Description |
|-------|-----------------------|--------------------------------------------------------------|
| sbc | `sbt compile` | Compiles the main sources |
| sbcln | `sbt clean` | Deletes all generated files |
| sbcc | `sbt clean compile` | Deletes generated files, compiles the main sources |
| sbco | `sbt console` | Starts Scala with the compiled sources and all dependencies |
| sbcq | `sbt console-quick` | Starts Scala with all dependencies |
| sbcp | `sbt console-project` | Starts Scala with sbt and the build definitions |
| sbd | `sbt doc` | Generates API documentation for Scala source files |
| sbdc | `sbt dist:clean` | Deletes the distribution packages |
| sbdi | `sbt dist` | Creates the distribution packages |
| sbgi | `sbt gen-idea` | Create Idea project files |
| sbp | `sbt publish` | Publishes artifacts to the repository |
| sbpl | `sbt publish-local` | Publishes artifacts to the local Ivy repository |
| sbr | `sbt run` | Runs the main class for the project |
| sbrm | `sbt run-main` | Runs the specified main class for the project |
| sbu | `sbt update` | Resolves and retrieves external dependencies |
| sbx | `sbt test` | Compiles and runs all tests |
| sba | `sbt assembly` | Create a fat JAR with all dependencies |
......@@ -17,6 +17,7 @@ _sbt_commands=(
'package-src:produce a source artifact, such as a jar containing sources'
'publish:publish artifacts to a repository'
'publish-local:publish artifacts to the local repository'
'publish-m2:publish artifacts to the local Maven 2 repository'
'run:run a main class'
'run-main:run the main class selected by the first argument'
'test:execute all tests'
......
......@@ -7,9 +7,10 @@
# aliases - mnemonic: prefix is 'sb'
alias sbc='sbt compile'
alias sbcc='sbt clean compile'
alias sbco='sbt console'
alias sbcq='sbt console-quick'
alias sbcl='sbt clean'
alias sbcln='sbt clean'
alias sbcp='sbt console-project'
alias sbd='sbt doc'
alias sbdc='sbt dist:clean'
......
## Scala plugin
Completion script for [scala and scalac](https://www.scala-lang.org/) commands.
To use it, add `scala` to the plugins array of your zshrc file:
```
plugins=(... scala)
```
## Aliases
| Command | Description |
|------------------|---------------------------------------------------------------------------------|
| `scala` | Run code in the Scala language |
| `scalac` | Compiler for the Scala language |
#compdef scala scalac
# ------------------------------------------------------------------------------
# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users
# Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -28,7 +28,7 @@
# Description
# -----------
#
# Completion script for scala and scalac (http://www.scala-lang.org/).
# Completion script for scala and scalac (https://www.scala-lang.org/).
#
# ------------------------------------------------------------------------------
# Authors
......@@ -152,10 +152,10 @@ Y_opts=(
"-Ydump-classes+[Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders)]:output directory:_files -/"
"-Yeta-expand-keeps-star[Eta-expand varargs methods to T* rather than Seq[T]. This is a temporary option to ease transition.]"
"-Ygen-javap+[Generate a parallel output directory of .javap files]:output directory:_files -/"
"-Yinfer-argument-types[Infer types for arguments of overriden methods]"
"-Yinfer-argument-types[Infer types for arguments of overridden methods]"
"-Yinline[Perform inlining when possible]"
"-Yinline-handlers[Perform exception handler inlining when possible]"
"-Yinline-warnings[Emit inlining warnings (normally surpressed due to high volume)]"
"-Yinline-warnings[Emit inlining warnings (normally suppressed due to high volume)]"
"-Yinvalidate+[Invalidate classpath entry before run]:classpath entry"
"-Ylinearizer\:-[Linearizer to use (default\: rpo)]:linearizer:(normal dfs rpo dump)"
"-Ylog-classpath[Output information about what classpath is being applied]"
......
......@@ -14,8 +14,8 @@ directory aliases, which appear as named directories in zsh session.
## INSTALLATION NOTES
Besides oh-my-zsh, `scd` can be used with *bash*, *dash* or *tcsh*
shells and is also available as [Vim](http://www.vim.org/) plugin and
[IPython](http://ipython.org/) extension. For installation details, see
shells and is also available as [Vim](https://www.vim.org/) plugin and
[IPython](https://ipython.org/) extension. For installation details, see
https://github.com/pavoljuhas/smart-change-directory.
## SYNOPSIS
......
File mode changed from 100755 to 100644
# screen
This plugin sets title and hardstatus of the tab window for [screen](https://www.gnu.org/software/screen/),
the terminal multiplexer.
To use it add `screen` to the plugins array in your zshrc file.
```zsh
plugins=(... screen)
```
#compdef scw
#
# zsh completion for scw (http://scaleway.com)
# zsh completion for scw (https://www.scaleway.com)
#
# Inspired by https://github.com/felixr/docker-zsh-completion
......
# sdk
Plugin for SDKMAN, a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems.
Provides autocompletion for all known commands.
## Requirements
* [SDKMAN](http://sdkman.io/)
### SDKMAN Autocomplete for Oh My Zsh
# This is the output from sdkman. All the these options are supported at the
# moment.
# Usage: sdk <command> [candidate] [version]
# sdk offline <enable|disable>
#
# commands:
# install or i <candidate> [version]
# uninstall or rm <candidate> <version>
# list or ls [candidate]
# use or u <candidate> [version]
# default or d <candidate> [version]
# current or c [candidate]
# upgrade or ug [candidate]
# version or v
# broadcast or b
# help or h
# offline [enable|disable]
# selfupdate [force]
# update
# flush <candidates|broadcast|archives|temp>
#
# candidate : the SDK to install: groovy, scala, grails, gradle, kotlin, etc.
# use list command for comprehensive list of candidates
# eg: $ sdk list
#
# version : where optional, defaults to latest stable if not provided
# eg: $ sdk install groovy
local _sdk_commands=(
install i
uninstall rm
list ls
use u
default d
current c
upgrade ug
version v
broadcast b
help h
offline
selfupdate
update
flush
)
_listInstalledVersions() {
__sdkman_build_version_csv $1 | sed -e "s/,/ /g"
}
_listInstallableVersions() {
__sdkman_list_versions $1 | grep "^ " | sed -e "s/\* /*/g" | \
sed -e "s/>//g" | xargs -n 1 echo | grep -v "^*"
}
_listAllVersion() {
__sdkman_list_versions $1 | grep "^ " | sed -e "s/\*/ /g" | sed -e "s/>//g"
}
_sdk () {
case $CURRENT in
2) compadd -- $_sdk_commands ;;
3) case "$words[2]" in
i|install|rm|uninstall|ls|list|u|use|d|default|c|current|ug|upgrade)
compadd -- $SDKMAN_CANDIDATES ;;
offline) compadd -- enable disable ;;
selfupdate) compadd -- force ;;
flush) compadd -- candidates broadcast archives temp ;;
esac
;;
4) case "$words[2]" in
rm|uninstall|d|default) compadd -- $(_listInstalledVersions $words[3]) ;;
i|install) compadd -- $(_listInstallableVersions $words[3]) ;;
u|use) compadd -- $(_listAllVersion $words[3]) ;;
esac
;;
esac
}
compdef _sdk sdk
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment