Skip to content

sync help, man page and reference with current behavior - #13

Merged
gentbot merged 1 commit into
mainfrom
docs/sync-help-man-and-reference
Sep 26, 2026
Merged

gentbot merged 1 commit into
mainfrom
docs/sync-help-man-and-reference

Conversation

@gentbot

@gentbot gentbot commented Sep 26, 2026

Copy link
Copy Markdown
Owner
  • wrktr_use: parses the five session keys and never executes the config; a failed load keeps the previous session. The reference also claimed old-format configs are sourced, which has been untrue since 1.0.1.
  • wrktr_push (-u, force offer only after a rejection), wrktr_adopt (all remotes, uncommitted-changes warning), wrktr_reload (keeps the session, refuses a bad file), wrktr_git in dry-run (read-only commands run) and the offline fallback of wrktr_add/wrktr_checkout are now documented.
  • Man page: replace the placeholder clone URLs, keep the ./install.sh line from being dropped as a macro, and use a date mandoc can parse.

Tests: guard tests for the help, man page and reference statements, a check for placeholder URLs in every doc, and a mandoc lint test. CI installs mandoc on Linux so that test runs there.

What and why

Changes

Checklist

All PRs

  • bats tests/ passes locally
  • shellcheck worktree-functions.sh passes locally
  • CHANGELOG.md updated (add entry under [Unreleased])

New public functions

  • Docblock above function follows the project format
  • [ "$1" = "--help" ] && { wrktr_help <name>; return 0; } guard present
  • wrktr_validate || return 1 at top (for session-dependent functions)
  • Dry-run support: _wrktr_run wraps mutations; _wrktr_is_dryrun gates conditional logic
  • Error messages use _wrktr_breaker red "..." (writes to stderr)
  • Help entry added to wrktr_help case statement
  • Documentation added to docs/wrktr.md function reference
  • Row added to Quick reference table in docs/wrktr.md
  • Tab completion registered if function takes branch or session names
  • Tests added to tests/wrktr.bats (at least one success, one failure)

Behavior changes to existing functions

  • Describe whether the change is backwards-compatible
  • Existing tests updated to reflect new behavior
  • docs/wrktr.md updated if command usage or behavior description changed

- wrktr_use: parses the five session keys and never executes the config;
  a failed load keeps the previous session. The reference also claimed
  old-format configs are sourced, which has been untrue since 1.0.1.
- wrktr_push (-u, force offer only after a rejection), wrktr_adopt (all
  remotes, uncommitted-changes warning), wrktr_reload (keeps the session,
  refuses a bad file), wrktr_git in dry-run (read-only commands run) and
  the offline fallback of wrktr_add/wrktr_checkout are now documented.
- Man page: replace the placeholder clone URLs, keep the ./install.sh
  line from being dropped as a macro, and use a date mandoc can parse.

Tests: guard tests for the help, man page and reference statements, a
check for placeholder URLs in every doc, and a mandoc lint test. CI
installs mandoc on Linux so that test runs there.
@gentbot
gentbot merged commit 2d444ec into main Sep 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant