mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 09:31:16 -03:00
completions/cargo: Uncouple from rustup completions
We could technically extract this into a function, but it's a trivial one-liner. This allows rustup completions to be independently overridden. Fixes #12357
This commit is contained in:
@@ -34,8 +34,7 @@ end
|
||||
# have an easy way to do that in the `complete` machinery at this time.
|
||||
function __fish_cargo_targets
|
||||
if command -q rustup
|
||||
functions -q __rustup_installed_targets || complete -C"rustup " &>/dev/null
|
||||
__rustup_installed_targets
|
||||
rustup target list | string replace -rf "^(\S+) \(installed\)" '$1'
|
||||
else
|
||||
rustc --print target-list
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user