mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
parent
38ac7693e9
commit
deb6d477d4
1 changed files with 6 additions and 6 deletions
|
@ -33,7 +33,7 @@ for line in $rust_docs
|
|||
set docs (string split -m 1 ' ' $line)
|
||||
set flag (string replace -r '^([a-z\-]+\=|[a-z\-]+)(.*)' '$1' \
|
||||
$docs[1])
|
||||
complete -c rustc -x -s C -l codegen -a "$flag" -d "$docs[2]"
|
||||
complete -c rustc -x -s C -l codegen -a (string escape -- "$flag") -d "$docs[2]"
|
||||
end
|
||||
|
||||
# rustc -Z is only available with the nightly toolchain, which may not be installed
|
||||
|
@ -47,7 +47,7 @@ if rustc +nightly >/dev/null 2>&1
|
|||
set docs (string split -m 1 ' ' $line)
|
||||
set flag (string replace -r '^([a-z\-]+\=|[a-z\-]+)(.*)' '$1' \
|
||||
$docs[1])
|
||||
complete -c rustc -x -s Z -a "$flag" -d "$docs[2]"
|
||||
complete -c rustc -x -s Z -a (string escape -- "$flag") -d "$docs[2]"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,10 +62,10 @@ set -l rust_docs (rustc -W help \
|
|||
|
||||
for line in $rust_docs
|
||||
set docs (string split -m 1 ' ' $line)
|
||||
complete -c rustc -x -s W -l warn -a "$docs[1]" -d "$docs[2]"
|
||||
complete -c rustc -x -s A -l allow -a "$docs[1]" -d "$docs[2]"
|
||||
complete -c rustc -x -s D -l deny -a "$docs[1]" -d "$docs[2]"
|
||||
complete -c rustc -x -s F -l forbid -a "$docs[1]" -d "$docs[2]"
|
||||
complete -c rustc -x -s W -l warn -a (string escape -- "$docs[1]") -d "$docs[2]"
|
||||
complete -c rustc -x -s A -l allow -a (string escape -- "$docs[1]") -d "$docs[2]"
|
||||
complete -c rustc -x -s D -l deny -a (string escape -- "$docs[1]") -d "$docs[2]"
|
||||
complete -c rustc -x -s F -l forbid -a (string escape -- "$docs[1]") -d "$docs[2]"
|
||||
end
|
||||
|
||||
set -e rust_codegen
|
||||
|
|
Loading…
Reference in a new issue