diff --git a/Makefile b/Makefile index 1d89217..61578ec 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO=go NAME := sibling -VERSION := 1.1.1 +VERSION := 1.1.2 DIST := $(NAME)-$(VERSION) all: test build diff --git a/README.md b/README.md index ab3541d..e093525 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/tamada/sibling)](https://goreportcard.com/report/github.com/tamada/sibling) [![License](https://img.shields.io/badge/License-WTFPL-green.svg)](https://github.com/tamada/sibling/blob/master/LICENSE) -[![Version](https://img.shields.io/badge/Version-1.1.1-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.1) +[![Version](https://img.shields.io/badge/Version-1.1.2-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.2) get next/previous sibling directory name. diff --git a/cmd/sibling/main.go b/cmd/sibling/main.go index de80bfd..1d256cb 100644 --- a/cmd/sibling/main.go +++ b/cmd/sibling/main.go @@ -10,7 +10,7 @@ import ( "github.com/tamada/sibling" ) -const VERSION = "1.1.1" +const VERSION = "1.1.2" type options struct { absolute bool @@ -119,7 +119,7 @@ func perform(c *cobra.Command, args []string) error { } params := opts.buildParams(c) c.SilenceUsage = true - for _, arg := range args { + for _, arg := range constructArgs(args) { if len(args) > 1 { params.printer.PrintHeader(fmt.Sprintf("===== %s =====", arg)) } @@ -133,7 +133,13 @@ func perform(c *cobra.Command, args []string) error { } } return nil +} +func constructArgs(args []string) []string { + if len(args) == 0 { + return []string{"."} + } + return args } func main() { diff --git a/docs/content/_index.md b/docs/content/_index.md index 1365da0..60b228d 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -10,7 +10,7 @@ title: ":house: Home" [![Go Report Card](https://goreportcard.com/badge/github.com/tamada/sibling)](https://goreportcard.com/report/github.com/tamada/sibling) [![License](https://img.shields.io/badge/License-WTFPL-green.svg)](https://github.com/tamada/sibling/blob/master/LICENSE) -[![Version](https://img.shields.io/badge/Version-1.1.1-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.1) +[![Version](https://img.shields.io/badge/Version-1.1.2-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.2) ## :speaking_head: Description