Conversation
Two new filters expose `Path::parent` and `Path::file_name` to templates,
enabling path traversal that previous filters couldn't express. They unblock
the bare-repo-in-hidden-directory layout (`myproject/.git`), where `{{ repo }}`
resolves to `.git`: users who want a richer worktree-path naming scheme can now
write `{{ repo_path | parent | name }}` to recover `myproject`.
Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 4, 2026
This was referenced May 4, 2026
max-sixty
added a commit
that referenced
this pull request
May 4, 2026
…2605) \`name\` was too generic — likely to collide with future filters operating on domain objects (a Branch, a worktree, a remote). Switch to the POSIX/jinja-convention pair so both filters travel together: ansible ships \`dirname\`/\`basename\`, shell users already know them, and \`dirname\` is no more ambiguous than \`parent\` was. Follow-up to #2592, which landed ~30 minutes ago — no users to break yet. > _This was written by Claude Code on behalf of @max-sixty_ Co-authored-by: Claude <noreply@anthropic.com>
max-sixty
added a commit
that referenced
this pull request
May 5, 2026
## Summary Release v0.48.0. See [CHANGELOG.md](https://github.com/max-sixty/worktrunk/blob/release/CHANGELOG.md) for the full notes. Highlights: - `--format=json` extends to seven step + hook commands (#2560) - `wt step commit` / `wt step squash` gain `--dry-run` (#2557) - New `dirname` / `basename` template filters (#2592, #2605) - New `[remove] delete-branch` config option (#2589) - `wt-perf timeline` subcommand (#2558) - Faster `wt list` on dirty worktrees (#2602) and faster alias dispatch (#2556, #2573) - Short-SHA display honors `core.abbrev` (#2576) - Cleaner `wt config show` shell-integration section for new users ## Test plan - [x] `cargo run -- hook pre-merge --yes` (3497 tests, lints clean) - [x] `cargo semver-checks check-release -p worktrunk` consulted; minor bump confirmed - [ ] CI green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two new filters expose
Path::parentandPath::file_nameto templates, enabling path traversal that previous filters couldn't express. They unblock the bare-repo-in-hidden-directory layout (myproject/.git), where{{ repo }}resolves to.git: users who want a richer worktree-path naming scheme can now write{{ repo_path | parent | name }}to recovermyproject.The interactive bare-repo prompt still suggests the simpler
{{ repo_path }}/../{{ branch | sanitize }}template, since the bare layout already nests worktrees inside a repo-specific wrapper directory — no prefix needed for disambiguation. The filters are there for users with different layout preferences (#1281 discussion).Thanks to @seakayone for reporting #1279 and @Xilis for raising the
parent_dirquestion that prompted this approach.