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
{{ message }}
Repository navigation
feat: Actions — run a command on the selected Project with a key #62
Part of #61. Covers feature 1 (custom keystroke commands) and feature 5 (programs that must run inside the project directory, e.g. lazygit).
What
Add Action to CONTEXT.md: a named command bound to a key in the Picker and run on the selected Project. Define it in config:
[actions.code]
key = "ctrl+v"run = "code {path}"# {path} is replaced with the shell-quoted absolute pathjump = false# also Jump after the command exitsdetach = true# start without waiting; the Picker stays open
[actions.lazygit]
key = "ctrl+l"run = "lazygit"# runs with cwd = the Project
Behaviour
The command runs as sh -c <run> with cwd set to the Project and CDD_PATH exported. {path} is substituted shell-quoted. We avoid $path because zsh ties it to $PATH.
Non-detached (the default): the Picker quits and the program gets /dev/tty for stdin, stdout and stderr. It must not use the binary's stdout, which the Wrapper captures as the Jump target. cdd waits for it and exits with its status.
jump = true: after the program exits, the binary prints the path so the Wrapper Jumps.
detach = true: the program starts in its own session, cdd doesn't wait, output is discarded, and the Picker stays open. If the program fails to start, the error shows on one footer line.
Every Action run on a Project records a Visit.
Key rules (validated at config load, errors name the line)
Key names must be ones the Picker recognises (ctrl+x, alt+x, enter, f1, …).
A user binding overrides a built-in navigation key. Binding ctrl+n takes it away from "down"; the arrow keys still move.
esc and ctrl+c can never be bound.
A plain printable key (a, ?) is an error in the default key map because it would steal typing. It is allowed only with keys.vim = true, where it applies in list focus.
Two Actions on one key is an error. key = "" leaves an Action unbound.
Activity
feat(action): Action type, built-in registry and key validation (#62)
feat(action): Runner starts commands detached or on the terminal (#62)
fix(action): reject a trailing + as an unknown key rather than the pl…
feat(config): decode [actions.*] and merge them onto the built-in Act…
feat(picker): dispatch Action keys; detached Actions keep the Picker …
feat(jump): run the chosen Action, recording its Visit and passing on…
docs: define Action and document [actions.*] (#62)
style: fix golangci-lint findings from #62 (#64)