mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 18:56:51 +08:00
Reorder rustup
completions to avoid undefined function error
[ci skip]
This commit is contained in:
parent
85f93ff002
commit
32546d6491
|
@ -35,15 +35,6 @@ set __rustup_components \
|
||||||
# __rustup_strip_common_suffix_strict $not_installed
|
# __rustup_strip_common_suffix_strict $not_installed
|
||||||
# end
|
# 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
|
# All *valid* target triples, retrieved from source
|
||||||
function __rustup_triples
|
function __rustup_triples
|
||||||
# The list below must be kept sorted alphabetically
|
# The list below must be kept sorted alphabetically
|
||||||
|
@ -228,6 +219,15 @@ function __rustup_installed_components
|
||||||
__rustup_common_suffix_strict $installed
|
__rustup_common_suffix_strict $installed
|
||||||
end
|
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 v -l verbose
|
||||||
complete -c rustup -n "__fish_should_complete_switches" -s h -l help
|
complete -c rustup -n "__fish_should_complete_switches" -s h -l help
|
||||||
complete -c rustup -n "__fish_should_complete_switches" -s V -l version
|
complete -c rustup -n "__fish_should_complete_switches" -s V -l version
|
||||||
|
|
Loading…
Reference in New Issue
Block a user