Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions src/rustup-cli/zsh/_rustup
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ case $state in
args)
case $words[1] in
component)
local -a subcommands=(
local -a subcommands
subcommands=(
'list:list installed and available components'
'add:add a component to a toolchain'
'remove:remove a component from a toolchain'
Expand Down Expand Up @@ -52,7 +53,8 @@ case $state in
;;

override)
local -a subcommands=(
local -a subcommands
subcommands=(
'list:list directory toolchain overrides'
'set:set the override toolchain for a directory'
'unset:remove the override toolchain for a directory'
Expand All @@ -72,7 +74,8 @@ case $state in


self)
local -a subcommands=(
local -a subcommands
subcommands=(
'update:download and install updates to rustup'
'uninstall:uninstall rustup'
'upgrade-data:upgrade the internal data format'
Expand All @@ -84,7 +87,8 @@ case $state in
;;

set)
local -a subcommands=(
local -a subcommands
subcommands=(
'default-host:The triple used to identify toolchains' \
'help:prints this message or the help of the given subcommand(s)'
)
Expand All @@ -98,7 +102,8 @@ case $state in
;;

target)
local -a subcommands=(
local -a subcommands
subcommands=(
'list:list installed and available targets'
'add:add a target to a toolchain'
'remove:remove a target from a toolchain'
Expand All @@ -110,7 +115,8 @@ case $state in
;;

toolchain)
local -a subcommands=(
local -a subcommands
subcommands=(
'list:list installed toolchains'
'install:install or update a toolchain'
'uninstall:uninstall a toolchain'
Expand Down Expand Up @@ -139,7 +145,8 @@ esac
}

_get_local_toolchains() {
local -a toolchains=()
local -a toolchains
toolchains=()
rustup toolchain list 2>/dev/null | while read line
do
toolchains+="${line%%-*}"
Expand All @@ -148,7 +155,9 @@ _get_local_toolchains() {
}

_rustup_cmds(){
local -a commands=(
local -a commands

commands=(
'show:show the active and installed toolchains'
'update:update Rust toolchains'
'default:set the default toolchain'
Expand Down