diff options
| author | Peter Son Struschka <me@peter-struschka.com> | 2021-02-28 17:58:30 +0800 |
|---|---|---|
| committer | Peter Son Struschka <me@peter-struschka.com> | 2021-02-28 17:58:30 +0800 |
| commit | 83d7b9c7ce20f16681afacf99ed3ab47427f1ded (patch) | |
| tree | 5f607e348dadf13e5d6061217b7a317a48527d83 /zsh | |
| parent | e5209aad576fe44d3965fcb94d6709348b0a93bf (diff) | |
| download | dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.tar.gz dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.tar.bz2 dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.tar.lz dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.tar.xz dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.tar.zst dotfiles-83d7b9c7ce20f16681afacf99ed3ab47427f1ded.zip | |
all: fixes and new modules
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/.config/zsh/.zshrc | 4 | ||||
| -rw-r--r-- | zsh/.local/share/zsh/functions/_deno | 250 | ||||
| -rw-r--r-- | zsh/.local/share/zsh/functions/_op | 871 | ||||
| -rw-r--r-- | zsh/.local/share/zsh/functions/_trust | 30 |
4 files changed, 1089 insertions, 66 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 91c966c..d2806f0 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -7,10 +7,11 @@ stty stop undef # Disable ctrl-s to freeze terminal. # History HISTFILE="$XDG_CACHE_HOME/zsh/history" -HISTSIZE=50000 +HISTSIZE=10000 SAVEHIST=10000 setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE +setopt hist_ignore_all_dups # ignore all duplicated commands setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it @@ -143,7 +144,6 @@ if type "deno" > /dev/null; then #unset deno_cache fi - if type "thefuck" > /dev/null; then thefuck_cache_dir="$XDG_CACHE_HOME/thefuck" thefuck_cache="$thefuck_cache_dir/thefuck_init-zsh" diff --git a/zsh/.local/share/zsh/functions/_deno b/zsh/.local/share/zsh/functions/_deno index 1d820f4..3bef4ba 100644 --- a/zsh/.local/share/zsh/functions/_deno +++ b/zsh/.local/share/zsh/functions/_deno @@ -17,6 +17,7 @@ _deno() { _arguments "${_arguments_options[@]}" \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '-h[Prints help information]' \ @@ -34,21 +35,24 @@ _deno() { case $line[1] in (bundle) _arguments "${_arguments_options[@]}" \ -'--lock=[Check the specified lock file]' \ -'--cert=[Load certificate authority from PEM encoded file]' \ -'-r+[Reload source code cache (recompile TypeScript)]' \ -'--reload=[Reload source code cache (recompile TypeScript)]' \ -'--importmap=[UNSTABLE: Load import map file]' \ +'--import-map=[UNSTABLE: Load import map file]' \ '-c+[Load tsconfig.json configuration file]' \ '--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--lock-write[Write lock file. Use with --lock.]' \ -'--unstable[Enable unstable APIs]' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ +'--watch[Watch for file changes and restart process automatically]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ ':source_file:_files' \ @@ -57,26 +61,67 @@ _arguments "${_arguments_options[@]}" \ ;; (cache) _arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ '-r+[Reload source code cache (recompile TypeScript)]' \ '--reload=[Reload source code cache (recompile TypeScript)]' \ '--lock=[Check the specified lock file]' \ -'--importmap=[UNSTABLE: Load import map file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +':file:_files' \ +&& ret=0 +;; +(compile) +_arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ '-c+[Load tsconfig.json configuration file]' \ '--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ '--cert=[Load certificate authority from PEM encoded file]' \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ +'--seed=[Seed Math.random()]' \ +'-o+[Output file (defaults to $PWD/<inferred-name>)]' \ +'--output=[Output file (defaults to $PWD/<inferred-name>)]' \ +'--target=[Target OS architecture]: :(x86_64-unknown-linux-gnu x86_64-pc-windows-msvc x86_64-apple-darwin aarch64-apple-darwin)' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--lock-write[Write lock file. Use with --lock.]' \ -'--unstable[Enable unstable APIs]' \ -'--no-check[Skip type checking modules]' \ '--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ +'--allow-env[Allow environment access]' \ +'--allow-run[Allow running subprocesses]' \ +'--allow-plugin[Allow loading plugins]' \ +'--allow-hrtime[Allow high resolution time measurement]' \ +'-A[Allow all permissions]' \ +'--allow-all[Allow all permissions]' \ +'--cached-only[Require that remote dependencies are already cached]' \ +'--lite[Use lite runtime]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ -':file:_files' \ +':script_arg -- Script arg:_files' \ && ret=0 ;; (completions) @@ -87,6 +132,7 @@ _arguments "${_arguments_options[@]}" \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ ':shell:(zsh bash fish powershell elvish)' \ @@ -94,32 +140,44 @@ _arguments "${_arguments_options[@]}" \ ;; (doc) _arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ '-r+[Reload source code cache (recompile TypeScript)]' \ '--reload=[Reload source code cache (recompile TypeScript)]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--unstable[Enable unstable APIs]' \ -'--json[Output documentation in JSON format.]' \ +'--json[Output documentation in JSON format]' \ '--private[Output private documentation]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '::source_file:_files' \ -'::filter -- Dot separated path to symbol.:_files' \ +'::filter -- Dot separated path to symbol:_files' \ && ret=0 ;; (eval) _arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ '--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ '--inspect-brk=[activate inspector on host:port and break at start of user script]' \ -'--cert=[Load certificate authority from PEM encoded file]' \ -'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ +'--seed=[Seed Math.random()]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--unstable[Enable unstable APIs]' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ +'--cached-only[Require that remote dependencies are already cached]' \ '-T[Treat eval input as TypeScript]' \ '--ts[Treat eval input as TypeScript]' \ '-p[print result to stdout]' \ @@ -128,22 +186,25 @@ _arguments "${_arguments_options[@]}" \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ -':code:_files' \ +':code_arg -- Code arg:_files' \ && ret=0 ;; (fmt) _arguments "${_arguments_options[@]}" \ +'--ext=[Set standard input (stdin) content type]: :(ts tsx js jsx md)' \ '--ignore=[Ignore formatting particular source files. Use with --unstable]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--check[Check if the source files are formatted.]' \ -'--unstable[Enable unstable APIs]' \ +'--check[Check if the source files are formatted]' \ +'--watch[Watch for file changes and restart process automatically]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '::files:_files' \ @@ -154,15 +215,16 @@ _arguments "${_arguments_options[@]}" \ '-r+[Reload source code cache (recompile TypeScript)]' \ '--reload=[Reload source code cache (recompile TypeScript)]' \ '--cert=[Load certificate authority from PEM encoded file]' \ +'--import-map=[UNSTABLE: Load import map file]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ '--no-check[Skip type checking modules]' \ -'--unstable[Enable unstable APIs]' \ '--json[Outputs the information in JSON format]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '::file:_files' \ @@ -170,48 +232,73 @@ _arguments "${_arguments_options[@]}" \ ;; (install) _arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ '--allow-read=[Allow file system read access]' \ '--allow-write=[Allow file system write access]' \ '--allow-net=[Allow network access]' \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ +'--seed=[Seed Math.random()]' \ '-n+[Executable file name]' \ '--name=[Executable file name]' \ '--root=[Installation root]' \ -'--cert=[Load certificate authority from PEM encoded file]' \ -'-c+[Load tsconfig.json configuration file]' \ -'--config=[Load tsconfig.json configuration file]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ '--allow-env[Allow environment access]' \ '--allow-run[Allow running subprocesses]' \ '--allow-plugin[Allow loading plugins]' \ '--allow-hrtime[Allow high resolution time measurement]' \ '-A[Allow all permissions]' \ '--allow-all[Allow all permissions]' \ +'--cached-only[Require that remote dependencies are already cached]' \ '-f[Forcefully overwrite existing installation]' \ '--force[Forcefully overwrite existing installation]' \ -'--no-check[Skip type checking modules]' \ -'--unstable[Enable unstable APIs]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ ':cmd:_files' \ && ret=0 ;; +(lsp) +_arguments "${_arguments_options[@]}" \ +'-L+[Set log level]: :(debug info)' \ +'--log-level=[Set log level]: :(debug info)' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ +'-q[Suppress diagnostic output]' \ +'--quiet[Suppress diagnostic output]' \ +&& ret=0 +;; (lint) _arguments "${_arguments_options[@]}" \ -'--ignore=[Ignore linting particular source files.]' \ +'--ignore=[Ignore linting particular source files]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--unstable[Enable unstable APIs]' \ '--rules[List available rules]' \ -'--json[Output lint result in JSON format.]' \ +'--json[Output lint result in JSON format]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '::files:_files' \ @@ -219,111 +306,127 @@ _arguments "${_arguments_options[@]}" \ ;; (repl) _arguments "${_arguments_options[@]}" \ +'--import-map=[UNSTABLE: Load import map file]' \ +'-c+[Load tsconfig.json configuration file]' \ +'--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--lock=[Check the specified lock file]' \ +'--cert=[Load certificate authority from PEM encoded file]' \ '--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ '--inspect-brk=[activate inspector on host:port and break at start of user script]' \ -'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ -'--cert=[Load certificate authority from PEM encoded file]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ +'--seed=[Seed Math.random()]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--unstable[Enable unstable APIs]' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ +'--cached-only[Require that remote dependencies are already cached]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ && ret=0 ;; (run) _arguments "${_arguments_options[@]}" \ -'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ -'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ -'--allow-read=[Allow file system read access]' \ -'--allow-write=[Allow file system write access]' \ -'--allow-net=[Allow network access]' \ -'--importmap=[UNSTABLE: Load import map file]' \ -'-r+[Reload source code cache (recompile TypeScript)]' \ -'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--import-map=[UNSTABLE: Load import map file]' \ '-c+[Load tsconfig.json configuration file]' \ '--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ '--lock=[Check the specified lock file]' \ -'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ '--cert=[Load certificate authority from PEM encoded file]' \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ '--seed=[Seed Math.random()]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ '--allow-env[Allow environment access]' \ '--allow-run[Allow running subprocesses]' \ '--allow-plugin[Allow loading plugins]' \ '--allow-hrtime[Allow high resolution time measurement]' \ '-A[Allow all permissions]' \ '--allow-all[Allow all permissions]' \ -'--unstable[Enable unstable APIs]' \ -'--lock-write[Write lock file. Use with --lock.]' \ -'--no-check[Skip type checking modules]' \ -'--no-remote[Do not resolve remote modules]' \ '--cached-only[Require that remote dependencies are already cached]' \ -'--watch[Watch for file changes and restart process automatically]' \ +'(--inspect --inspect-brk)--watch[Watch for file changes and restart process automatically]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ -':script_arg -- script args:_files' \ +':script_arg -- Script arg:_files' \ && ret=0 ;; (test) _arguments "${_arguments_options[@]}" \ -'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ -'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ -'--allow-read=[Allow file system read access]' \ -'--allow-write=[Allow file system write access]' \ -'--allow-net=[Allow network access]' \ -'--importmap=[UNSTABLE: Load import map file]' \ -'-r+[Reload source code cache (recompile TypeScript)]' \ -'--reload=[Reload source code cache (recompile TypeScript)]' \ +'--import-map=[UNSTABLE: Load import map file]' \ '-c+[Load tsconfig.json configuration file]' \ '--config=[Load tsconfig.json configuration file]' \ +'-r+[Reload source code cache (recompile TypeScript)]' \ +'--reload=[Reload source code cache (recompile TypeScript)]' \ '--lock=[Check the specified lock file]' \ -'--v8-flags=[Set V8 command line options. For help: --v8-flags=--help]' \ '--cert=[Load certificate authority from PEM encoded file]' \ +'--allow-read=[Allow file system read access]' \ +'--allow-write=[Allow file system write access]' \ +'--allow-net=[Allow network access]' \ +'--inspect=[activate inspector on host:port (default: 127.0.0.1:9229)]' \ +'--inspect-brk=[activate inspector on host:port and break at start of user script]' \ +'--location=[Value of '\''globalThis.location'\'' used by some web APIs]' \ +'--v8-flags=[Set V8 command line options (for help: --v8-flags=--help)]' \ '--seed=[Seed Math.random()]' \ '--filter=[Run tests with this string or pattern in the test name]' \ +'(--inspect --inspect-brk)--coverage=[Collect coverage information]' \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ +'--no-remote[Do not resolve remote modules]' \ +'--no-check[Skip type checking modules]' \ +'--lock-write[Write lock file (use with --lock)]' \ '--allow-env[Allow environment access]' \ '--allow-run[Allow running subprocesses]' \ '--allow-plugin[Allow loading plugins]' \ '--allow-hrtime[Allow high resolution time measurement]' \ '-A[Allow all permissions]' \ '--allow-all[Allow all permissions]' \ -'--unstable[Enable unstable APIs]' \ -'--lock-write[Write lock file. Use with --lock.]' \ -'--no-check[Skip type checking modules]' \ -'--no-remote[Do not resolve remote modules]' \ '--cached-only[Require that remote dependencies are already cached]' \ -'--failfast[Stop on first error]' \ +'--no-run[Cache test modules, but don'\''t run tests]' \ +'--fail-fast[Stop on first error]' \ '--allow-none[Don'\''t return error code if no test files are found]' \ -'(--inspect --inspect-brk)--coverage[Collect coverage information]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ '::files -- List of file names to run:_files' \ +'::script_arg -- Script arg:_files' \ && ret=0 ;; (types) _arguments "${_arguments_options[@]}" \ '-L+[Set log level]: :(debug info)' \ '--log-level=[Set log level]: :(debug info)' \ -'--unstable[Enable unstable APIs]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ && ret=0 @@ -338,8 +441,10 @@ _arguments "${_arguments_options[@]}" \ '--dry-run[Perform all checks without replacing old exe]' \ '-f[Replace current exe even if not out-of-date]' \ '--force[Replace current exe even if not out-of-date]' \ +'--canary[Upgrade to canary builds]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ && ret=0 @@ -352,6 +457,7 @@ _arguments "${_arguments_options[@]}" \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ +'--unstable[Enable unstable features and APIs]' \ '-q[Suppress diagnostic output]' \ '--quiet[Suppress diagnostic output]' \ && ret=0 @@ -366,12 +472,14 @@ _deno_commands() { local commands; commands=( "bundle:Bundle module and dependencies into single file" \ "cache:Cache the dependencies" \ +"compile:Compile the script into a self contained executable" \ "completions:Generate shell completions" \ "doc:Show documentation for a module" \ "eval:Eval script" \ "fmt:Format source files" \ "info:Show info about cache or info related to source file" \ "install:Install script as an executable" \ +"lsp:Start the language server" \ "lint:Lint source files" \ "repl:Read Eval Print Loop" \ "run:Run a program given a filename or url to the module. Use '-' as a filename to read from stdin." \ @@ -396,6 +504,13 @@ _deno__cache_commands() { ) _describe -t commands 'deno cache commands' commands "$@" } +(( $+functions[_deno__compile_commands] )) || +_deno__compile_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno compile commands' commands "$@" +} (( $+functions[_deno__completions_commands] )) || _deno__completions_commands() { local commands; commands=( @@ -452,6 +567,13 @@ _deno__lint_commands() { ) _describe -t commands 'deno lint commands' commands "$@" } +(( $+functions[_deno__lsp_commands] )) || +_deno__lsp_commands() { + local commands; commands=( + + ) + _describe -t commands 'deno lsp commands' commands "$@" +} (( $+functions[_deno__repl_commands] )) || _deno__repl_commands() { local commands; commands=( diff --git a/zsh/.local/share/zsh/functions/_op b/zsh/.local/share/zsh/functions/_op new file mode 100644 index 0000000..0485231 --- /dev/null +++ b/zsh/.local/share/zsh/functions/_op @@ -0,0 +1,871 @@ +#compdef _op op + + +function _op { + local -a commands + + _arguments -C \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '(-h --help)'{-h,--help}'[get help for op]' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "add:Grant access to groups or vaults" + "completion:Generate shell completion information" + "confirm:Confirm a user" + "create:Create an object" + "delete:Remove an object" + "edit:Edit an object" + "encode:Encode the JSON needed to create an item" + "forget:Remove a 1Password account from this device" + "get:Get details about an object" + "help:Get help for a command" + "list:List objects and events" + "reactivate:Reactivate a suspended user" + "remove:Revoke access to groups or vaults" + "signin:Sign in to a 1Password account" + "signout:Sign out of a 1Password account" + "suspend:Suspend a user" + "update:Check for and download updates" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + add) + _op_add + ;; + completion) + _op_completion + ;; + confirm) + _op_confirm + ;; + create) + _op_create + ;; + delete) + _op_delete + ;; + edit) + _op_edit + ;; + encode) + _op_encode + ;; + forget) + _op_forget + ;; + get) + _op_get + ;; + help) + _op_help + ;; + list) + _op_list + ;; + reactivate) + _op_reactivate + ;; + remove) + _op_remove + ;; + signin) + _op_signin + ;; + signout) + _op_signout + ;; + suspend) + _op_suspend + ;; + update) + _op_update + ;; + esac +} + + +function _op_add { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with add]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "group:Grant a group access to a vault" + "user:Grant a user access to a vault or group" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + group) + _op_add_group + ;; + user) + _op_add_user + ;; + esac +} + +function _op_add_group { + _arguments \ + '(-h --help)'{-h,--help}'[get help with add group]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_add_user { + _arguments \ + '(-h --help)'{-h,--help}'[get help with add user]' \ + '--role[set the user'\''s `role` in a group (member or manager) (default "member")]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_completion { + _arguments \ + '(-h --help)'{-h,--help}'[get help with completion]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_confirm { + _arguments \ + '--all[confirm all unconfirmed users]' \ + '(-h --help)'{-h,--help}'[get help with confirm]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_create { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with create]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "document:Create a document" + "group:Create a group" + "item:Create an item" + "user:Create a user" + "vault:Create a vault" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + document) + _op_create_document + ;; + group) + _op_create_group + ;; + item) + _op_create_item + ;; + user) + _op_create_user + ;; + vault) + _op_create_vault + ;; + esac +} + +function _op_create_document { + _arguments \ + '--filename[set the file'\''s `name`]:' \ + '(-h --help)'{-h,--help}'[get help with create document]' \ + '--tags[add one or more `tags` (comma-separated) to the item]:' \ + '--title[set the item'\''s `title`]:' \ + '--vault[save the document in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_create_group { + _arguments \ + '--description[set the group'\''s `description`]:' \ + '(-h --help)'{-h,--help}'[get help with create group]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_create_item { + _arguments \ + '--generate-password[give the item a randomly generated password]' \ + '(-h --help)'{-h,--help}'[get help with create item]' \ + '--tags[add one or more `tags` (comma-separated) to the item]:' \ + '--title[set the item'\''s `title`]:' \ + '--url[set the `URL` associated with the item]:' \ + '--vault[save the item in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_create_user { + _arguments \ + '(-h --help)'{-h,--help}'[get help with create user]' \ + '--language[set the user'\''s account `language`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_create_vault { + _arguments \ + '--allow-admins-to-manage[set whether admins can manage vault access]:' \ + '--description[set the group'\''s `description`]:' \ + '(-h --help)'{-h,--help}'[get help with create vault]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_delete { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with delete]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "document:Move a document to the Trash" + "group:Remove a group" + "item:Move an item to the Trash" + "trash:Empty a vault's Trash" + "user:Completely remove a user" + "vault:Remove a vault" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + document) + _op_delete_document + ;; + group) + _op_delete_group + ;; + item) + _op_delete_item + ;; + trash) + _op_delete_trash + ;; + user) + _op_delete_user + ;; + vault) + _op_delete_vault + ;; + esac +} + +function _op_delete_document { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete document]' \ + '--vault[look for the document in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_delete_group { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete group]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_delete_item { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete item]' \ + '--vault[look for the item in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_delete_trash { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete trash]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_delete_user { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete user]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_delete_vault { + _arguments \ + '(-h --help)'{-h,--help}'[get help with delete vault]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_edit { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with edit]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "document:Edit a document" + "group:Edit a group's name or description" + "item:Edit an item's details" + "user:Edit a user's name or Travel Mode status" + "vault:Edit a vault's name" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + document) + _op_edit_document + ;; + group) + _op_edit_group + ;; + item) + _op_edit_item + ;; + user) + _op_edit_user + ;; + vault) + _op_edit_vault + ;; + esac +} + +function _op_edit_document { + _arguments \ + '--filename[set the file'\''s `name`]:' \ + '(-h --help)'{-h,--help}'[get help with edit document]' \ + '--tags[add one or more `tags` (comma-separated) to the item]:' \ + '--title[set the item'\''s `title`]:' \ + '--vault[look up document in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_edit_group { + _arguments \ + '--description[change the group'\''s `description`]:' \ + '(-h --help)'{-h,--help}'[get help with edit group]' \ + '--name[change the group'\''s `name`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_edit_item { + _arguments \ + '--generate-password[give the item a randomly generated password]' \ + '(-h --help)'{-h,--help}'[get help with edit item]' \ + '--vault[look for the item in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_edit_user { + _arguments \ + '(-h --help)'{-h,--help}'[get help with edit user]' \ + '--name[set the user'\''s `name`]:' \ + '--travelmode[turn Travel Mode on or off for the user]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_edit_vault { + _arguments \ + '(-h --help)'{-h,--help}'[get help with edit vault]' \ + '--name[change the vault'\''s `name`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_encode { + _arguments \ + '(-h --help)'{-h,--help}'[get help with encode]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_forget { + _arguments \ + '(-h --help)'{-h,--help}'[get help with forget]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_get { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with get]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "account:Get details about your account" + "document:Download a document" + "group:Get details about a group" + "item:Get item details" + "template:Get an item template" + "totp:Get the one-time password for an item" + "user:Get details about a user" + "vault:Get details about a vault" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + account) + _op_get_account + ;; + document) + _op_get_document + ;; + group) + _op_get_group + ;; + item) + _op_get_item + ;; + template) + _op_get_template + ;; + totp) + _op_get_totp + ;; + user) + _op_get_user + ;; + vault) + _op_get_vault + ;; + esac +} + +function _op_get_account { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get account]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_document { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get document]' \ + '--include-trash[include items from the Trash]' \ + '--output[save the document to the file `path` instead of stdout]:' \ + '--vault[look for the document in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_group { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get group]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_item { + _arguments \ + '*--fields[only return data from these `fields`]:' \ + '--format[return data in this `format` (CSV or JSON) (use with --fields)]:' \ + '(-h --help)'{-h,--help}'[get help with get item]' \ + '--include-trash[include items in the Trash]' \ + '--share-link[get a shareable link for the item]' \ + '--vault[look for the item in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_template { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get template]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_totp { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get totp]' \ + '--vault[look for the item in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_user { + _arguments \ + '--fingerprint[get the user'\''s public key fingerprint]' \ + '(-h --help)'{-h,--help}'[get help with get user]' \ + '--publickey[get the user'\''s public key]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_get_vault { + _arguments \ + '(-h --help)'{-h,--help}'[get help with get vault]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_help { + _arguments \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_list { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with list]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "documents:Get a list of documents" + "events:Get a list of events from the Activity Log" + "groups:Get a list of groups" + "items:Get a list of items" + "templates:Get a list of templates" + "users:Get the list of users" + "vaults:Get a list of vaults" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + documents) + _op_list_documents + ;; + events) + _op_list_events + ;; + groups) + _op_list_groups + ;; + items) + _op_list_items + ;; + templates) + _op_list_templates + ;; + users) + _op_list_users + ;; + vaults) + _op_list_vaults + ;; + esac +} + +function _op_list_documents { + _arguments \ + '(-h --help)'{-h,--help}'[get help with list documents]' \ + '--include-trash[include documents in the Trash]' \ + '--vault[only list documents in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_events { + _arguments \ + '--eventid[start listing from event with ID `eid`]:' \ + '(-h --help)'{-h,--help}'[get help with list events]' \ + '--older[list events from before the specified event]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_groups { + _arguments \ + '(-h --help)'{-h,--help}'[get help with list groups]' \ + '--user[list groups that a `user` belongs to]:' \ + '--vault[list groups that have direct access to a `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_items { + _arguments \ + '*--categories[only list items in these `categories` (comma-separated)]:' \ + '(-h --help)'{-h,--help}'[get help with list items]' \ + '--include-trash[include items in the Trash]' \ + '*--tags[only list items with these `tags` (comma-separated)]:' \ + '--vault[only list items in this `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_templates { + _arguments \ + '(-h --help)'{-h,--help}'[get help with list templates]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_users { + _arguments \ + '--group[list users who belong to a `group`]:' \ + '(-h --help)'{-h,--help}'[get help with list users]' \ + '--vault[list users who have direct access to `vault`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_list_vaults { + _arguments \ + '--group[list vaults a `group` has access to]:' \ + '(-h --help)'{-h,--help}'[get help with list vaults]' \ + '--user[list vaults a `user` has access to]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_reactivate { + _arguments \ + '(-h --help)'{-h,--help}'[get help with reactivate]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + + +function _op_remove { + local -a commands + + _arguments -C \ + '(-h --help)'{-h,--help}'[get help with remove]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "group:Revoke a group's access to a vault" + "user:Revoke a user's access to a vault or group" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + group) + _op_remove_group + ;; + user) + _op_remove_user + ;; + esac +} + +function _op_remove_group { + _arguments \ + '(-h --help)'{-h,--help}'[get help with remove group]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_remove_user { + _arguments \ + '(-h --help)'{-h,--help}'[get help with remove user]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_signin { + _arguments \ + '(-h --help)'{-h,--help}'[get help with signin]' \ + '(-r --raw)'{-r,--raw}'[only return the session token]' \ + '--shorthand[set the short account `name`]:' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_signout { + _arguments \ + '--forget[remove the details for a 1Password account from this device]' \ + '(-h --help)'{-h,--help}'[get help with signout]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_suspend { + _arguments \ + '(-h --help)'{-h,--help}'[get help with suspend]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + +function _op_update { + _arguments \ + '--directory[download the update to this `path`]:' \ + '(-h --help)'{-h,--help}'[get help with update]' \ + '--account[use the account with this `shorthand`]:' \ + '--cache[store and use cached information]' \ + '--config[use this configuration `directory`]:' \ + '--session[authenticate with this session `token`]:' +} + diff --git a/zsh/.local/share/zsh/functions/_trust b/zsh/.local/share/zsh/functions/_trust new file mode 100644 index 0000000..e140703 --- /dev/null +++ b/zsh/.local/share/zsh/functions/_trust @@ -0,0 +1,30 @@ +#compdef _trust trust + +typeset -A opt_args + +function _trust { + local state + + _arguments -C \ + '1:cmd:->cmds' \ + '*:: :->cmd' + + case "$state" in + (cmds) + local commands; + commands=( + 'list:List trust or certificates' + 'extract:Extract certificates and trust' + 'extract-compat:Extract trust compatibility bundles' + 'anchor:Add, remove, change trust anchors' + 'dump:Dump trust objects in internal format' + '-h:List help information' + '--help:List help information' + ) + + _describe -t commands 'command' commands + esac +} + +function _trust_list { +} |
