diff --git a/README.md b/README.md index 1cf8a73..ad8cd1b 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,24 @@ gncdu implements [NCurses Disk Usage](https://dev.yorhel.nl/ncdu)(ncdu) with gol ## Install -Download executable file from [releases](https://github.com/bastengao/gncdu/releases) page. +### Binaries -Or execute `go install github.com/bastengao/gncdu`. +macOS (Apple Silicon) + + wget -O https://github.com/bastengao/gncdu/releases/download/v0.7.0/gncdu-darwin-arm64 && chmod +x /usr/local/bin/gncdu + +Linux (amd64) + + wget -O /usr/local/bin/gncdu https://github.com/bastengao/gncdu/releases/download/v0.7.0/gncdu-linux-amd64 && chmod +x /usr/local/bin/gncdu + +Or download executable file from [releases](https://github.com/bastengao/gncdu/releases) page. + +### Install from source + + go install github.com/bastengao/gncdu ## Usage gncdu [path] -![screenshot](http://bastengao.com/images/others/gncdu-screenshot-v0.6.0.png) +![screenshot](http://bastengao.com/images/others/gncdu-screenshot-v0.7.0.png) diff --git a/main.go b/main.go index c6fccad..e2ce96b 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,7 @@ func main() { flag.Parse() if helpFlag != nil && *helpFlag { + fmt.Printf("gncdu %s\n", ui.Version) flag.Usage() return } diff --git a/ui/pages.go b/ui/pages.go index cb8decb..835e5bb 100644 --- a/ui/pages.go +++ b/ui/pages.go @@ -235,10 +235,10 @@ func NewHelpPage(app *tview.Application) *HelpPage { } func (p *HelpPage) Show() { - text := `GNCDU v0.6.0 + text := fmt.Sprintf(`GNCDU %s https://github.com/bastengao/gncdu - ` + `, Version) modal := tview.NewModal(). SetText(text). AddButtons([]string{"OK"}). diff --git a/ui/version.go b/ui/version.go new file mode 100644 index 0000000..be8db30 --- /dev/null +++ b/ui/version.go @@ -0,0 +1,3 @@ +package ui + +var Version = "v0.7.0"