From 2dabd1ca4d91548b527669a202dc01eb7b776e0a Mon Sep 17 00:00:00 2001 From: Haruaki Tamada Date: Sat, 20 May 2023 08:11:26 +0900 Subject: [PATCH 1/2] fix: parsing error of init script in zsh --- cmd/sibling/data/sibling.bash | 6 ++---- cmd/sibling/main_test.go | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cmd/sibling/data/sibling.bash b/cmd/sibling/data/sibling.bash index 700d3af..5be1282 100644 --- a/cmd/sibling/data/sibling.bash +++ b/cmd/sibling/data/sibling.bash @@ -1,4 +1,4 @@ -function __change_directory_to_sibling() { +__change_directory_to_sibling() { traversing_type="$1" if [[ "$1" == "" ]]; then traversing_type="next" @@ -15,7 +15,7 @@ function __change_directory_to_sibling() { return $sibling_status } -function __cd_sibling_filtering() { +__cd_sibling_filtering() { result="$(./sibling --list | $1)" if [[ $(echo $result | wc -l) -ne 1 ]]; then echo "Error: multiple paths are given" @@ -53,5 +53,3 @@ cdrand() { __change_directory_to_sibling random } -alias nextdir="sibling -t next" -alias prevdir="sibling -t previous" diff --git a/cmd/sibling/main_test.go b/cmd/sibling/main_test.go index 9facb20..5737ad0 100644 --- a/cmd/sibling/main_test.go +++ b/cmd/sibling/main_test.go @@ -44,7 +44,7 @@ func Example_ShellFunctionGenerator() { cmd.SetArgs([]string{"--init", "bash"}) cmd.Execute() // Output: - // function __change_directory_to_sibling() { + // __change_directory_to_sibling() { // traversing_type="$1" // if [[ "$1" == "" ]]; then // traversing_type="next" @@ -61,7 +61,7 @@ func Example_ShellFunctionGenerator() { // return $sibling_status // } // - // function __cd_sibling_filtering() { + // __cd_sibling_filtering() { // result="$(./sibling --list | $1)" // if [[ $(echo $result | wc -l) -ne 1 ]]; then // echo "Error: multiple paths are given" @@ -98,9 +98,6 @@ func Example_ShellFunctionGenerator() { // cdrand() { // __change_directory_to_sibling random // } - // - // alias nextdir="sibling -t next" - // alias prevdir="sibling -t previous" } func Example_parent() { From 8d0434539cb3dea53cabb0e2d4de266906ece310 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 19 May 2023 23:11:48 +0000 Subject: [PATCH 2/2] update version to 1.2.4, ready to publish v1.2.4 --- Makefile | 2 +- README.md | 2 +- cmd/sibling/main.go | 2 +- docs/config.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bf0ffd0..eeb9cb7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GO=go NAME := sibling -VERSION := 1.2.3 +VERSION := 1.2.4 DIST := $(NAME)-$(VERSION) all: test build diff --git a/README.md b/README.md index 5ceda4d..f638e3f 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.2.3-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.2.3) +[![Version](https://img.shields.io/badge/Version-1.2.4-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.2.4) get next/previous sibling directory name. diff --git a/cmd/sibling/main.go b/cmd/sibling/main.go index 5336514..b6383ac 100644 --- a/cmd/sibling/main.go +++ b/cmd/sibling/main.go @@ -10,7 +10,7 @@ import ( "github.com/tamada/sibling" ) -const VERSION = "1.2.3" +const VERSION = "1.2.4" type options struct { absolute bool diff --git a/docs/config.toml b/docs/config.toml index 4684ba8..7868442 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -15,7 +15,7 @@ pygmentsStyle = "pygments" project_tagline = "get next/previous sibling directory name" dateFormat = "2006-01-02" katex = true - version = "1.2.3" + version = "1.2.4" footer = "[![GitHub](https://img.shields.io/badge/GitHub-tamada/sibling-blueviolet.svg?logo=github)](https://github.com/tamada/sibling) Made with [Hugo](https://gohugo.io/). Theme by [Cayman](https://github.com/zwbetz-gh/cayman-hugo-theme). Deployed to [GitHub Pages](https://pages.github.com/)." [menu]