New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/doc: add option to suppress showing package docs #32597
Comments
Please show an example of what exactly do you mean by a tree output. And how will this help a fuzzy finder. According to your screenshot, each types are already separated by a new line. So I am not exactly sure what you mean by
|
Yep this is the output of go doc
If go doc -tree would only ouput the following, (same but without the intro) then a fuzzy finder will not scramble intro lines in the result
For me the following is much fuzzy finder friendly because no scrambled intro text is ever in the search result and everything is exactly ordered in one line
Notice the difference between the first screenshot and this one for the same search |
I see. I thought -tree meant a tree like structure. So IIUC, you just do not want the package doc(or rather any sort of docs) to appear for fuzzy finder to work properly. I will update the title appropriately and leave it to @robpike to make a call. |
Change https://golang.org/cl/184017 mentions this issue: |
I have no problem with the idea, but the flag name chosen in the CL (go doc -sym) is both misleading (all go doc does is show symbols) and poorly explained. Hoping a better suggestion will come. Once that's sorted, the CL will need to update the go command as well. |
The idea you're looking for is "short" or "compact" or "simple", not "symbol". |
I agree :) , what about
Patchset 3 pushed |
It's not just package docs, though, is it? Other things are suppressed too, are they not? Or at least the intent should be. I think what you're trying to get (we could be on different paths here) is a way to get just a list of the symbols with a concise summary of their types, free of documentation. |
Correct, a one line representation for each symbol without any other text line that isn't a symbol. I can change the docs to
and
So if am not mistaken just the output of
wil give that result. So I probably forgot to short out this too, will do in a new Patchset
|
This is looking good. |
A
go doc -tree
output please would be awesome.Currently there is no way for go doc to output a clean single line separated definitions of types, functions, vars and consts.
For example
go doc | fzf
the intro of a package is scrambled between the output for a fuzzy finderThe text was updated successfully, but these errors were encountered: