Update 'go tool asm' completion

This commit is contained in:
Shohei YOSHIDA 2024-07-29 17:57:17 +09:00
parent 177fadadba
commit 91fce88036
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 16 additions and 10 deletions

View File

@ -727,9 +727,8 @@ case $state in
fi fi
;; ;;
tool) (tool)
local -a tools local -a tools=($(go tool))
tools=($(go tool))
_arguments \ _arguments \
'-n[print command that would be executed]' \ '-n[print command that would be executed]' \
@ -737,22 +736,29 @@ case $state in
'*:: :->args' '*:: :->args'
case $state in case $state in
args) (args)
case $words[1] in case $words[1] in
addr2line) (addr2line)
_files _files
;; ;;
asm) (asm)
_arguments \ _arguments \
'-D[predefined symbol with optional simple value]:value' \ '*-D[predefined symbol with optional simple value]:value' \
'-I[include directory]:value' \ '*-I[include directory]:value' \
'-S[print assembly and machine code]' \ '-S[print assembly and machine code]' \
'(- *)-V[print assembler version and exit]' \
'-debug[dump instructions as they are parsed]' \ '-debug[dump instructions as they are parsed]' \
'-dynlink[support references to Go symbols]' \ '-dynlink[support references to Go symbols]' \
'-o[output file]:string' \ '-e[no limit on number of errors reported]' \
'-gensymabis[write symbol ABI information to output file. Do not assemble]' \
'-o[output file]:string:_files' \
'-p[set expected package import to pkgpath]:pkgpath' \
'-shared[generate code that can be linked into a shared lib]' \ '-shared[generate code that can be linked into a shared lib]' \
'-trimpath[remove prefix from recorded source file paths]:string' '-spectre[enable spectre mitigations in list]:list:(all ret)' \
'-trimpath[remove prefix from recorded source file paths]:string' \
'-v[print debug output]' \
'*:file:_files'
;; ;;
callgraph) callgraph)