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

Builtin channels are used instead of custom channels when executed through the CLI and shell integration #275

Closed
MisterKartoffel opened this issue Jan 14, 2025 · 1 comment · Fixed by #278
Labels
bug Something isn't working

Comments

@MisterKartoffel
Copy link

Description
Television release 0.9.1 merged PR #260, to allow custom channels to override builtins. This behavior is not reproducible if Television is launched through the terminal or with shell integration.

Minimal configuration file excerpts

  • $XDG_CONFIG_HOME/television/config.toml
[shell_integration.commands]
"ls" = "dirs"
"nvim" = "files"
  • $XDG_CONFIG_HOME/television/custom-channels.toml
[[cable_channel]]
name = "dirs"
source_command = "fd -t d -H . $HOME"
preview_command = "lsd -Al1 {}"

[[cable_channel]]
name = "files"
source_command = "fd -t f -H . $HOME"
preview_command = "bat -n --color=always {}"

Video reproducing the issue

  • First example: shows tv dirs being executed, then changing to the dirs channel through Remote Control. Notice how there's no builtin dirs channel listed, yet the preview changes from builtin to lsd.
  • Second example: nvim is completed using shell integration via zsh. The builtin files previewer is used, changing to bat when the files channel is selected via Remote Control.
  • Third example: the function nf, described below, is executed. It contains a pipe with tv files as stdin, which also reproduces the issue listed in the previous example.
2025-01-14.11-07-53.mp4

nf function as described in $ZDOTDIR/.zshrc

function nf() {
  tv files | xargs -ro nvim
}

Expected behavior
The custom channels with same name as a builtin should be used for all interactions.

Actual behavior
Builtin channels are used instead, only being replaced when the custom channel is loaded via Remote Control.

Environment

  • OS: Arch Linux, kernel 6.12.9-arch1-1
  • Rust version: N/A
  • Project version: Television 0.9.2, build 1.83.0 (2025-01-10)
@alexpasmantier
Copy link
Owner

Thanks for the feedback, should be fixed by #278

alexpasmantier added a commit that referenced this issue Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants