diff --git a/README.md b/README.md index 9d28355..5a07d35 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ ![](img/jsonui.gif) ## Install -`go get -u github.com/gulyasm/jsonui` +`go install github.com/gulyasm/jsonui@latest` +Binary will be installed into `${GOPATH}/bin`, where `GOPATH` defaults to `~/go`. Make sure the bin directory is in your `$PATH`. ## Binary Releases [Binary releases are availabe](https://github.com/gulyasm/jsonui/releases) diff --git a/jsonui.go b/jsonui.go index 1f6fa0d..5d4dc5e 100644 --- a/jsonui.go +++ b/jsonui.go @@ -120,6 +120,9 @@ func main() { if err := g.SetKeybinding(treeView, 'e', gocui.ModNone, toggleExpand); err != nil { log.Panicln(err) } + if err := g.SetKeybinding(treeView, 'c', gocui.ModNone, toggleExpand); err != nil { + log.Panicln(err) + } if err := g.SetKeybinding(treeView, 'E', gocui.ModNone, expandAll); err != nil { log.Panicln(err) } @@ -147,7 +150,8 @@ j/ArrowDown ═ Move a line down k/ArrowUp ═ Move a line up J/PageDown ═ Move 15 line down K/PageUp ═ Move 15 line up -e ═ Toggle expend/collapse node +e ═ Toggle expand/collapse node +c ═ Toggle expand/collapse node E ═ Expand all nodes C ═ Collapse all nodes q/ctrl+c ═ Exit