mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:17:12 +08:00
parent
ce62b284b1
commit
0ff1e50a33
|
@ -26,7 +26,7 @@ set -l rust_docs (rustc -C help 2>/dev/null \
|
|||
| string match -r '^.*[^:]$')
|
||||
|
||||
for line in $rust_docs
|
||||
set -l docs (string split -m 1 ' ' $line)
|
||||
set -l docs (string split -m 1 ' ' -- $line)
|
||||
set -l flag (string replace -r '^([a-z\-]+\=|[a-z\-]+)(.*)' '$1' \
|
||||
$docs[1])
|
||||
complete -c rustc -x -s C -l codegen -a (string escape -- "$flag") -d "$docs[2]"
|
||||
|
@ -40,7 +40,7 @@ if rustc +nightly >/dev/null 2>&1
|
|||
| string match -r '^.*[^:]$')
|
||||
|
||||
for line in $rust_docs
|
||||
set -l docs (string split -m 1 ' ' $line)
|
||||
set -l docs (string split -m 1 ' ' -- $line)
|
||||
set -l flag (string replace -r '^([a-z\-]+\=|[a-z\-]+)(.*)' '$1' \
|
||||
$docs[1])
|
||||
complete -c rustc -x -s Z -a (string escape -- "$flag") -d "$docs[2]"
|
||||
|
@ -57,7 +57,7 @@ set -l rust_docs (rustc -W help 2>/dev/null \
|
|||
| string match -r -v '^([a-z\-]+)(\s+)(allow|warn|deny|forbid)')
|
||||
|
||||
for line in $rust_docs
|
||||
set -l docs (string split -m 1 ' ' $line)
|
||||
set -l docs (string split -m 1 ' ' -- $line)
|
||||
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]"
|
||||
|
|
Loading…
Reference in New Issue
Block a user