Reorder rustup completions to avoid undefined function error

[ci skip]
This commit is contained in:
Mahmoud Al-Qudsi 2019-09-10 03:17:06 -05:00
parent 85f93ff002
commit 32546d6491

View File

@ -35,15 +35,6 @@ set __rustup_components \
# __rustup_strip_common_suffix_strict $not_installed
# end
# Trim trailing attributes, e.g. "rust-whatever (default)" -> "rust-whatever"
set -l __rustup_toolchains (rustup toolchain list | string replace -rf "\s+.*" '')
# By default, the long name of a toolchain is used (e.g. nightly-x86_64-unknown-linux-gnu),
# but a shorter version can be used if it is unambiguous.
set -l __rustup_toolchains_short (__rustup_strip_common_suffix_strict $__rustup_toolchains)
# Needs to be global to retain access from functions
set __rustup_channels "beta" "stable" "nightly"
# All *valid* target triples, retrieved from source
function __rustup_triples
# The list below must be kept sorted alphabetically
@ -228,6 +219,15 @@ function __rustup_installed_components
__rustup_common_suffix_strict $installed
end
# Trim trailing attributes, e.g. "rust-whatever (default)" -> "rust-whatever"
set -l __rustup_toolchains (rustup toolchain list | string replace -rf "\s+.*" '')
# By default, the long name of a toolchain is used (e.g. nightly-x86_64-unknown-linux-gnu),
# but a shorter version can be used if it is unambiguous.
set -l __rustup_toolchains_short (__rustup_strip_common_suffix_strict $__rustup_toolchains)
# Needs to be global to retain access from functions
set __rustup_channels "beta" "stable" "nightly"
complete -c rustup -n "__fish_should_complete_switches" -s v -l verbose
complete -c rustup -n "__fish_should_complete_switches" -s h -l help
complete -c rustup -n "__fish_should_complete_switches" -s V -l version