gohack
gohack copied to clipboard
add 'gohack list' or shell completion support
Many package paths are long. To ease typing, I suggest either/both of:
- add
gohack list
, which will emit all package paths in the module, for easy copy/paste - add shell completion, so that the tab key can do the work for me
Opinions?
Would go list
(with suitable flags) not suffice here, for both? I say that assuming shell completion can be made to work given the line-based output of a command
go list -m all
is a decent approximation. But gohack
can do a bit better, by also indicating which modules are currently being hacked on (and what directory they are in). For the modules that are also being hacked on, it could also print whether the hacked version is dirty. Also, go list -m all
emits version numbers, which aren't as relevant for gohack.
Maybe the command should be gohack status
.
Erm. There is already a gohack status
.
I was about to start working on a PR, but I think I'll wait for more feedback.
go list -f
can probably give us whatever we need from a completions perspective, but the status showing "dirty" for -vcs
hacks would definitely be useful.