Closed TorchedSammy closed 1 year ago
I have the same problem, how do you fix it?
I don't know about Golang, but apply following patch should work:
Save below patch to /tmp/fix-tldr.patch
diff --git a/cli/default.go b/cli/default.go
index d920831..e5b7aed 100644
--- a/cli/default.go
+++ b/cli/default.go
@@ -41,7 +41,7 @@ func NewDefaultPrompt(pgs []string, opts *prompt.Options, static, random bool) (
prompt.WithInformation(information),
prompt.WithSelectionHandler(d.selection),
)
- p.SetExitMsg(defaultExitMessage(list))
+ p.SetExitMsg(defaultExitMessage(nil))
if static {
if err := printStatic(page.Tips); err != nil {
return nil, err
@@ -79,9 +79,10 @@ func (d *DefaultPrompt) selection(item interface{}) error {
func defaultExitMessage(l *prompt.List) [][]term.Cell {
var cells [][]term.Cell
cells = append(cells, term.Cprint(""))
- items, _ := l.Items()
- for _, item := range items {
- cells = append(cells, renderItem(item, nil, false)...)
- }
- return cells
+ // items, _ := l.Items()
+ // for _, item := range items {
+ // cells = append(cells, renderItem(item, nil, false)...)
+ // }
+ // return cells
+ return nil
}
Run command:
$ export HTTP_PROXY="http://127.0.0.1:10809"
$ export HTTPS_PROXY="$HTTP_PROXY"
$ go env -w GO111MODULE=off
$ go get -v github.com/isacikgoz/tldr/cmd/tldr
$ cd "$(go env GOPATH)/src/github.com/isacikgoz/tldr"
$ git apply /tmp/fix-tldr.patch
$ go run cmd/tldr/main.go
@isacikgoz would you mind to take a peek of it?
I'll try it again when I get home in a few hours if maintainer doesn't respond
i tried to get tldr today and it resulted in this error:
i ran
go get github.com/isacikgoz/tldr/cmd/tldr