diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-20 09:12:03 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-20 09:12:03 -0500 |
| commit | 231cd3f6d37368128c33cd5d8adbea5810407529 (patch) | |
| tree | 9534d2d158fa9f0d9975af817fe886d1c7625dbb /scripts/setup-chess.sh | |
| parent | 1815b1fc23aef6c95f8580aae476f98114508423 (diff) | |
| download | archsetup-231cd3f6d37368128c33cd5d8adbea5810407529.tar.gz archsetup-231cd3f6d37368128c33cd5d8adbea5810407529.zip | |
hey: convert alias to function with git awareness + FETCH_HEAD cache
The 'hey' alias launched claude with 'Read docs/protocols.org' — broken
after the docs/ → .ai/ restructure. While updating the path, add
matching behavior to aix:
- Bail early if the current dir isn't a .ai/ template project
- Fetch upstream only when FETCH_HEAD is stale (>10 min old) — avoids
re-fetching on back-to-back invocations in the same project
- Auto-pull when clean, behind, not ahead
- Print a one-line git-status summary otherwise (↑N ↓N dirty)
- Launch claude with the updated .ai/protocols.org path
Function identical across .bashrc.d and .zshrc.d (bash/zsh compatible).
Tested: non-template dir bails cleanly with exit 1; template project
shows status and launches claude; repeated invocations reuse
FETCH_HEAD cache silently.
Diffstat (limited to 'scripts/setup-chess.sh')
0 files changed, 0 insertions, 0 deletions
