feat(shell): add xonsh integration#1069
Open
EzraCerpac wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds xonsh support to Television’s shell integration (tv init xonsh) by extending shell detection/CLI enums, introducing a new xonsh integration script using prompt-toolkit keybindings, updating documentation, and adding test coverage for init/completions behavior.
Changes:
- Add
xonshas a supported shell target fortv init, including keybinding rendering and metadata handling. - Introduce a new xonsh integration script (
completion.xsh) with prompt-toolkit keybindings for smart autocomplete and shell history. - Update user/developer docs and add CLI tests for xonsh init output and “unsupported completions” behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/cli/special.rs |
Adds CLI-level tests covering tv init xonsh output markers and tv completions xonsh unsupported behavior. |
television/utils/shell/completion.xsh |
New xonsh prompt-toolkit integration script implementing smart autocomplete + shell history bindings. |
television/utils/shell.rs |
Extends shell enum/mapping/template rendering to include xonsh, plus unit tests for keybindings/metadata/script rendering. |
television/cli/args.rs |
Adds Xonsh to the CLI shell ValueEnum so tv init xonsh / tv completions xonsh parse correctly. |
docs/user-guide/04-shell-integration.md |
Documents how to enable xonsh integration via direct init and via a saved integration file. |
docs/developers/shell-integration-local.md |
Updates local development instructions to include xonsh. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
tested and working for me on tv 0.15.6 and xonsh 0.23.6! thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Adds xonsh shell integration for
tv init xonsh.This includes:
Standalone clap completions remain unsupported for xonsh, matching nu/cmd-style unsupported behavior.
Parts of this PR were generated with AI assistance. I reviewed the changes and checked them locally.
Checklist