Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(terminal): custom shell keybindings #313

Conversation

bertrand-chardon
Copy link
Contributor

@bertrand-chardon bertrand-chardon commented Jan 25, 2025

  • allow custom keybindings through configuration
  • this only works for ctrl-xxx keybindings for now (using anything else in the configuration will make tv fall back to ctrl-t and ctrl-r

Fixes #268

- allow custom keybindings through configuration
- this only works for ctrl-xxx keybindings for now
Comment on lines +26 to +27
bind -x '"{tv_smart_autocomplete_keybinding}": tv_smart_autocomplete'
bind -x '"{tv_shell_history_keybinding}": tv_shell_history'
Copy link
Owner

Choose a reason for hiding this comment

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

isn't line 2 (of the file) causing any formatting issues ?

local current_prompt="${READLINE_LINE:0:$READLINE_POINT}"

Copy link
Owner

Choose a reason for hiding this comment

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

Ah nevermind just saw that "replace" above 👍🏻

- extract logic in function in shell
- add default configuration + comments in config.toml
- make format! strings clearer
@bertrand-chardon bertrand-chardon marked this pull request as ready for review January 25, 2025 21:24
@alexpasmantier
Copy link
Owner

Very nice 🔥

@alexpasmantier alexpasmantier merged commit 5271b50 into alexpasmantier:main Jan 25, 2025
3 checks passed
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.

Allow overriding or disabling Ctrl+T keybinding in shell
2 participants