From 10785ba814192bba4783f4da913593eeeaf29027 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 21 Apr 2022 17:35:00 +0200 Subject: [PATCH] completions/rustc: SILENCE Otherwise this might print > error: no override and no default toolchain set --- share/completions/rustc.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/completions/rustc.fish b/share/completions/rustc.fish index 0a905bcf6..0378b925f 100644 --- a/share/completions/rustc.fish +++ b/share/completions/rustc.fish @@ -20,7 +20,7 @@ complete -c rustc -f -l extern complete -c rustc -f -l sysroot complete -c rustc -x -l color -a 'auto always never' -set -l rust_docs (rustc -C help \ +set -l rust_docs (rustc -C help 2>/dev/null \ | string replace -r -i '(\s+)-C(.+)(\s+)--(\s+)([^\n]+)' '$2 $5' \ | string trim \ | string match -r '^.*[^:]$') @@ -34,7 +34,7 @@ end # rustc -Z is only available with the nightly toolchain, which may not be installed if rustc +nightly >/dev/null 2>&1 - set -l rust_docs (rustc +nightly -Z help \ + set -l rust_docs (rustc +nightly -Z help 2>/dev/null \ | string replace -r -i '(\s+)-Z(.+)--(\s+)([^\n]+)' '$2 $4' \ | string trim \ | string match -r '^.*[^:]$') @@ -47,7 +47,7 @@ if rustc +nightly >/dev/null 2>&1 end end -set -l rust_docs (rustc -W help \ +set -l rust_docs (rustc -W help 2>/dev/null \ | string match -r \ '(?:\s+)(?:.+)(?:\s+)(?:allow|warn|deny|forbid)(?:\s+){2}(?:[^\n]+)' \ | string replace -r -i \