diff --git a/CHANGELOG.md b/CHANGELOG.md index ceabba6..9ff696b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## [1.2.0] - 2026-04-17 + +### Changed + +- `git wt list` now shows only the worktree name (branch) by default, producing cleaner, script-friendly output. Pass `--path` to also display the absolute path after the name (`\t`). + ## [1.1.0] - 2026-03-09 ### Added @@ -41,5 +49,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CI workflow with ShellCheck linting and smoke tests on Ubuntu and macOS. - Release workflow with automated GitHub Releases, Homebrew tap updates, and Scoop bucket updates. +[1.2.0]: https://github.com/silasvasconcelos/simple-git-worktreee/releases/tag/v1.2.0 [1.1.0]: https://github.com/silasvasconcelos/simple-git-worktreee/releases/tag/v1.1.0 [1.0.0]: https://github.com/silasvasconcelos/simple-git-worktreee/releases/tag/v1.0.0 diff --git a/README.md b/README.md index fe2e9c8..73d3094 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ my-project/ | Command | Description | |---|---| | `git wt add [base] [--go]` | Create a worktree from current branch. `--go` outputs path for `cd` | -| `git wt list` | List all worktrees | +| `git wt list [--path]` | List all worktrees (names only; `--path` also shows paths) | | `git wt remove ` | Remove a worktree | | `git wt prune` | Clean up stale worktree references | | `git wt path ` | Print the absolute path of a worktree | @@ -135,8 +135,16 @@ git wt add feature-payment main ```bash git wt list -# /Users/you/my-project abc1234 [main] -# /Users/you/my-project/.worktrees/feature-login def5678 [feature-login] +# main +# feature-login +``` + +Pass `--path` to also see the absolute path of each worktree: + +```bash +git wt list --path +# main /Users/you/my-project +# feature-login /Users/you/my-project/.worktrees/feature-login ``` ### Get the path to open in another terminal diff --git a/bin/git-wt b/bin/git-wt index 4b80bc9..ff3333c 100755 --- a/bin/git-wt +++ b/bin/git-wt @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -VERSION="1.1.0" +VERSION="1.2.0" WORKTREE_DIR=".worktrees" HOOKS_CONFIG=".git-wtrc" @@ -136,15 +136,22 @@ EOF usage_list() { cat < [base] [--go] Create a worktree in $WORKTREE_DIR/ Base defaults to current branch - list List all worktrees + list [--path] List all worktrees (--path also shows paths) remove [-db] Remove a worktree (-db deletes branch too) prune Remove stale worktree references path Print the absolute path of a worktree