Commit bef2035
committed
go: add zstyle to prevent listing packages from GOROOT and GOPATH
Adding all of GOROOT means all of stdlib is added as completions to many
commands, which I find rather noisy and rarely useful.
Before:
[~/check]% go install <Tab>
archive/ context/ fmt/ log/ regexp/ testing/
bufio/ crypto/ go/ math/ runtime/ text/
builtin/ database/ hash/ mime/ sort/ time/
bytes/ debug/ html/ net/ strconv/ unicode/
check.go encoding/ image/ os/ strings/ unsafe/
cmd/ errors/ index/ path/ sync/ vendor/
compress/ expvar/ internal/ plugin/ syscall/
container/ flag/ io/ reflect/ testdata/
After:
[~/check]% go install <Tab>
# completes to ./check.go, which is the only file in this small package.
Also add a setting to disable GOPATH, as it's kind deprecated and on its
way out. Sometimes I have some stuff "go get"'d in there, but I rarely
want that as completions.1 parent 3b247d3 commit bef2035
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
358 | 370 | | |
359 | 371 | | |
360 | 372 | | |
361 | | - | |
362 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
363 | 379 | | |
364 | 380 | | |
365 | 381 | | |
| 382 | + | |
366 | 383 | | |
367 | 384 | | |
368 | 385 | | |
| |||
0 commit comments