You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(hook): regenerate subcommand wrapper when new entry added to existing program (sassman#89)
## Summary
- Adding a second subcommand alias under the same program (e.g. `c:t`
after `c:l` already exists) would not appear in the shell until the next
session
- The hook skipped reload because it only tracked program names (`c`) in
`_AM_PROJECT_ALIASES` — adding a new entry looked identical to the
existing state
- Fix: also store individual subcommand keys (`c:l`, `c:t`) in
`_AM_PROJECT_ALIASES` so change detection is precise; unloading still
operates only on program wrapper names (filtered by absence of `:`)
## Test plan
- [x] `am add c:t "cargo test"` in a project with `c:l` already defined
— `c t` should work immediately without reopening the shell
- [x] `am l` still shows both entries after adding
- [x] Leaving and re-entering the project directory still loads/unloads
the `c` wrapper correctly
---------
Signed-off-by: Sven Kanoldt <[email protected]>
0 commit comments