mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 22:44:01 +00:00
9466ff2a22
`cargo search` can be used to quickly get crates matching a search string, so we can pass the current token for first-arg completions to `cargo add` and `cargo install` to `cargo search` to look up matches. `cargo search` doesn't restrict itself to (nor prioritize for) prefix matches, while fish will only display prefix matches (for dynamically generated completions) so it's perfectly possible for `cargo search foo` to return 20 results none of which will successfully result in a completion, but for a further-narrowed completion of `cargo install foob^I" to then result in completions because `cargo search` ended up returning a prefix match for `foob` while it didn't for `foo`. The only other oob cargo subcommand that takes a crate name (that isn't the name of a crate specified in `Cargo.toml`) is `cargo search` but there's no point in providing completions to that... I think (it's possible to search for crate "foo" in order to get its latest version number rather than its name, but I'm not sure that's worth supporting). |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish | ||
lynx.lss |