Skip to content

Add configurable custom commands#42

Merged
textfuel merged 1 commit intotextfuel:mainfrom
seflue:feat/custom-commands
Apr 16, 2026
Merged

Add configurable custom commands#42
textfuel merged 1 commit intotextfuel:mainfrom
seflue:feat/custom-commands

Conversation

@seflue
Copy link
Copy Markdown
Contributor

@seflue seflue commented Apr 13, 2026

Closes #39

Let users bind shell commands to keys, with Go template access to
the focused issue, project, or comment. Each command declares the
UI contexts in which it fires (issues, info, projects,
detail, detail.comments); when contexts: is omitted, the
default is wherever an issue is focused.

customCommands:
  - key: "ctrl+y"
    name: "Copy issue key"
    command: "printf %s {{.Key}} | wl-copy"
    suspend: false
  - key: "ctrl+w"
    name: "Log work"
    command: "jira issue worklog add {{.Key}}"

Custom bindings take precedence over built-in keys, so users can
override any action. A suspend flag controls TUI suspension for
the command's duration, and a shellescape template helper is
available for safe interpolation. Registered commands appear in the
help overlay.

@seflue seflue requested a review from textfuel as a code owner April 13, 2026 00:30
Copy link
Copy Markdown
Owner

@textfuel textfuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really like this feature, custom commands have been on my wishlist for a while
left some small notes inline, if any of those land i think this becomes great
thanks for writing it up

Comment thread pkg/config/config.go
Comment thread pkg/tui/custom_commands.go Outdated
Comment thread pkg/tui/app.go
@seflue seflue force-pushed the feat/custom-commands branch from b33bb47 to 6a2a92c Compare April 13, 2026 16:08
@seflue seflue requested a review from textfuel April 13, 2026 16:15
Bind shell commands to keys with Go template access to the focused
issue, project, or comment. Each command declares the UI contexts
in which it fires (issues, info, projects, detail, detail.comments);
when `contexts:` is omitted, the default is wherever an issue is
focused.

Custom bindings take precedence over built-in keys, so users can
override any action. A `suspend` flag controls TUI suspension for
the command's duration, and a `shellescape` template helper is
available for safe interpolation. Registered commands appear in
the help overlay.
@seflue seflue force-pushed the feat/custom-commands branch from 6a2a92c to 5a8db18 Compare April 15, 2026 06:29
@textfuel textfuel merged commit 45afec5 into textfuel:main Apr 16, 2026
2 checks passed
@seflue seflue deleted the feat/custom-commands branch April 16, 2026 15:53
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.

Configurable custom commands bound to keys

2 participants