Closed
Description
Problem
Invoking cargo build --target <TAB>
invokes rustup
. Some environments may not have it installed and I do not see why it should be invoked if the tab completion can run equivalent of rustc --print target-list
.
Steps
- Set up a basic Rust project with cargo
- Write
cargo build --target
on terminal and then press the TAB key. - If
rustup
is not installed, terminal will print:
cargo build --target bash: rustup: command not found
Possible Solution(s)
I suppose cargo
could return the output of rustc --print target-list
Notes
It is generally a good idea to depend only on the most basic tools, especially if they get the job done right, like rustc
does.
Version
cargo 1.71.0
release: 1.71.0
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.1 system)
libcurl: 8.0.1 (sys:0.4.61+curl-8.0.1 system ssl:OpenSSL/3.0.9)
os: Fedora 38.0.0 [64-bit]
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_ASSIGN_START -->
<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Angelin01"}$$TRIAGEBOT_ASSIGN_DATA_END -->
<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->