···3535Show a diff interactively and press `y`/`n` to decide:
36363737```bash
3838-hookable --interactive --cmd "sdiff before.rb after.rb"
3838+hookable --interactive --cmd "adiff before.rb after.rb"
3939```
40404141Use a custom accept keybinding:
···4444hookable --interactive --cmd "git diff HEAD" --accept-key "ctrl+y" --reject-key "ctrl+n"
4545```
46464747-Show a diff from a command that exits non-zero (e.g. `sdiff` exits 1 when files differ) and still wait for the user to accept or reject:
4747+Show a diff from a command that exits non-zero (e.g. `adiff` exits 1 when files differ) and still wait for the user to accept or reject:
48484949```bash
5050-hookable --interactive --no-exit-code --cmd "sdiff before.py after.py"
5050+hookable --interactive --no-exit-code --cmd "adiff before.py after.py"
5151```
52525353## Environment variables
···69697070String values are unquoted; booleans, numbers, and nested objects are left as raw JSON.
71717272-## Using hookable with sdiff
7272+## Using hookable with adiff
73737474-[sdiff](https://github.com/acaloiaro/sdiff) is a side-by-side diff TUI that reads `HOOKABLE_*` environment variables directly. When invoked with no file arguments it constructs the diff from the hook payload automatically:
7474+[adiff](https://github.com/acaloiaro/adiff) is a side-by-side diff TUI that reads `HOOKABLE_*` environment variables directly. When invoked with no file arguments it constructs the diff from the hook payload automatically:
75757676- **Edit** — diffs the current file against the result of applying `old_string → new_string`
7777- **Write** — diffs the current file against the new content
···8484 "PreToolUse": [
8585 {
8686 "matcher": "Edit",
8787- "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'sdiff -i'"}]
8787+ "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'adiff -i'"}]
8888 },
8989 {
9090 "matcher": "Write",
9191- "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'sdiff -i'"}]
9191+ "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'adiff -i'"}]
9292 }
9393 ]
9494 }