From 10066a3df50e2402e552ef572b9813e09ead8fe4 Mon Sep 17 00:00:00 2001 From: Haruaki Tamada Date: Mon, 23 Dec 2024 13:50:28 +0900 Subject: [PATCH 1/3] refactor init.bash: improve variable handling and output formatting in sibling functions --- assets/init/init.bash | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/assets/init/init.bash b/assets/init/init.bash index 71239f2..505ce0a 100644 --- a/assets/init/init.bash +++ b/assets/init/init.bash @@ -5,16 +5,16 @@ __change_directory_to_sibling() { fi step=1 if [[ $# -eq 2 ]]; then - step=$2 + step=$2 fi next=$(sibling --type $traversing_type --csv --step $step) sibling_status=$? - result=$(echo $next | tr -s ',' ' ') + result=($(echo $next | tr -s ',' ' ')) if [[ $sibling_status -eq 0 ]] ; then - cd ${result[1]} - echo "$PWD (${result[3]}/${result[4]})" + cd "$(echo ${result[2]} | xargs)" + echo "$PWD (${result[4]}/${result[5]})" else - echo "Done (${result[3]}/${result[4]})" + echo "Done (${result[4]}/${result[5]})" cd .. fi return $sibling_status @@ -37,14 +37,15 @@ __ls_sibling() { fi step=1 if [[ $# -eq 2 ]]; then - step=$2 + step=$2 fi next=$(sibling --absolute --type $traversing_type --csv --step $step) sibling_status=$? - result=$(echo $next | tr -s ',' ' ') + result=($(echo $next | tr -s ',' ' ')) if [[ $sibling_status -eq 0 ]]; then - echo ${result[1]} - ls ${result[1]} + r=$(echo ${result[2]} | xargs) + echo "$r (${result[4]}/${result[5]})" + ls "$r" else echo "no more siblings" fi @@ -59,7 +60,7 @@ lsprev() { } lsrand() { - __ls_sibling rand + __ls_sibling random } lsfirst() { From 2a6602554bcfe1223c92f5bb26c3ca9b34c80efc Mon Sep 17 00:00:00 2001 From: Haruaki Tamada Date: Mon, 23 Dec 2024 13:55:10 +0900 Subject: [PATCH 2/3] fix update_version.sh: correct version update sed script for Cargo.toml --- .bin/update_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/update_version.sh b/.bin/update_version.sh index 466dbec..ab32413 100755 --- a/.bin/update_version.sh +++ b/.bin/update_version.sh @@ -19,6 +19,6 @@ echo "$PREV_VERSION -> $VERSION (${PREV_VERSION//-/--} -> ${VERSION//-/--})" sed -e "s#Version-${PREV_VERSION//-/--}-information#Version-${VERSION//-/--}-information#g" -e "s#tag/v${PREV_VERSION}#tag/v${VERSION}#g" README.md > a; mv a README.md sed -e "s#version = \".*\"#version = \"${VERSION}\"#g" docs/config.toml > a ; mv a docs/config.toml -sed "s/^version= /version = "${VERSION}"/g" Cargo.toml > a && mv a Cargo.toml +sed "s/^version = \".*\"/version = \"${VERSION}\"/g" Cargo.toml > a && mv a Cargo.toml echo "Replace version from \"${PREV_VERSION}\" to \"${VERSION}\"" From 883500e70a3a1dbc5da79a8822cd87131cbac5c7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 23 Dec 2024 04:55:41 +0000 Subject: [PATCH 3/3] update version to 2.0.0-beta-6, ready to publish v2.0.0-beta-6 --- Cargo.toml | 2 +- docs/config.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 547703d..31003f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sibling" -version = "2.0.0-beta-1" +version = "2.0.0-beta-6" description = "get next/previous sibling directory name." repository = "https://github.com/tamada/sibling" homepage = "https://tamada.github.io/sibling" diff --git a/docs/config.toml b/docs/config.toml index 6c444f3..b22ea60 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 = "2.0.0-beta-5" + version = "2.0.0-beta-6" 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]