Commit Graph

55 Commits

Author SHA1 Message Date
Chris Nobody e203f94963 gocomplete: suppress error output by default
Prevent the Go command completion from jumbling up the shell prompt on
errors by setting the Writer of the standard lib default log.Logger to
ioutil.Discard unless the system environment variable `GOCOMP_VERBOSE`
has been explicitly set to "1" (e.g. for debugging purposes).

Fixes #139
2021-04-06 14:23:51 +03:00
Chris Nobody bf9b51caf4 gocomplete: do not suppress test failures
Ensure that the components of the `testing` package that rely on calling
`os.Exit` remain functional and any test failures are actually reported
back after the `monkey.Patch` in the `gocomplete.Example` test.

Fix #135
2021-04-01 10:46:54 +03:00
Eyal Posener 5d9f7f10f0 Fix failing go1.16 test
Fixes #132
2021-01-30 11:13:29 +02:00
Eyal Posener 7c7ab2f59a update module import path 2019-11-18 01:25:16 +02:00
Eyal Posener 8724aaf183 V2 2019-11-18 01:05:47 +02:00
Eyal Posener cee2ecb6a2 Remove gocomplete module files
Fixes #93
2019-10-23 23:07:15 +03:00
Eyal Posener 72c5c945f0 Deprecate Args.Directory() 2019-07-05 17:29:25 +03:00
Eyal Posener 2e99ff9404 gocomplete: Fix module name
Fixes #88
2019-06-09 08:57:29 +03:00
Eyal Posener 5fdb1adfd7 Add support for CMP_POINT
Fixes #72
2018-10-19 20:10:37 +03:00
Adam S Levy 7516f04703 feat(help,mod): Add completion for `go help` and `go mod`
Go 1.11 introduces module support which adds a whole new set of
commands. Add those commands for modules and also add the completion for
the help commands and topics.
2018-08-27 11:59:20 -08:00
Adam S Levy 5b53660969 fix(go clean): Added missing flags
Added missing flags go clean -cache -testcache -modcache
2018-08-27 11:57:17 -08:00
Adam S Levy fe498e5eda build(go111): Add go module support 2018-08-27 11:55:41 -08:00
Eyal Posener e037c22b2f
Merge pull request #63 from linux4life798/optionsadd
gocomplete - adding go tool link and pack
2018-04-13 12:18:13 +03:00
Craig Hesling 123c7b13bc gocomplete - Attempted to add go tool link 2018-04-10 03:05:43 -04:00
Craig Hesling f6c64f0b99 gocomplete - Attempted to add go tool pack 2018-04-10 02:51:32 -04:00
Craig Hesling a3195dd708 gocomplete - Added missing -V option for go tool asm 2018-04-10 01:39:19 -04:00
Craig Hesling cb85f6b2a6 gocomplete - Added missing -S option for go tool objdump 2018-04-10 01:39:09 -04:00
Eyal Posener a1f9ea005b
Merge branch 'master' into split-last-equal 2017-11-04 11:52:49 +02:00
Eyal Posener aae7e1e39f Add logic to complete when last flag uses the equal sign
If the last flag is of the form -flag=value, complete the value according to -flag.
2017-11-04 11:32:33 +02:00
Eyal Posener 7ee9623f2b Filter matches as a final stage
This simplifies the prediction logic writing, the predictor
doesn't need to filter our according to line matching, instead
it returns everything and the filtering is done at the end.

This does not break current behavior.
2017-11-04 10:51:40 +02:00
Deleplace 4bd1bbca4a Handle default gopath $HOME/go when env var $GOPATH is not set. 2017-07-30 19:41:18 +02:00
Eyal Posener a67bb12457 gocomplete: Add support for system GOPATH packages
fixes #41
2017-07-28 15:01:07 +03:00
Eyal Posener 97eda09fcb gocomplete: add go tool subcommands
Fixes #39
2017-05-27 20:21:50 +03:00
Eyal Posener 238b78ffd9 gocomplete: improve package completion 2017-05-19 11:59:51 +03:00
Eyal Posener 3555a6948a gocomplete: better pakcages listing
use go/build package
only read one level of packages, and not all packages
2017-05-19 00:15:33 +03:00
Eyal Posener b3f5ec22d3 gocomplete: go run should also predict non-main functions 2017-05-18 23:40:02 +03:00
Eyal Posener 61d9904ba1 Fix './' prefix for file completion 2017-05-18 23:29:55 +03:00
Eyal Posener 659bd9e3d5 Merge pull request #26 from posener/runnable
gocomplete: run only runnable go files
2017-05-15 23:05:08 +03:00
Eyal Posener 3dd16239ee Add example test to increase coverate 2017-05-15 23:01:05 +03:00
Eyal Posener ff8cd4ed39 gocomplete: run only runnable go files
when typing 'go run', the completion will complete only go files
which are in main package and have a main function.
2017-05-15 22:50:05 +03:00
Eyal Posener 096b79324e Add global flags for command
Fixes #24
2017-05-15 19:32:59 +03:00
Eyal Posener e00c0546bc gocomplete: add build flags to get command 2017-05-15 16:37:36 +03:00
Eyal Posener 3776c7286e cmd/install: add support for zsh
Fixes: #9
2017-05-13 11:06:15 +03:00
Eyal Posener bc5d682221 fix nested files 2017-05-13 00:40:26 +03:00
Eyal Posener f580110640 gocomplete: complete by packages 2017-05-13 00:17:59 +03:00
Eyal Posener 115e175c3d Change Match to be a function 2017-05-11 20:48:40 +03:00
Eyal Posener 967bae76f3 Add Predictor interface 2017-05-11 20:33:29 +03:00
Eyal Posener 72dfe017e9 Improve files and directories completion 2017-05-11 02:16:39 +03:00
Eyal Posener 9de57bdcf5 Enable completion and executable be the same command
Fixes #6
2017-05-10 19:21:35 +03:00
Eyal Posener c06142941d [gocomplete] fix test name completion 2017-05-08 06:44:00 +03:00
Eyal Posener 6fb4875efa Move match to a separate package 2017-05-07 19:57:41 +03:00
Eyal Posener fd5c13f7ed Remove Name from Command struct 2017-05-07 07:59:42 +03:00
Eyal Posener 703dd6ebc3 improve docs 2017-05-06 22:15:15 +03:00
Eyal Posener f46c5f8a28 Change Predicate to be of function type 2017-05-06 20:24:53 +03:00
Eyal Posener dc4c327ae8 Use local completion files and directories according to typed command 2017-05-06 19:51:33 +03:00
Eyal Posener 60345dc6db fmt 2017-05-06 19:11:16 +03:00
Eyal Posener 07b98cb912 Use pointers to predicates 2017-05-06 19:08:47 +03:00
Eyal Posener 4f47fe9246 Add easy way to install the bash completion 2017-05-06 18:55:54 +03:00
Eyal Posener d33bac720b Remove Complete struct 2017-05-06 09:27:51 +03:00
Eyal Posener 5dbf53eec0 nicer signature for PredictSet 2017-05-06 00:53:03 +03:00