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

Allow overriding or disabling Ctrl+T keybinding in shell #268

Closed
logoff opened this issue Jan 10, 2025 · 10 comments · Fixed by #313
Closed

Allow overriding or disabling Ctrl+T keybinding in shell #268

logoff opened this issue Jan 10, 2025 · 10 comments · Fixed by #313
Assignees
Labels
enhancement New feature or request

Comments

@logoff
Copy link

logoff commented Jan 10, 2025

Description
When I execute in the shell Ctrl+T, I get this error:

Error:
   0: No channel found for prompt:

I guess this happens because the shell integration is expecting a command here. However, I use fzf-file-widget as generic option for any command.

Would it be possible to override Ctrl+T keybinding? I don't find the way.

Example
Just press Ctrl+T in the shell.

Expected behavior
Television allowing changing shell keybinding, or at least disabling some particular keybindings.

Actual behavior
I get the described error.

Environment

  • OS: Ubuntu 24.04
  • Project version: 0.9.2
@logoff logoff added the bug Something isn't working label Jan 10, 2025
@alexpasmantier alexpasmantier added enhancement New feature or request and removed bug Something isn't working labels Jan 10, 2025
@alexpasmantier
Copy link
Owner

Will add an option to configure the default bindings with something like:

tv init zsh --bind-history 'C-r' --bind-smart-completion 'C-t'

@alexpasmantier alexpasmantier self-assigned this Jan 10, 2025
@logoff
Copy link
Author

logoff commented Jan 11, 2025

Will add an option to configure the default bindings with something like:

tv init zsh --bind-history 'C-r' --bind-smart-completion 'C-t'

that would be very useful ❤️

@affanshahid
Copy link

Would be cool if we can get an option to disable the shell-history search hotkey

@bbigras
Copy link

bbigras commented Jan 16, 2025

Will add an option to configure the default bindings with something like:

tv init zsh --bind-history 'C-r' --bind-smart-completion 'C-t'

Is it the same thing that @logoff was asking for?

It would be nice to be able to customize the commands (like C-r, C-p...) and be able to disable the history one since I use https://github.com/atuinsh/atuin.

I might be wrong, but I think @logoff was saying that if you hit C-t in a shell without a command, you get the No channel found for prompt error.

Current workaround is this:

[shell_integration.commands]
"" = "files"

but maybe it would be nice to have something like "*" = "files" or a default, so you could use tv with any command.

Like if I try with a fake aaa command:

❯ aaa Error:
   0: No channel found for prompt: aaa

@bertrand-chardon
Copy link
Contributor

after #313 it is now possible to configure the keybindings for shell autocomplete and command history through the configuration file, but only for ctrl+xxx keybindings

I will try to make the feature more generic in the days to come and possibly have a look at command line options as well

@bbigras
Copy link

bbigras commented Jan 25, 2025

With #313, is it possible to disable the command_history binding?

@alexpasmantier
Copy link
Owner

alexpasmantier commented Jan 25, 2025

With #313, is it possible to disable the command_history binding?

Not yet, but you could just bind it to something you never use in the meantime so that it doesn't get in your way.

@affanshahid
Copy link

This is great! Any ETA on when you're planning to release?

@alexpasmantier
Copy link
Owner

I'm releasing 0.10.1 tomorrow

@affanshahid
Copy link

Working like a charm, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants