We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2761949 commit 9098bb5Copy full SHA for 9098bb5
src/etc/cargo.bashcomp.sh
@@ -250,15 +250,11 @@ _get_examples(){
250
}
251
252
_get_targets(){
253
- local result=()
254
- local targets=$(rustup target list)
255
- while read line
256
- do
257
- if [[ "$line" =~ default|installed ]]; then
258
- result+=("${line%% *}")
259
- fi
260
- done <<< "$targets"
261
- echo "${result[@]}"
+ if command -v rustup >/dev/null 2>/dev/null; then
+ rustup target list --installed
+ else
+ rustc --print target-list
+ fi
262
263
264
_toolchains(){
0 commit comments