mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
completions/rustc: SILENCE
Otherwise this might print > error: no override and no default toolchain set
This commit is contained in:
parent
43459d1750
commit
10785ba814
1 changed files with 3 additions and 3 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue