943 lines
29 KiB
Bash
943 lines
29 KiB
Bash
|
_rustup() {
|
||
|
local i cur prev opts cmds
|
||
|
COMPREPLY=()
|
||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||
|
cmd=""
|
||
|
opts=""
|
||
|
|
||
|
for i in ${COMP_WORDS[@]}
|
||
|
do
|
||
|
case "${i}" in
|
||
|
rustup)
|
||
|
cmd="rustup"
|
||
|
;;
|
||
|
|
||
|
add)
|
||
|
cmd+="_add"
|
||
|
;;
|
||
|
analyze)
|
||
|
cmd+="_analyze"
|
||
|
;;
|
||
|
completions)
|
||
|
cmd+="_completions"
|
||
|
;;
|
||
|
component)
|
||
|
cmd+="_component"
|
||
|
;;
|
||
|
default)
|
||
|
cmd+="_default"
|
||
|
;;
|
||
|
default_host)
|
||
|
cmd+="_default_host"
|
||
|
;;
|
||
|
disable)
|
||
|
cmd+="_disable"
|
||
|
;;
|
||
|
doc)
|
||
|
cmd+="_doc"
|
||
|
;;
|
||
|
enable)
|
||
|
cmd+="_enable"
|
||
|
;;
|
||
|
help)
|
||
|
cmd+="_help"
|
||
|
;;
|
||
|
install)
|
||
|
cmd+="_install"
|
||
|
;;
|
||
|
link)
|
||
|
cmd+="_link"
|
||
|
;;
|
||
|
list)
|
||
|
cmd+="_list"
|
||
|
;;
|
||
|
man)
|
||
|
cmd+="_man"
|
||
|
;;
|
||
|
override)
|
||
|
cmd+="_override"
|
||
|
;;
|
||
|
remove)
|
||
|
cmd+="_remove"
|
||
|
;;
|
||
|
run)
|
||
|
cmd+="_run"
|
||
|
;;
|
||
|
self)
|
||
|
cmd+="_self"
|
||
|
;;
|
||
|
set)
|
||
|
cmd+="_set"
|
||
|
;;
|
||
|
show)
|
||
|
cmd+="_show"
|
||
|
;;
|
||
|
target)
|
||
|
cmd+="_target"
|
||
|
;;
|
||
|
telemetry)
|
||
|
cmd+="_telemetry"
|
||
|
;;
|
||
|
toolchain)
|
||
|
cmd+="_toolchain"
|
||
|
;;
|
||
|
uninstall)
|
||
|
cmd+="_uninstall"
|
||
|
;;
|
||
|
unset)
|
||
|
cmd+="_unset"
|
||
|
;;
|
||
|
update)
|
||
|
cmd+="_update"
|
||
|
;;
|
||
|
upgrade_data)
|
||
|
cmd+="_upgrade_data"
|
||
|
;;
|
||
|
which)
|
||
|
cmd+="_which"
|
||
|
;;
|
||
|
*)
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
case "${cmd}" in
|
||
|
rustup)
|
||
|
opts=" -v -h -V --verbose --help --version show install update default toolchain target component override run which doc man self telemetry set completions help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
|
||
|
rustup_completions)
|
||
|
opts=" -h -V --help --version <shell> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_component)
|
||
|
opts=" -h -V --help --version list add remove help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_component_add)
|
||
|
opts=" -h -V --toolchain --target --help --version <component> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
--target)
|
||
|
COMPREPLY=("<target>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_component_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_component_list)
|
||
|
opts=" -h -V --toolchain --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_component_remove)
|
||
|
opts=" -h -V --toolchain --target --help --version <component> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
--target)
|
||
|
COMPREPLY=("<target>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_default)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_doc)
|
||
|
opts=" -h -V --book --std --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_install)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_man)
|
||
|
opts=" -h -V --toolchain --help --version <command> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override)
|
||
|
opts=" -h -V --help --version list set unset add remove help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_add)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_list)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_remove)
|
||
|
opts=" -h -V --path --nonexistent --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--path)
|
||
|
COMPREPLY=("<path>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_set)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_override_unset)
|
||
|
opts=" -h -V --path --nonexistent --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--path)
|
||
|
COMPREPLY=("<path>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_run)
|
||
|
opts=" -h -V --help --version <toolchain> <command>... "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_self)
|
||
|
opts=" -h -V --help --version update uninstall upgrade-data help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_self_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_self_uninstall)
|
||
|
opts=" -y -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_self_update)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_self_upgrade_data)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_set)
|
||
|
opts=" -h -V --help --version default-host help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_set_default_host)
|
||
|
opts=" -h -V --help --version <host_triple> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_set_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_show)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target)
|
||
|
opts=" -h -V --help --version list add remove install uninstall help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_add)
|
||
|
opts=" -h -V --toolchain --help --version <target> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_install)
|
||
|
opts=" -h -V --toolchain --help --version <target> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_list)
|
||
|
opts=" -h -V --toolchain --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_remove)
|
||
|
opts=" -h -V --toolchain --help --version <target> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_target_uninstall)
|
||
|
opts=" -h -V --toolchain --help --version <target> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
--toolchain)
|
||
|
COMPREPLY=("<toolchain>")
|
||
|
return 0
|
||
|
;;
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_telemetry)
|
||
|
opts=" -h -V --help --version enable disable analyze help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_telemetry_analyze)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_telemetry_disable)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_telemetry_enable)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_telemetry_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain)
|
||
|
opts=" -h -V --help --version list install uninstall link update add remove help"
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_add)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_help)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_install)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_link)
|
||
|
opts=" -h -V --help --version <toolchain> <path> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_list)
|
||
|
opts=" -h -V --help --version "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_remove)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_uninstall)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_toolchain_update)
|
||
|
opts=" -h -V --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_update)
|
||
|
opts=" -h -V --no-self-update --help --version <toolchain> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
rustup_which)
|
||
|
opts=" -h -V --help --version <command> "
|
||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
fi
|
||
|
case "${prev}" in
|
||
|
|
||
|
*)
|
||
|
COMPREPLY=()
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||
|
return 0
|
||
|
;;
|
||
|
esac
|
||
|
}
|
||
|
|
||
|
complete -F _rustup rustup
|