From fc706f72185a95bb7cae39379ef54cd036df612e Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdx@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:06:54 -0600 Subject: [PATCH] flags: move raw+jobs flags to only commands that install --- README.md | 73 ++++- completions/_rtx | 133 +------- completions/rtx.bash | 576 ++++------------------------------ completions/rtx.fish | 15 +- e2e/test_local | 6 +- src/cli/args/jobs.rs | 22 -- src/cli/args/mod.rs | 2 - src/cli/args/raw.rs | 14 - src/cli/env.rs | 24 +- src/cli/exec.rs | 24 +- src/cli/install.rs | 29 +- src/cli/mod.rs | 8 - src/cli/shell.rs | 24 +- src/cli/upgrade.rs | 24 +- src/cli/use.rs | 55 +++- src/cli/which.rs | 15 +- src/config/config_file/mod.rs | 9 +- src/install_context.rs | 1 + src/shims.rs | 2 + src/toolset/mod.rs | 19 +- 20 files changed, 337 insertions(+), 738 deletions(-) delete mode 100644 src/cli/args/jobs.rs delete mode 100644 src/cli/args/raw.rs diff --git a/README.md b/README.md index a1fcab8f0..a7107fbdc 100644 --- a/README.md +++ b/README.md @@ -1902,9 +1902,18 @@ Options: [possible values: bash, fish, nu, xonsh, zsh] + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + -J, --json Output in JSON format + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 + Examples: $ eval "$(rtx env -s bash)" $ eval "$(rtx env -s zsh)" @@ -1968,6 +1977,15 @@ Options: -C, --cd Change to this directory before executing the command + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 + Examples: $ rtx exec node@20 -- node ./app.js # launch app.js using node-20.x $ rtx x node@20 -- node ./app.js # shorter alias @@ -2018,6 +2036,15 @@ Options: -f, --force Force reinstall even if already installed + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 + -v, --verbose... Show installation output @@ -2545,6 +2572,15 @@ Arguments: Tool(s) to use Options: + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 + -u, --unset Removes a previously set version @@ -2669,6 +2705,15 @@ Arguments: Options: -n, --dry-run Just print what would be done, don't actually do it + + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 ``` ### `rtx use [OPTIONS] [TOOL@VERSION]...` @@ -2690,29 +2735,41 @@ Arguments: If no version is specified, it will default to @latest Options: - --pin - Save exact version to config file - e.g.: `rtx use --pin node@20` will save 20.0.0 as the version - - [env: RTX_ASDF_COMPAT=] + -f, --force + Force reinstall even if already installed --fuzzy Save fuzzy version to config file e.g.: `rtx use --fuzzy node@20` will save 20 as the version this is the default behavior unless RTX_ASDF_COMPAT=1 - --remove - Remove the tool(s) from config file - -g, --global Use the global config file (~/.config/rtx/config.toml) instead of the local one -e, --env Modify an environment-specific config file like .rtx..toml + -j, --jobs + Number of jobs to run in parallel + [default: 4] + + [env: RTX_JOBS=] + + --raw + Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 + + --remove + Remove the tool(s) from config file + -p, --path Specify a path to a config file or directory If a directory is specified, it will look for .rtx.toml (default) or .tool-versions + --pin + Save exact version to config file + e.g.: `rtx use --pin node@20` will save 20.0.0 as the version + + [env: RTX_ASDF_COMPAT=] + Examples: # set the current version of node to 20.x in .rtx.toml of current directory # will write the fuzzy version (e.g.: 20) diff --git a/completions/_rtx b/completions/_rtx index e10ef3693..438230c74 100644 --- a/completions/_rtx +++ b/completions/_rtx @@ -5,9 +5,7 @@ _rtx() { local ret=1 _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_cmds' \ @@ -65,9 +63,7 @@ __rtx_activate_cmd() { _arguments -s -S \ '::shell_type:(bash fish nu xonsh zsh)' \ '--status[Show "rtx\: @" message when changing directories]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -75,9 +71,7 @@ __rtx_activate_cmd() { __rtx_alias_cmd() { _arguments -s -S \ '(-p --plugin)'{-p,--plugin}'=[filter aliases by plugin]:plugin:__rtx_plugins' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_alias_cmds' \ @@ -102,9 +96,7 @@ __rtx_alias_get_cmd() { _arguments -s -S \ ':plugin:__rtx_plugins' \ ':alias:__rtx_aliases' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -112,9 +104,7 @@ __rtx_alias_get_cmd() { __rtx_alias_ls_cmd() { _arguments -s -S \ '::plugin:__rtx_plugins' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -124,9 +114,7 @@ __rtx_alias_set_cmd() { ':plugin:__rtx_plugins' \ ':alias:__rtx_aliases' \ ':value:' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -135,9 +123,7 @@ __rtx_alias_unset_cmd() { _arguments -s -S \ ':plugin:__rtx_plugins' \ ':alias:__rtx_aliases' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -145,27 +131,21 @@ __rtx_alias_unset_cmd() { __rtx_asdf_cmd() { _arguments -s -S \ '*::args:_cmdambivalent' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_bin_paths_cmd] )) || __rtx_bin_paths_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_cache_cmd] )) || __rtx_cache_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_cache_cmds' \ @@ -186,9 +166,7 @@ return ret __rtx_cache_clear_cmd() { _arguments -s -S \ '*::plugin:__rtx_plugins' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -196,9 +174,7 @@ __rtx_cache_clear_cmd() { __rtx_completion_cmd() { _arguments -s -S \ '::shell:(bash fish zsh)' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -206,27 +182,21 @@ __rtx_completion_cmd() { __rtx_current_cmd() { _arguments -s -S \ '::plugin:__rtx_plugins' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_deactivate_cmd] )) || __rtx_deactivate_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_direnv_cmd] )) || __rtx_direnv_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_direnv_cmds' \ @@ -248,36 +218,28 @@ return ret (( $+functions[__rtx_direnv_activate_cmd] )) || __rtx_direnv_activate_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_direnv_envrc_cmd] )) || __rtx_direnv_envrc_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_direnv_exec_cmd] )) || __rtx_direnv_exec_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_doctor_cmd] )) || __rtx_doctor_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -286,10 +248,10 @@ __rtx_env_cmd() { _arguments -s -S \ '(-s --shell)'{-s,--shell}'=[Shell type to generate environment variables for]:shell:(bash fish nu xonsh zsh)' \ '*::tool:__rtx_tool_versions' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ '(-J --json)'{-J,--json}'[Output in JSON format]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -299,9 +261,7 @@ __rtx_env_vars_cmd() { '--file=[The TOML file to update]:file:_files' \ '*--remove=[Remove the environment variable from config file]:remove:' \ '*::env_vars:' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -311,9 +271,9 @@ __rtx_exec_cmd() { '*::tool:__rtx_tool_versions' \ '(-c --command)'{-c,--command}'=[Command string to execute]:c:_cmdstring' \ '(-C --cd)'{-C,--cd}'=[Change to this directory before executing the command]:cd:_directories' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -325,9 +285,7 @@ __rtx_global_cmd() { '--fuzzy[Save fuzzy version to \`~/.tool-versions\`]' \ '*--remove=[Remove the plugin(s) from ~/.tool-versions]:remove:' \ '--path[Get the path of the global config file]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -336,9 +294,7 @@ __rtx_hook_env_cmd() { _arguments -s -S \ '(-s --shell)'{-s,--shell}'=[Shell type to generate script for]:shell:(bash fish nu xonsh zsh)' \ '--status[Show "rtx\: @" message when changing directories]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -347,9 +303,7 @@ __rtx_implode_cmd() { _arguments -s -S \ '--config[Also remove config directory]' \ '(-n --dry-run)'{-n,--dry-run}'[List directories that would be removed without actually removing them]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -358,10 +312,10 @@ __rtx_install_cmd() { _arguments -s -S \ '*::tool:__rtx_tool_versions' \ '(-f --force)'{-f,--force}'[Force reinstall even if already installed]' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ '*'{-v,--verbose}'[Show installation output]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_latest_cmd] )) || @@ -369,9 +323,7 @@ __rtx_latest_cmd() { _arguments -s -S \ ':tool:__rtx_tool_versions' \ '(-i --installed)'{-i,--installed}'[Show latest installed instead of available version]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -381,9 +333,7 @@ __rtx_link_cmd() { ':tool:__rtx_tool_versions' \ ':path:_directories' \ '(-f --force)'{-f,--force}'[Overwrite an existing tool version if it exists]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -396,9 +346,7 @@ __rtx_local_cmd() { '--fuzzy[Save fuzzy version to \`.tool-versions\` e.g.\: \`rtx local --fuzzy node@20\` will save \`node 20\` to .tool-versions This is the default behavior unless RTX_ASDF_COMPAT=1]' \ '*--remove=[Remove the plugin(s) from .tool-versions]:remove:' \ '--path[Get the path of the config file]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -412,9 +360,7 @@ __rtx_ls_cmd() { '(-J --json)'{-J,--json}'[Output in json format]' \ '(-m --missing)'{-m,--missing}'[Display missing tool versions]' \ '--prefix=[Display versions matching this prefix]:prefix:__rtx_prefixes' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -424,9 +370,7 @@ __rtx_ls_remote_cmd() { '::plugin:__rtx_plugins' \ '--all[Show all installed plugins and versions]' \ '::prefix:__rtx_prefixes' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -434,9 +378,7 @@ __rtx_ls_remote_cmd() { __rtx_outdated_cmd() { _arguments -s -S \ '*::tool:__rtx_tool_versions' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -447,9 +389,7 @@ __rtx_plugins_cmd() { '--user[List installed plugins]' \ '(-u --urls)'{-u,--urls}'[show the git url for each plugin]' \ '--refs[show the git refs for each plugin]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_plugins_cmds' \ @@ -479,9 +419,7 @@ __rtx_plugins_install_cmd() { '(-f --force)'{-f,--force}'[Reinstall even if plugin exists]' \ '(-a --all)'{-a,--all}'[Install all missing plugins]' \ '*'{-v,--verbose}'[Show installation output]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_plugins_link_cmd] )) || @@ -490,9 +428,7 @@ __rtx_plugins_link_cmd() { ':name:' \ '::path:_directories' \ '(-f --force)'{-f,--force}'[Overwrite existing plugin]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -503,9 +439,7 @@ __rtx_plugins_ls_cmd() { '--user[List installed plugins]' \ '(-u --urls)'{-u,--urls}'[Show the git url for each plugin]' \ '--refs[Show the git refs for each plugin]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -514,9 +448,7 @@ __rtx_plugins_ls_remote_cmd() { _arguments -s -S \ '(-u --urls)'{-u,--urls}'[Show the git url for each plugin e.g.\: https\://github.com/rtx-plugins/rtx-nodejs.git]' \ '--only-names[Only show the name of each plugin by default it will show a "*" next to installed plugins]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -526,9 +458,7 @@ __rtx_plugins_uninstall_cmd() { '*::plugin:__rtx_plugins' \ '(-p --purge)'{-p,--purge}'[Also remove the plugin'\''s installs, downloads, and cache]' \ '(-a --all)'{-a,--all}'[Remove all plugins]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -536,9 +466,7 @@ __rtx_plugins_uninstall_cmd() { __rtx_plugins_update_cmd() { _arguments -s -S \ '*::plugin:__rtx_plugins' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -547,18 +475,14 @@ __rtx_prune_cmd() { _arguments -s -S \ '*::plugin:__rtx_plugins' \ '(-n --dry-run)'{-n,--dry-run}'[Do not actually delete anything]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_reshim_cmd] )) || __rtx_reshim_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -569,17 +493,13 @@ __rtx_self_update_cmd() { '--no-plugins[Disable auto-updating plugins]' \ '(-y --yes)'{-y,--yes}'[Skip confirmation prompt]' \ '::version:' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' } (( $+functions[__rtx_settings_cmd] )) || __rtx_settings_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_settings_cmds' \ @@ -603,18 +523,14 @@ return ret __rtx_settings_get_cmd() { _arguments -s -S \ ':setting:__rtx_settings' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_settings_ls_cmd] )) || __rtx_settings_ls_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -623,9 +539,7 @@ __rtx_settings_set_cmd() { _arguments -s -S \ ':setting:__rtx_settings' \ ':value:' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -633,9 +547,7 @@ __rtx_settings_set_cmd() { __rtx_settings_unset_cmd() { _arguments -s -S \ ':setting:__rtx_settings' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -643,19 +555,17 @@ __rtx_settings_unset_cmd() { __rtx_shell_cmd() { _arguments -s -S \ '*::tool:__rtx_tool_versions' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ '(-u --unset)'{-u,--unset}'[Removes a previously set version]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_sync_cmd] )) || __rtx_sync_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' \ '1: :__rtx_sync_cmds' \ @@ -679,9 +589,7 @@ __rtx_sync_node_cmd() { '--brew[Get tool versions from Homebrew]' \ '--nvm[Get tool versions from nvm]' \ '--nodenv[Get tool versions from nodenv]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -689,9 +597,7 @@ __rtx_sync_node_cmd() { __rtx_sync_python_cmd() { _arguments -s -S \ '--pyenv[Get tool versions from pyenv]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -700,9 +606,7 @@ __rtx_trust_cmd() { _arguments -s -S \ '::config_file:_files' \ '--untrust[No longer trust this config]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -712,9 +616,7 @@ __rtx_uninstall_cmd() { '*::installed_tool:__rtx_installed_tool_versions' \ '(-a --all)'{-a,--all}'[Delete all installed versions]' \ '(-n --dry-run)'{-n,--dry-run}'[Do not actually delete anything]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -723,9 +625,9 @@ __rtx_upgrade_cmd() { _arguments -s -S \ '*::tool:__rtx_tool_versions' \ '(-n --dry-run)'{-n,--dry-run}'[Just print what would be done, don'\''t actually do it]' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -733,24 +635,23 @@ __rtx_upgrade_cmd() { __rtx_use_cmd() { _arguments -s -S \ '*::tool:__rtx_tool_versions' \ - '--pin[Save exact version to config file]' \ + '(-f --force)'{-f,--force}'[Force reinstall even if already installed]' \ '--fuzzy[Save fuzzy version to config file]' \ - '*--remove=[Remove the tool(s) from config file]:remove:' \ '(-g --global)'{-g,--global}'[Use the global config file (~/.config/rtx/config.toml) instead of the local one]' \ '(-e --env)'{-e,--env}'=[Modify an environment-specific config file like .rtx..toml]:env:' \ + '(-j --jobs)'{-j,--jobs}'=[Number of jobs to run in parallel]:jobs:' \ + '--raw[Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1]' \ + '*--remove=[Remove the tool(s) from config file]:remove:' \ '(-p --path)'{-p,--path}'=[Specify a path to a config file or directory If a directory is specified, it will look for .rtx.toml (default) or .tool-versions]:path:_files' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ + '--pin[Save exact version to config file]' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } (( $+functions[__rtx_version_cmd] )) || __rtx_version_cmd() { _arguments -s -S \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -758,9 +659,7 @@ __rtx_version_cmd() { __rtx_where_cmd() { _arguments -s -S \ ':tool:__rtx_tool_versions' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } @@ -771,9 +670,7 @@ __rtx_which_cmd() { '--plugin[Show the plugin name instead of the path]' \ '--version[Show the version instead of the path]' \ '(-t --tool)'{-t,--tool}'=[Use a specific tool@version]:tool:__rtx_tool_versions' \ - '(-j --jobs)'{-j,--jobs}'=[Number of plugins and runtimes to install in parallel]:jobs:' \ '(-q --quiet)'{-q,--quiet}'[Suppress output]' \ - '(-r --raw)'{-r,--raw}'[Directly pipe stdin/stdout/stderr to user.]' \ '*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \ '(-y --yes)'{-y,--yes}'[Answer yes to all prompts]' } diff --git a/completions/rtx.bash b/completions/rtx.bash index 94e321304..bfb1a55bf 100644 --- a/completions/rtx.bash +++ b/completions/rtx.bash @@ -559,20 +559,12 @@ _rtx() { case "${cmd}" in rtx) - opts="-j -q -r -v -y -h -V --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help --version activate alias asdf bin-paths cache completion current deactivate direnv doctor env env-vars exec global hook-env implode install latest link local ls ls-remote outdated plugins prune reshim settings shell sync trust uninstall upgrade use version where which render-completion render-help render-mangen self-update help" + opts="-q -v -y -h -V --debug --log-level --trace --quiet --verbose --yes --help --version activate alias asdf bin-paths cache completion current deactivate direnv doctor env env-vars exec global hook-env implode install latest link local ls ls-remote outdated plugins prune reshim settings shell sync trust uninstall upgrade use version where which render-completion render-help render-mangen self-update help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -585,7 +577,7 @@ _rtx() { return 0 ;; rtx__activate) - opts="-s -q -j -r -v -y -h --shell --status --quiet --jobs --debug --log-level --trace --raw --verbose --yes --help bash fish nu xonsh zsh" + opts="-s -q -v -y -h --shell --status --quiet --debug --log-level --trace --verbose --yes --help bash fish nu xonsh zsh" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -599,14 +591,6 @@ _rtx() { COMPREPLY=($(compgen -W "bash fish nu xonsh zsh" -- "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -619,7 +603,7 @@ _rtx() { return 0 ;; rtx__alias) - opts="-p -j -q -r -v -y -h --plugin --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help get ls set unset help" + opts="-p -q -v -y -h --plugin --debug --log-level --trace --quiet --verbose --yes --help get ls set unset help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -633,14 +617,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -653,20 +629,12 @@ _rtx() { return 0 ;; rtx__alias__get) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -763,20 +731,12 @@ _rtx() { return 0 ;; rtx__alias__ls) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -789,20 +749,12 @@ _rtx() { return 0 ;; rtx__alias__set) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -815,20 +767,12 @@ _rtx() { return 0 ;; rtx__alias__unset) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -841,20 +785,12 @@ _rtx() { return 0 ;; rtx__asdf) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [ARGS]..." + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -867,20 +803,12 @@ _rtx() { return 0 ;; rtx__bin__paths) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -893,20 +821,12 @@ _rtx() { return 0 ;; rtx__cache) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help clear help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help clear help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -919,20 +839,12 @@ _rtx() { return 0 ;; rtx__cache__clear) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]..." + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -987,7 +899,7 @@ _rtx() { return 0 ;; rtx__completion) - opts="-s -j -q -r -v -y -h --shell --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help bash fish zsh" + opts="-s -q -v -y -h --shell --debug --log-level --trace --quiet --verbose --yes --help bash fish zsh" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1001,14 +913,6 @@ _rtx() { COMPREPLY=($(compgen -W "bash fish zsh" -- "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1021,20 +925,12 @@ _rtx() { return 0 ;; rtx__current) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1047,20 +943,12 @@ _rtx() { return 0 ;; rtx__deactivate) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1073,20 +961,12 @@ _rtx() { return 0 ;; rtx__direnv) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help envrc exec activate help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help envrc exec activate help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1099,20 +979,12 @@ _rtx() { return 0 ;; rtx__direnv__activate) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1125,20 +997,12 @@ _rtx() { return 0 ;; rtx__direnv__envrc) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1151,20 +1015,12 @@ _rtx() { return 0 ;; rtx__direnv__exec) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1247,20 +1103,12 @@ _rtx() { return 0 ;; rtx__doctor) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1273,7 +1121,7 @@ _rtx() { return 0 ;; rtx__env) - opts="-s -J -j -q -r -v -y -h --shell --json --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-s -j -J -q -v -y -h --shell --jobs --json --raw --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1307,7 +1155,7 @@ _rtx() { return 0 ;; rtx__env__vars) - opts="-j -q -r -v -y -h --file --remove --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [ENV_VARS]..." + opts="-q -v -y -h --file --remove --debug --log-level --trace --quiet --verbose --yes --help [ENV_VARS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1321,14 +1169,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -1341,7 +1181,7 @@ _rtx() { return 0 ;; rtx__exec) - opts="-c -C -j -q -r -v -y -h --command --cd --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]... [COMMAND]..." + opts="-c -C -j -q -v -y -h --command --cd --jobs --raw --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]... [COMMAND]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1383,7 +1223,7 @@ _rtx() { return 0 ;; rtx__global) - opts="-j -q -r -v -y -h --pin --fuzzy --remove --path --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-q -v -y -h --pin --fuzzy --remove --path --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1393,14 +1233,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2281,7 +2113,7 @@ _rtx() { return 0 ;; rtx__hook__env) - opts="-s -j -q -r -v -y -h --shell --status --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-s -q -v -y -h --shell --status --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2295,14 +2127,6 @@ _rtx() { COMPREPLY=($(compgen -W "bash fish nu xonsh zsh" -- "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2315,20 +2139,12 @@ _rtx() { return 0 ;; rtx__implode) - opts="-n -j -q -r -v -y -h --config --dry-run --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-n -q -v -y -h --config --dry-run --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2341,7 +2157,7 @@ _rtx() { return 0 ;; rtx__install) - opts="-f -v -j -q -r -y -h --force --verbose --jobs --debug --log-level --trace --quiet --raw --yes --help [TOOL@VERSION]..." + opts="-f -j -v -q -y -h --force --jobs --raw --verbose --debug --log-level --trace --quiet --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2367,20 +2183,12 @@ _rtx() { return 0 ;; rtx__latest) - opts="-i -j -q -r -v -y -h --installed --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [ASDF_VERSION]" + opts="-i -q -v -y -h --installed --debug --log-level --trace --quiet --verbose --yes --help [ASDF_VERSION]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2393,20 +2201,12 @@ _rtx() { return 0 ;; rtx__link) - opts="-f -j -q -r -v -y -h --force --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-f -q -v -y -h --force --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2419,7 +2219,7 @@ _rtx() { return 0 ;; rtx__local) - opts="-p -j -q -r -v -y -h --parent --pin --fuzzy --remove --path --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-p -q -v -y -h --parent --pin --fuzzy --remove --path --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2429,14 +2229,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2449,7 +2241,7 @@ _rtx() { return 0 ;; rtx__ls) - opts="-p -c -g -i -J -m -j -q -r -v -y -h --plugin --current --global --installed --parseable --json --missing --prefix --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]..." + opts="-p -c -g -i -J -m -q -v -y -h --plugin --current --global --installed --parseable --json --missing --prefix --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2467,14 +2259,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2487,20 +2271,12 @@ _rtx() { return 0 ;; rtx__ls__remote) - opts="-j -q -r -v -y -h --all --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION] [PREFIX]" + opts="-q -v -y -h --all --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION] [PREFIX]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2513,20 +2289,12 @@ _rtx() { return 0 ;; rtx__outdated) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2539,20 +2307,12 @@ _rtx() { return 0 ;; rtx__plugins) - opts="-a -c -u -j -q -r -v -y -h --all --core --user --urls --refs --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help install link ls ls-remote uninstall update help" + opts="-a -c -u -q -v -y -h --all --core --user --urls --refs --debug --log-level --trace --quiet --verbose --yes --help install link ls ls-remote uninstall update help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2677,20 +2437,12 @@ _rtx() { return 0 ;; rtx__plugins__install) - opts="-f -a -v -j -q -r -y -h --force --all --verbose --jobs --debug --log-level --trace --quiet --raw --yes --help [NEW_PLUGIN] [GIT_URL] [REST]..." + opts="-f -a -v -q -y -h --force --all --verbose --debug --log-level --trace --quiet --yes --help [NEW_PLUGIN] [GIT_URL] [REST]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2703,20 +2455,12 @@ _rtx() { return 0 ;; rtx__plugins__link) - opts="-f -j -q -r -v -y -h --force --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PATH]" + opts="-f -q -v -y -h --force --debug --log-level --trace --quiet --verbose --yes --help [PATH]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2729,20 +2473,12 @@ _rtx() { return 0 ;; rtx__plugins__ls) - opts="-a -c -u -j -q -r -v -y -h --all --core --user --urls --refs --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-a -c -u -q -v -y -h --all --core --user --urls --refs --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2755,20 +2491,12 @@ _rtx() { return 0 ;; rtx__plugins__ls__remote) - opts="-u -j -q -r -v -y -h --urls --only-names --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-u -q -v -y -h --urls --only-names --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2781,20 +2509,12 @@ _rtx() { return 0 ;; rtx__plugins__uninstall) - opts="-p -a -j -q -r -v -y -h --purge --all --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]..." + opts="-p -a -q -v -y -h --purge --all --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2807,20 +2527,12 @@ _rtx() { return 0 ;; rtx__plugins__update) - opts="-a -j -q -r -v -y -h --all --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]..." + opts="-a -q -v -y -h --all --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2833,20 +2545,12 @@ _rtx() { return 0 ;; rtx__prune) - opts="-n -j -q -r -v -y -h --dry-run --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN]..." + opts="-n -q -v -y -h --dry-run --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2859,7 +2563,7 @@ _rtx() { return 0 ;; rtx__render__completion) - opts="-s -j -q -r -v -y -h --shell --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help bash elvish fish powershell zsh" + opts="-s -q -v -y -h --shell --debug --log-level --trace --quiet --verbose --yes --help bash elvish fish powershell zsh" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2873,14 +2577,6 @@ _rtx() { COMPREPLY=($(compgen -W "bash elvish fish powershell zsh" -- "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2893,20 +2589,12 @@ _rtx() { return 0 ;; rtx__render__help) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2919,20 +2607,12 @@ _rtx() { return 0 ;; rtx__render__mangen) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2945,20 +2625,12 @@ _rtx() { return 0 ;; rtx__reshim) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [PLUGIN] [VERSION]" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [PLUGIN] [VERSION]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2971,20 +2643,12 @@ _rtx() { return 0 ;; rtx__self__update) - opts="-f -y -j -q -r -v -h --force --no-plugins --yes --jobs --debug --log-level --trace --quiet --raw --verbose --help [VERSION]" + opts="-f -y -q -v -h --force --no-plugins --yes --debug --log-level --trace --quiet --verbose --help [VERSION]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -2997,20 +2661,12 @@ _rtx() { return 0 ;; rtx__settings) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help get ls set unset help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help get ls set unset help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3023,20 +2679,12 @@ _rtx() { return 0 ;; rtx__settings__get) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3133,20 +2781,12 @@ _rtx() { return 0 ;; rtx__settings__ls) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3159,20 +2799,12 @@ _rtx() { return 0 ;; rtx__settings__set) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3185,20 +2817,12 @@ _rtx() { return 0 ;; rtx__settings__unset) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3211,7 +2835,7 @@ _rtx() { return 0 ;; rtx__shell) - opts="-u -j -q -r -v -y -h --unset --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-j -u -q -v -y -h --jobs --raw --unset --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3237,20 +2861,12 @@ _rtx() { return 0 ;; rtx__sync) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help node python help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help node python help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3319,20 +2935,12 @@ _rtx() { return 0 ;; rtx__sync__node) - opts="-j -q -r -v -y -h --brew --nvm --nodenv --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --brew --nvm --nodenv --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3345,20 +2953,12 @@ _rtx() { return 0 ;; rtx__sync__python) - opts="-j -q -r -v -y -h --pyenv --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --pyenv --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3371,20 +2971,12 @@ _rtx() { return 0 ;; rtx__trust) - opts="-j -q -r -v -y -h --untrust --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [CONFIG_FILE]" + opts="-q -v -y -h --untrust --debug --log-level --trace --quiet --verbose --yes --help [CONFIG_FILE]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3397,20 +2989,12 @@ _rtx() { return 0 ;; rtx__uninstall) - opts="-a -n -j -q -r -v -y -h --all --dry-run --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-a -n -q -v -y -h --all --dry-run --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3423,7 +3007,7 @@ _rtx() { return 0 ;; rtx__upgrade) - opts="-n -j -q -r -v -y -h --dry-run --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-n -j -q -v -y -h --dry-run --jobs --raw --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3449,37 +3033,37 @@ _rtx() { return 0 ;; rtx__use) - opts="-g -e -p -j -q -r -v -y -h --pin --fuzzy --remove --global --env --path --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [TOOL@VERSION]..." + opts="-f -g -e -j -p -q -v -y -h --force --fuzzy --global --env --jobs --raw --remove --path --pin --debug --log-level --trace --quiet --verbose --yes --help [TOOL@VERSION]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --remove) + --env) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --env) + -e) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -e) + --jobs) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --path) + -j) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -p) + --remove) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) + --path) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -j) + -p) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -3495,20 +3079,12 @@ _rtx() { return 0 ;; rtx__version) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3521,20 +3097,12 @@ _rtx() { return 0 ;; rtx__where) - opts="-j -q -r -v -y -h --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help [ASDF_VERSION]" + opts="-q -v -y -h --debug --log-level --trace --quiet --verbose --yes --help [ASDF_VERSION]" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 @@ -3547,7 +3115,7 @@ _rtx() { return 0 ;; rtx__which) - opts="-t -j -q -r -v -y -h --plugin --version --tool --jobs --debug --log-level --trace --quiet --raw --verbose --yes --help " + opts="-t -q -v -y -h --plugin --version --tool --debug --log-level --trace --quiet --verbose --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3561,14 +3129,6 @@ _rtx() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --jobs) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -j) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --log-level) COMPREPLY=($(compgen -W "error warn info debug trace" -- "${cur}")) return 0 diff --git a/completions/rtx.fish b/completions/rtx.fish index bd0221f60..7c515a3fa 100644 --- a/completions/rtx.fish +++ b/completions/rtx.fish @@ -1,9 +1,7 @@ set -l fssf "__fish_seen_subcommand_from" # rtx -complete -kxc rtx -s j -l jobs -d 'Number of plugins and runtimes to install in parallel' complete -kxc rtx -s q -l quiet -d 'Suppress output' -complete -kxc rtx -s r -l raw -d 'Directly pipe stdin/stdout/stderr to user.' complete -kxc rtx -s v -l verbose -d 'Show extra output (use -vv for even more)' complete -kxc rtx -s y -l yes -d 'Answer yes to all prompts' set -l others activate alias bin-paths cache completion current deactivate direnv doctor env env-vars exec implode install latest link ls ls-remote outdated plugins prune reshim self-update settings shell sync trust uninstall upgrade use version where which @@ -98,7 +96,9 @@ complete -xc rtx -n "$fssf direnv; and not $fssf $others" -a activate -d 'Output # doctor # env +complete -kxc rtx -n "$fssf env" -s j -l jobs -d 'Number of jobs to run in parallel' complete -kxc rtx -n "$fssf env" -s J -l json -d 'Output in JSON format' +complete -kxc rtx -n "$fssf env" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf env" -s s -l shell -a "bash fish nu xonsh zsh" -d 'Shell type to generate environment variables for' complete -kxc rtx -n "$fssf env" -a "(__rtx_tool_versions)" -d 'Tool(s) to use' @@ -111,6 +111,8 @@ complete -kxc rtx -n "$fssf env-vars" -l remove -d 'Remove the environment varia complete -kxc rtx -n "$fssf exec" -s c -l command -d 'Command string to execute' complete -kxc rtx -n "$fssf exec" -s C -l cd -a "(__fish_complete_directories)" -d 'Change to this directory before executing the command' complete -kxc rtx -n "$fssf exec" -d 'Command string to execute (same as --command)' +complete -kxc rtx -n "$fssf exec" -s j -l jobs -d 'Number of jobs to run in parallel' +complete -kxc rtx -n "$fssf exec" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf exec" -a "(__rtx_tool_versions)" -d 'Tool(s) to start e.g.: node@20 python@3.10' # implode @@ -119,6 +121,8 @@ complete -kxc rtx -n "$fssf implode" -s n -l dry-run -d 'List directories that w # install complete -kxc rtx -n "$fssf install" -s f -l force -d 'Force reinstall even if already installed' +complete -kxc rtx -n "$fssf install" -s j -l jobs -d 'Number of jobs to run in parallel' +complete -kxc rtx -n "$fssf install" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf install" -a "(__rtx_tool_versions)" -d 'Tool(s) to install e.g.: node@20' complete -kxc rtx -n "$fssf install" -s v -l verbose -d 'Show installation output' @@ -225,6 +229,8 @@ complete -kxc rtx -n "$fssf settings; and $fssf unset" -a "(__rtx_settings)" -d # shell +complete -kxc rtx -n "$fssf shell" -s j -l jobs -d 'Number of jobs to run in parallel' +complete -kxc rtx -n "$fssf shell" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf shell" -a "(__rtx_tool_versions)" -d 'Tool(s) to use' complete -kxc rtx -n "$fssf shell" -s u -l unset -d 'Removes a previously set version' @@ -253,14 +259,19 @@ complete -kxc rtx -n "$fssf uninstall" -a "(__rtx_installed_tool_versions)" -d ' # upgrade complete -kxc rtx -n "$fssf upgrade" -s n -l dry-run -d 'Just print what would be done, don'\''t actually do it' +complete -kxc rtx -n "$fssf upgrade" -s j -l jobs -d 'Number of jobs to run in parallel' +complete -kxc rtx -n "$fssf upgrade" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf upgrade" -a "(__rtx_tool_versions)" -d 'Tool(s) to upgrade' # use complete -kxc rtx -n "$fssf use" -s e -l env -d 'Modify an environment-specific config file like .rtx..toml' +complete -kxc rtx -n "$fssf use" -s f -l force -d 'Force reinstall even if already installed' complete -kxc rtx -n "$fssf use" -l fuzzy -d 'Save fuzzy version to config file' complete -kxc rtx -n "$fssf use" -s g -l global -d 'Use the global config file (~/.config/rtx/config.toml) instead of the local one' +complete -kxc rtx -n "$fssf use" -s j -l jobs -d 'Number of jobs to run in parallel' complete -kxc rtx -n "$fssf use" -s p -l path -a "(__fish_complete_path)" -d 'Specify a path to a config file or directory If a directory is specified, it will look for .rtx.toml (default) or .tool-versions' complete -kxc rtx -n "$fssf use" -l pin -d 'Save exact version to config file' +complete -kxc rtx -n "$fssf use" -l raw -d 'Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1' complete -kxc rtx -n "$fssf use" -l remove -d 'Remove the tool(s) from config file' complete -kxc rtx -n "$fssf use" -a "(__rtx_tool_versions)" -d 'Tool(s) to add to config file' diff --git a/e2e/test_local b/e2e/test_local index 8670e1ac5..d0e720cfa 100755 --- a/e2e/test_local +++ b/e2e/test_local @@ -16,7 +16,7 @@ assert_raises() { fi } -assert_raises "rtx uninstall shfmt@3.6.0" +rtx i shfmt@3.6.0 shfmt@3.5.0 assert "rtx local" "#:schema ../../schema/rtx.json env_file = '.test-env' @@ -57,8 +57,6 @@ if [[ "$(rtx exec -- shfmt --version)" != "v3.5.0" ]]; then exit 1 fi -assert_raises "rtx uninstall shfmt@3.6.0" - rtx local shfmt@3.6.0 assert "rtx local" "#:schema ../../schema/rtx.json env_file = '.test-env' @@ -101,8 +99,6 @@ tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#df03b6719dd465d565bb6627394 export RTX_DEFAULT_CONFIG_FILENAME=.MISSING -assert_raises "rtx uninstall shfmt@3.6.0" - rtx local assert "rtx local" "#python 3.11.1 3.10.9 # foo shellcheck sub-0.1:0.10.0 diff --git a/src/cli/args/jobs.rs b/src/cli/args/jobs.rs deleted file mode 100644 index f22faa239..000000000 --- a/src/cli/args/jobs.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::num::ParseIntError; - -use clap::builder::ValueParser; -use clap::Arg; - -#[derive(Clone)] -pub struct Jobs(pub usize); - -fn parse_jobs(input: &str) -> Result { - input.parse::() -} - -impl Jobs { - pub fn arg() -> clap::Arg { - Arg::new("jobs") - .short('j') - .long("jobs") - .help("Number of plugins and runtimes to install in parallel\n[default: 4]") - .value_parser(ValueParser::new(parse_jobs)) - .global(true) - } -} diff --git a/src/cli/args/mod.rs b/src/cli/args/mod.rs index 248528581..30ecb9d08 100644 --- a/src/cli/args/mod.rs +++ b/src/cli/args/mod.rs @@ -1,8 +1,6 @@ pub mod env_var; -pub mod jobs; pub mod log_level; pub mod quiet; -pub mod raw; pub mod tool; pub mod verbose; pub mod yes; diff --git a/src/cli/args/raw.rs b/src/cli/args/raw.rs deleted file mode 100644 index 60670c50a..000000000 --- a/src/cli/args/raw.rs +++ /dev/null @@ -1,14 +0,0 @@ -use clap::{Arg, ArgAction}; - -pub struct Raw(pub bool); - -impl Raw { - pub fn arg() -> Arg { - Arg::new("raw") - .short('r') - .long("raw") - .help("Directly pipe stdin/stdout/stderr to user.\nSets --jobs=1") - .action(ArgAction::SetTrue) - .global(true) - } -} diff --git a/src/cli/env.rs b/src/cli/env.rs index b48deb182..36ee4ce1b 100644 --- a/src/cli/env.rs +++ b/src/cli/env.rs @@ -4,7 +4,7 @@ use crate::cli::args::tool::{ToolArg, ToolArgParser}; use crate::config::Config; use crate::shell::{get_shell, ShellType}; -use crate::toolset::{Toolset, ToolsetBuilder}; +use crate::toolset::{InstallOptions, Toolset, ToolsetBuilder}; /// Exports env vars to activate rtx a single time /// @@ -21,15 +21,33 @@ pub struct Env { #[clap(value_name = "TOOL@VERSION", value_parser = ToolArgParser)] tool: Vec, + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + jobs: Option, + /// Output in JSON format #[clap(long, short = 'J', overrides_with = "shell")] json: bool, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + raw: bool, } impl Env { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } let mut ts = ToolsetBuilder::new().with_args(&self.tool).build(&config)?; - ts.install_arg_versions(&config)?; + let opts = InstallOptions { + force: false, + jobs: self.jobs, + raw: self.raw, + }; + ts.install_arg_versions(&config, &opts)?; if self.json { self.output_json(config, ts) diff --git a/src/cli/exec.rs b/src/cli/exec.rs index 6dfbed2ab..15fb18288 100644 --- a/src/cli/exec.rs +++ b/src/cli/exec.rs @@ -12,7 +12,7 @@ use crate::cmd; use crate::config::Config; use crate::env; -use crate::toolset::ToolsetBuilder; +use crate::toolset::{InstallOptions, ToolsetBuilder}; /// Execute a command with tool(s) set /// @@ -42,12 +42,30 @@ pub struct Exec { /// Change to this directory before executing the command #[clap(short = 'C', value_hint = ValueHint::DirPath, long)] pub cd: Option, + + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + pub jobs: Option, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + pub raw: bool, } impl Exec { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } let mut ts = ToolsetBuilder::new().with_args(&self.tool).build(&config)?; - ts.install_arg_versions(&config)?; + let opts = InstallOptions { + force: false, + jobs: self.jobs, + raw: self.raw, + }; + ts.install_arg_versions(&config, &opts)?; let (program, args) = parse_command(&env::SHELL, &self.command, &self.c); let env = ts.env_with_path(&config); diff --git a/src/cli/install.rs b/src/cli/install.rs index b77419041..3c98a9746 100644 --- a/src/cli/install.rs +++ b/src/cli/install.rs @@ -4,7 +4,7 @@ use crate::cli::args::tool::{ToolArg, ToolArgParser}; use crate::config::Config; use crate::toolset::{ - ToolVersion, ToolVersionOptions, ToolVersionRequest, Toolset, ToolsetBuilder, + InstallOptions, ToolVersion, ToolVersionOptions, ToolVersionRequest, Toolset, ToolsetBuilder, }; use crate::ui::multi_progress_report::MultiProgressReport; @@ -28,13 +28,26 @@ pub struct Install { #[clap(long, short, requires = "tool")] force: bool, + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + jobs: Option, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + raw: bool, + /// Show installation output #[clap(long, short, action = clap::ArgAction::Count)] verbose: u8, } impl Install { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } match &self.tool { Some(runtime) => self.install_runtimes(config, runtime)?, None => self.install_missing_runtimes(config)?, @@ -53,7 +66,15 @@ impl Install { warn!("specify a version with `rtx install @`"); return Ok(()); } - ts.install_versions(&config, tool_versions, &mpr, self.force) + ts.install_versions(&config, tool_versions, &mpr, &self.install_opts()) + } + + fn install_opts(&self) -> InstallOptions { + InstallOptions { + force: self.force, + jobs: self.jobs, + raw: self.raw, + } } fn get_requested_tool_versions( @@ -116,7 +137,7 @@ impl Install { return Ok(()); } let mpr = MultiProgressReport::new(&config.settings); - ts.install_versions(&config, versions, &mpr, self.force)?; + ts.install_versions(&config, versions, &mpr, &self.install_opts())?; Ok(()) } } diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 22f6eb69f..831ea4f7c 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -185,12 +185,10 @@ impl Cli { .arg_required_else_help(true) .subcommand_required(true) .after_long_help(AFTER_LONG_HELP) - .arg(args::jobs::Jobs::arg()) .arg(args::log_level::Debug::arg()) .arg(args::log_level::LogLevel::arg()) .arg(args::log_level::Trace::arg()) .arg(args::quiet::Quiet::arg()) - .arg(args::raw::Raw::arg()) .arg(args::verbose::Verbose::arg()) .arg(args::yes::Yes::arg()), ) @@ -203,12 +201,6 @@ impl Cli { return version::Version {}.run(config); } let matches = self.command.get_matches_from(args); - if let Some(jobs) = matches.get_one::("jobs") { - config.settings.jobs = *jobs; - } - if let Some(raw) = matches.get_one::("raw") { - config.settings.raw = *raw; - } if let Some(true) = matches.get_one::("yes") { config.settings.yes = true; } diff --git a/src/cli/shell.rs b/src/cli/shell.rs index cddea016a..02062e05d 100644 --- a/src/cli/shell.rs +++ b/src/cli/shell.rs @@ -4,7 +4,7 @@ use console::style; use crate::cli::args::tool::{ToolArg, ToolArgParser}; use crate::config::Config; use crate::shell::get_shell; -use crate::toolset::{ToolSource, ToolsetBuilder}; +use crate::toolset::{InstallOptions, ToolSource, ToolsetBuilder}; /// Sets a tool version for the current shell session /// @@ -16,19 +16,37 @@ pub struct Shell { #[clap(value_name = "TOOL@VERSION", value_parser = ToolArgParser)] tool: Vec, + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + jobs: Option, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + raw: bool, + /// Removes a previously set version #[clap(long, short)] unset: bool, } impl Shell { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } if !config.is_activated() { err_inactive()?; } let mut ts = ToolsetBuilder::new().with_args(&self.tool).build(&config)?; - ts.install_arg_versions(&config)?; + let opts = InstallOptions { + force: false, + jobs: self.jobs, + raw: self.raw, + }; + ts.install_arg_versions(&config, &opts)?; let shell = get_shell(None).expect("no shell detected"); diff --git a/src/cli/upgrade.rs b/src/cli/upgrade.rs index 60c536b23..435534adb 100644 --- a/src/cli/upgrade.rs +++ b/src/cli/upgrade.rs @@ -10,7 +10,7 @@ use crate::config::Config; use crate::plugins::Plugin; use crate::runtime_symlinks; use crate::shims; -use crate::toolset::{ToolVersion, ToolsetBuilder}; +use crate::toolset::{InstallOptions, ToolVersion, ToolsetBuilder}; use crate::ui::multi_progress_report::MultiProgressReport; use crate::ui::progress_report::ProgressReport; @@ -27,10 +27,23 @@ pub struct Upgrade { /// Just print what would be done, don't actually do it #[clap(long, short = 'n', verbatim_doc_comment)] dry_run: bool, + + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + jobs: Option, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + raw: bool, } impl Upgrade { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } let mut ts = ToolsetBuilder::new().with_args(&self.tool).build(&config)?; let tool_set = self .tool @@ -77,7 +90,12 @@ impl Upgrade { } return Ok(()); } - ts.install_versions(config, new_versions, &mpr, false)?; + let opts = InstallOptions { + force: false, + jobs: self.jobs, + raw: self.raw, + }; + ts.install_versions(config, new_versions, &mpr, &opts)?; for (tool, tv) in to_remove { let mut pr = mpr.add(); self.uninstall_old_version(config, tool.clone(), &tv, &mut pr)?; diff --git a/src/cli/use.rs b/src/cli/use.rs index 78666f05a..f99a4ec33 100644 --- a/src/cli/use.rs +++ b/src/cli/use.rs @@ -11,7 +11,7 @@ use crate::env::{RTX_DEFAULT_CONFIG_FILENAME, RTX_DEFAULT_TOOL_VERSIONS_FILENAME use crate::file::display_path; use crate::plugins::PluginName; -use crate::toolset::ToolsetBuilder; +use crate::toolset::{InstallOptions, ToolsetBuilder}; use crate::{dirs, env, file}; /// Change the active version of a tool locally or globally. @@ -29,15 +29,9 @@ pub struct Use { #[clap(value_name = "TOOL@VERSION", value_parser = ToolArgParser, verbatim_doc_comment, required_unless_present = "remove")] tool: Vec, - /// Save exact version to config file - /// e.g.: `rtx use --pin node@20` will save 20.0.0 as the version - #[clap( - long, - env = "RTX_ASDF_COMPAT", - verbatim_doc_comment, - overrides_with = "fuzzy" - )] - pin: bool, + /// Force reinstall even if already installed + #[clap(long, short, requires = "tool")] + force: bool, /// Save fuzzy version to config file /// e.g.: `rtx use --fuzzy node@20` will save 20 as the version @@ -45,10 +39,6 @@ pub struct Use { #[clap(long, verbatim_doc_comment, overrides_with = "pin")] fuzzy: bool, - /// Remove the tool(s) from config file - #[clap(long, value_name = "TOOL", aliases = ["rm", "unset"])] - remove: Option>, - /// Use the global config file (~/.config/rtx/config.toml) instead of the local one #[clap(short, long, overrides_with_all = &["path", "env"])] global: bool, @@ -57,16 +47,49 @@ pub struct Use { #[clap(long, short, overrides_with_all = &["global", "path"])] env: Option, + /// Number of jobs to run in parallel + /// [default: 4] + #[clap(long, short, env = "RTX_JOBS", verbatim_doc_comment)] + jobs: Option, + + /// Directly pipe stdin/stdout/stderr from plugin to user + /// Sets --jobs=1 + #[clap(long, overrides_with = "jobs")] + raw: bool, + + /// Remove the tool(s) from config file + #[clap(long, value_name = "TOOL", aliases = ["rm", "unset"])] + remove: Option>, + /// Specify a path to a config file or directory /// If a directory is specified, it will look for .rtx.toml (default) or .tool-versions #[clap(short, long, overrides_with_all = &["global", "env"], value_hint = clap::ValueHint::FilePath)] path: Option, + + /// Save exact version to config file + /// e.g.: `rtx use --pin node@20` will save 20.0.0 as the version + #[clap( + long, + env = "RTX_ASDF_COMPAT", + verbatim_doc_comment, + overrides_with = "fuzzy" + )] + pin: bool, } impl Use { - pub fn run(self, config: Config) -> Result<()> { + pub fn run(self, mut config: Config) -> Result<()> { + if self.raw { + config.settings.raw = true; + } let mut ts = ToolsetBuilder::new().with_args(&self.tool).build(&config)?; - ts.install_arg_versions(&config)?; + + let opts = InstallOptions { + force: self.force, + jobs: self.jobs, + raw: self.raw, + }; + ts.install_arg_versions(&config, &opts)?; ts.versions .retain(|_, tvl| self.tool.iter().any(|t| t.plugin == tvl.plugin_name)); diff --git a/src/cli/which.rs b/src/cli/which.rs index c0aa7f4d4..cfcfd9f0c 100644 --- a/src/cli/which.rs +++ b/src/cli/which.rs @@ -73,26 +73,29 @@ mod tests { #[test] fn test_which() { - assert_cli!("global", "dummy@1.0.0"); + assert_cli!("use", "dummy@1.0.0"); assert_cli_snapshot!("which", "dummy"); - assert_cli!("global", "dummy@ref:master"); + assert_cli!("use", "dummy@ref:master"); assert_cli!("uninstall", "dummy@1.0.0"); + assert_cli!("use", "--rm", "dummy"); } #[test] fn test_which_plugin() { - assert_cli!("global", "dummy@1.0.0"); + assert_cli!("use", "dummy@1.0.0"); assert_cli_snapshot!("which", "--plugin", "dummy"); - assert_cli!("global", "dummy@ref:master"); + assert_cli!("use", "dummy@ref:master"); assert_cli!("uninstall", "dummy@1.0.0"); + assert_cli!("use", "--rm", "dummy"); } #[test] fn test_which_version() { - assert_cli!("global", "dummy@1.0.0"); + assert_cli!("use", "dummy@1.0.0"); assert_cli_snapshot!("which", "--version", "dummy"); - assert_cli!("global", "dummy@ref:master"); + assert_cli!("use", "dummy@ref:master"); assert_cli!("uninstall", "dummy@1.0.0"); + assert_cli!("use", "--rm", "dummy"); } #[test] diff --git a/src/config/config_file/mod.rs b/src/config/config_file/mod.rs index 3d1532572..620298d45 100644 --- a/src/config/config_file/mod.rs +++ b/src/config/config_file/mod.rs @@ -15,8 +15,7 @@ use crate::file::{display_path, replace_path}; use crate::hash::hash_to_str; use crate::plugins::PluginName; -use crate::toolset::{ToolVersion, ToolVersionList, Toolset}; -use crate::ui::multi_progress_report::MultiProgressReport; +use crate::toolset::{ToolVersionList, Toolset}; use crate::{dirs, env, file}; pub mod legacy_version; @@ -67,7 +66,6 @@ pub trait ConfigFile: Debug + Display + Send + Sync { impl dyn ConfigFile { pub fn add_runtimes(&mut self, config: &Config, runtimes: &[ToolArg], pin: bool) -> Result<()> { // TODO: this has become a complete mess and could probably be greatly simplified - let mpr = MultiProgressReport::new(&config.settings); let mut ts = self.to_toolset().to_owned(); ts.latest_versions = true; ts.resolve(config); @@ -89,11 +87,6 @@ impl dyn ConfigFile { ts.versions.insert(plugin.clone(), tvl); } ts.resolve(config); - let versions: Vec = plugins_to_update - .iter() - .flat_map(|(pn, _)| ts.versions.get(pn).unwrap().versions.clone()) - .collect(); - ts.install_versions(config, versions, &mpr, false)?; for (plugin, versions) in plugins_to_update { let versions = versions .into_iter() diff --git a/src/install_context.rs b/src/install_context.rs index 01c421d37..a3c150130 100644 --- a/src/install_context.rs +++ b/src/install_context.rs @@ -7,5 +7,6 @@ pub struct InstallContext<'a> { pub ts: &'a Toolset, pub tv: ToolVersion, pub pr: ProgressReport, + pub raw: bool, pub force: bool, } diff --git a/src/shims.rs b/src/shims.rs index 212ffc620..f66d58816 100644 --- a/src/shims.rs +++ b/src/shims.rs @@ -35,6 +35,8 @@ pub fn handle_shim(config: Config, args: &[String]) -> Result { c: None, command: Some(args), cd: None, + jobs: None, + raw: false, }; exec.run(config)?; exit(0); diff --git a/src/toolset/mod.rs b/src/toolset/mod.rs index f982ae9f3..9df025311 100644 --- a/src/toolset/mod.rs +++ b/src/toolset/mod.rs @@ -32,6 +32,13 @@ mod tool_version_request; pub type ToolVersionOptions = BTreeMap; +#[derive(Debug, Default)] +pub struct InstallOptions { + pub force: bool, + pub jobs: Option, + pub raw: bool, +} + /// a toolset is a collection of tools for various plugins /// /// one example is a .tool-versions file @@ -83,7 +90,7 @@ impl Toolset { .par_iter_mut() .for_each(|(_, v)| v.resolve(config, self.latest_versions)); } - pub fn install_arg_versions(&mut self, config: &Config) -> Result<()> { + pub fn install_arg_versions(&mut self, config: &Config, opts: &InstallOptions) -> Result<()> { let mpr = MultiProgressReport::new(&config.settings); let versions = self .list_missing_versions(config) @@ -91,7 +98,7 @@ impl Toolset { .filter(|tv| matches!(self.versions[&tv.plugin_name].source, ToolSource::Argument)) .cloned() .collect_vec(); - self.install_versions(config, versions, &mpr, false) + self.install_versions(config, versions, &mpr, opts) } pub fn list_missing_plugins(&self, config: &Config) -> Vec { @@ -108,7 +115,7 @@ impl Toolset { config: &Config, versions: Vec, mpr: &MultiProgressReport, - force: bool, + opts: &InstallOptions, ) -> Result<()> { if versions.is_empty() { return Ok(()); @@ -126,8 +133,9 @@ impl Toolset { } } let queue = Arc::new(Mutex::new(queue)); + let jobs = opts.jobs.unwrap_or(config.settings.jobs); thread::scope(|s| { - (0..config.settings.jobs) + (0..jobs) .map(|_| { let queue = queue.clone(); let ts = &*self; @@ -145,7 +153,8 @@ impl Toolset { true, )?, pr: mpr.add(), - force, + raw: opts.raw, + force: opts.force, }; t.install_version(ctx)?; }