fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian BoehmReformat share/**.fish with newlines collapsed78c948282

master
13.4 KiB172 linesraw
1# go is a tool for managing Go source code.
2# See: https://golang.org
3
4# Completions for go build commands
5set -l __go_cmds_w_buildflags build get install run test generate
6complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -s a -d 'force rebuild'
7complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -s n -d 'print the commands but do not run them'
8complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -s p -r -d 'number parallel builds (default=#cpus)'
9complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o race -d 'enable data race detection'
10complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o msan -d 'enable interoperation with memory sanitizer'
11complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -s v -d 'print packages being built'
12complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o work -d 'print and preserve work directory'
13complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -s x -d 'print the commands'
14complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o asmflags -d 'arguments to pass on each go tool asm invocation'
15complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o buildmode -x -d 'build mode to use' -a 'archive c-archive c-shared default shared exe pie plugin'
16complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o compiler -x -d 'name of compiler to use, as in runtime' -a 'gccgo gc'
17complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o gccgoflags -r -d 'gccgo compiler/linker flags'
18complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o gcflags -r -d 'go compiler flags'
19complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o installsuffix -r -d 'suffix for installation directory'
20complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o ldflags -r -d 'linker flags'
21complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o linkshared -r -d 'link against shared libraries previously created with -buildmode=shared'
22complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o mod -x -d 'module download mode to use' -a 'readonly vendor mod'
23complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o modcacherw -d 'leave newly-created directories in the module cache writable'
24complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o modfile -r -d 'read (and possibly write) an alternate go.mod'
25complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o pkgdir -r -d 'install and load all packages from dir instead of the usual locations'
26complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o tags -r -d 'build tags'
27complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o trimpath -d 'remove all file system paths from the resulting executable'
28complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o toolexec -r -d 'a program to use to invoke toolchain programs'
29complete -c go -n "__fish_seen_subcommand_from $__go_cmds_w_buildflags" -o mod -x -d 'module download mode to use' -a 'readonly vendor'
30
31# Completions for go cmds that takes file arguments
32complete -c go -n "__fish_seen_subcommand_from build compile fix fmt install test vet" -k -x -a "(
33            __fish_complete_suffix .go
34    )" --description File
35
36# Completions for go cmds that takes pkg arguments
37complete -c go -n "__fish_seen_subcommand_from build doc fix fmt install test vet" -x -a "(
38            go list -e -f '{{.ImportPath}}	{{or .Doc \"Go package\"}}' (commandline -ct)... 2>/dev/null
39    )" --description Package
40
41# build
42complete -c go -n __fish_use_subcommand -a build -d 'compile packages and dependencies'
43
44# clean
45complete -c go -n __fish_use_subcommand -a clean -d 'remove object files'
46complete -c go -n '__fish_seen_subcommand_from clean' -s i -d "remove the corresponding installed archive or binary"
47complete -c go -n '__fish_seen_subcommand_from clean' -s n -d "print the command that would be executed without running"
48complete -c go -n '__fish_seen_subcommand_from clean' -s r -d "recursively clean all the dependencies of package named by the import paths"
49complete -c go -n '__fish_seen_subcommand_from clean' -s x -d "clean to print remove commands as it executes them"
50complete -c go -n '__fish_seen_subcommand_from clean' -o cache -d 'remove the entire go build cache'
51complete -c go -n '__fish_seen_subcommand_from clean' -o testcache -d 'expire all test results in the go build cache'
52complete -c go -n '__fish_seen_subcommand_from clean' -o modcache -d 'remove the entire module download cache'
53
54# doc
55complete -c go -n __fish_use_subcommand -a doc -d 'run godoc on package sources'
56complete -c go -n '__fish_seen_subcommand_from doc' -o all -d "show all the documentation for the package"
57complete -c go -n '__fish_seen_subcommand_from doc' -s c -d 'respect case when matching symbols'
58complete -c go -n '__fish_seen_subcommand_from doc' -o cmd -d 'treat a command (package main) like a regular package'
59complete -c go -n '__fish_seen_subcommand_from doc' -o short -d 'one-line representation for each symbol'
60complete -c go -n '__fish_seen_subcommand_from doc' -o src -d 'show the full source code for the symbol'
61complete -c go -n '__fish_seen_subcommand_from doc' -s u -d 'show documentation for unexported as well as exported symbols'
62
63# env
64complete -c go -n __fish_use_subcommand -a env -d 'print Go environment information'
65complete -c go -n '__fish_seen_subcommand_from env' -o json -d 'print the environment in JSON format'
66complete -c go -n '__fish_seen_subcommand_from env' -s u -r -d 'set NAME to default values'
67complete -c go -n '__fish_seen_subcommand_from env' -s w -r -d 'set default values for config variables'
68
69# fix
70complete -c go -n __fish_use_subcommand -a fix -d 'run go tool fix on packages'
71
72# fmt
73complete -c go -n __fish_use_subcommand -a fmt -d 'run gofmt on package sources'
74complete -c go -n '__fish_seen_subcommand_from fmt' -s n -d "prints commands that would be executed"
75complete -c go -n '__fish_seen_subcommand_from fmt' -s x -d "prints commands as they are executed"
76
77# get
78complete -c go -n __fish_use_subcommand -a get -d 'download and install packages and dependencies'
79complete -c go -n '__fish_seen_subcommand_from get' -s d -d "stop after downloading the packages; don't install"
80complete -c go -n '__fish_seen_subcommand_from get' -o fix -d "run fix tool on packages before resolving dependencies or building"
81complete -c go -n '__fish_seen_subcommand_from get' -s u -d "update remote packages"
82complete -c go -n '__fish_seen_subcommand_from get' -s v -d "verbose progress and debug output"
83complete -c go -n '__fish_seen_subcommand_from get' -s t -d "also download the packages required to build the tests"
84complete -c go -n '__fish_seen_subcommand_from get' -o insecure -d "flag permits fetching & resolving domains using insecure schemes"
85
86# generate
87complete -c go -n __fish_use_subcommand -a generate -d 'Generate runs commands described by directives within existing files.'
88complete -c go -n '__fish_seen_subcommand_from get' -s n -d "prints commands that would be executed"
89complete -c go -n '__fish_seen_subcommand_from get' -s x -d "prints commands as they are executed"
90complete -c go -n '__fish_seen_subcommand_from get' -s v -d "prints the names of packages and files as they are processed"
91complete -c go -n '__fish_seen_subcommand_from get' -o run -d "prints the names of packages and files as they are processed"
92
93# help
94complete -c go -n __fish_use_subcommand -a help -d 'get help on topic'
95complete -c go -n '__fish_seen_subcommand_from help' -xa bug -d "start a bug report"
96complete -c go -n '__fish_seen_subcommand_from help' -xa build -d "compile packages and dependencies"
97complete -c go -n '__fish_seen_subcommand_from help' -xa clean -d "remove object files and cached files"
98complete -c go -n '__fish_seen_subcommand_from help' -xa doc -d "show documentation for package or symbol"
99complete -c go -n '__fish_seen_subcommand_from help' -xa env -d "print Go environment information"
100complete -c go -n '__fish_seen_subcommand_from help' -xa fix -d "update packages to use new APIs"
101complete -c go -n '__fish_seen_subcommand_from help' -xa fmt -d "gofmt (reformat) package sources"
102complete -c go -n '__fish_seen_subcommand_from help' -xa generate -d "generate Go files by processing source"
103complete -c go -n '__fish_seen_subcommand_from help' -xa get -d "download and install packages and dependencies"
104complete -c go -n '__fish_seen_subcommand_from help' -xa install -d "compile and install packages and dependencies"
105complete -c go -n '__fish_seen_subcommand_from help' -xa list -d "list packages or modules"
106complete -c go -n '__fish_seen_subcommand_from help' -xa mod -d "module maintenance"
107complete -c go -n '__fish_seen_subcommand_from help' -xa run -d "compile and run Go program"
108complete -c go -n '__fish_seen_subcommand_from help' -xa test -d "test packages"
109complete -c go -n '__fish_seen_subcommand_from help' -xa tool -d "run specified go tool"
110complete -c go -n '__fish_seen_subcommand_from help' -xa version -d "print Go version"
111complete -c go -n '__fish_seen_subcommand_from help' -xa vet -d "report likely mistakes in packages"
112complete -c go -n '__fish_seen_subcommand_from help' -xa buildmode -d "build modes"
113complete -c go -n '__fish_seen_subcommand_from help' -xa c -d "calling between Go and C"
114complete -c go -n '__fish_seen_subcommand_from help' -xa cache -d "build and test caching"
115complete -c go -n '__fish_seen_subcommand_from help' -xa environment -d "environment variables"
116complete -c go -n '__fish_seen_subcommand_from help' -xa filetype -d "file types"
117complete -c go -n '__fish_seen_subcommand_from help' -xa go.mod -d "the go.mod file"
118complete -c go -n '__fish_seen_subcommand_from help' -xa gopath -d "GOPATH environment variable"
119complete -c go -n '__fish_seen_subcommand_from help' -xa gopath-get -d "legacy GOPATH go get"
120complete -c go -n '__fish_seen_subcommand_from help' -xa goproxy -d "module proxy protocol"
121complete -c go -n '__fish_seen_subcommand_from help' -xa importpath -d "import path syntax"
122complete -c go -n '__fish_seen_subcommand_from help' -xa modules -d "modules, module versions, and more"
123complete -c go -n '__fish_seen_subcommand_from help' -xa module-get -d "module-aware go get"
124complete -c go -n '__fish_seen_subcommand_from help' -xa module-auth -d "module authentication using go.sum"
125complete -c go -n '__fish_seen_subcommand_from help' -xa module-private -d "module configuration for non-public modules"
126complete -c go -n '__fish_seen_subcommand_from help' -xa packages -d "package lists and patterns"
127complete -c go -n '__fish_seen_subcommand_from help' -xa testflag -d "testing flags"
128complete -c go -n '__fish_seen_subcommand_from help' -xa testfunc -d "testing functions"
129
130# install
131complete -c go -n __fish_use_subcommand -a install -d 'compile and install packages and dependencies'
132
133# list
134complete -c go -n __fish_use_subcommand -a list -d 'list packages'
135complete -c go -n '__fish_seen_subcommand_from list' -s e -d "tolerate erroneous packages"
136complete -c go -n '__fish_seen_subcommand_from list' -s f -r -d "pass in template for formatting"
137complete -c go -n '__fish_seen_subcommand_from list' -o json -d "print in JSON format"
138complete -c go -n '__fish_seen_subcommand_from list' -o tags -r -d 'list of build tags'
139complete -c go -n '__fish_seen_subcommand_from list' -s m -d 'list modules instead of packages'
140
141# run
142complete -c go -n __fish_use_subcommand -a run -d 'compile and run Go program'
143
144# test
145complete -c go -n __fish_use_subcommand -a test -d 'test packages'
146complete -c go -n '__fish_seen_subcommand_from test' -s c -r -d "compile the test binary to pkg.test but do not run it"
147complete -c go -n '__fish_seen_subcommand_from test' -s i -d "install dependent packages, but don't run tests"
148
149# tool
150complete -c go -n __fish_use_subcommand -a tool -d 'run specified go tool'
151complete -c go -n '__fish_seen_subcommand_from tool' -a 'addr2line api asm cgo compile dist fix link nm objdump pack pprof prof vet yacc' -d "target tool"
152complete -c go -n '__fish_seen_subcommand_from tool' -s n -d "print the command that would be executed but not execute it"
153
154# version
155complete -c go -f -n __fish_use_subcommand -a version -d 'print Go version'
156complete -c go -f -n '__fish_seen_subcommand_from version'
157
158# vet
159complete -c go -n __fish_use_subcommand -a vet -d 'vet packages'
160complete -c go -n '__fish_seen_subcommand_from vet' -s n -d "print the command that would be executed"
161complete -c go -n '__fish_seen_subcommand_from vet' -s x -d "prints commands as they are executed"
162
163# mod
164complete -c go -n __fish_use_subcommand -a mod -d 'module maintenance'
165complete -c go -f -n '__fish_seen_subcommand_from mod' -a download -d "download modules to local cache"
166complete -c go -f -n '__fish_seen_subcommand_from mod' -a edit -d "edit go.mod from tools or scripts"
167complete -c go -f -n '__fish_seen_subcommand_from mod' -a graph -d "print module requirement graph"
168complete -c go -f -n '__fish_seen_subcommand_from mod' -a init -d "initialize new module in current directory"
169complete -c go -f -n '__fish_seen_subcommand_from mod' -a tidy -d "add missing and remove unused modules"
170complete -c go -f -n '__fish_seen_subcommand_from mod' -a vendor -d "make vendored copy of dependencies"
171complete -c go -f -n '__fish_seen_subcommand_from mod' -a verify -d "verify dependencies have expected content"
172complete -c go -f -n '__fish_seen_subcommand_from mod' -a why -d "explain why packages or modules are needed"