Skip to content
CLI Tools
Skill

/xonsh

Use when working with xonsh shell internals — completion system, RichCompletion, CommandContext, contextual_command_completer, completer pipeline, prompt-toolkit integration, key bindings, Python/shell hybrid model, subprocess execution, xontribs, event system, rc.xsh

From plugin
carapace
1.5k15 skills

Claude Code

$ npx -y skills add carapace-sh/carapace --skill xonsh --agent claude-code

SKILL.md

xonsh.SKILL.md
name: xonsh
description: >
  Use when working with xonsh shell internals — completion system, RichCompletion,
  CommandContext, contextual_command_completer, completer pipeline, prompt-toolkit
  integration, key bindings, Python/shell hybrid model, subprocess execution, xontribs,
  event system, rc.xsh configuration, or environment variables. Triggers on: "xonsh",
  "xonsh completion", "xonsh RichCompletion", "xonsh CommandContext",
  "xonsh completer", "contextual_command_completer", "xonsh prompt-toolkit",
  "xonsh xontrib", "xonsh event", "xonsh rc.xsh", "add_one_completer",
  "sub_proc_get_output", "XONSH_COMPLETER_MODE", "xonsh subprocess",
  "xonsh quoting", "xonsh environment".
user-invocable: true

Xonsh Shell In-Depth Reference

Comprehensive reference for [xonsh](https://xon.sh/) shell internals, with emphasis on the completion system and how external tools hook into it.

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

| Keywords | Reference | |----------|----------| | RichCompletion, CommandContext, CommandArg, CompletionContext, contextual_command_completer, contextual_command_completer_for, non_exclusive_completer, add_one_completer, Completer class, completer pipeline, exclusive vs non-exclusive, deduplication, sorting tiers, filter function, prefix_len, append_closing_quote, append_space, display, description, style, provider, tag_provider, apply_lprefix, complete_from_sub_proc, comp_based_completer, on_completer_filter, XONSH_COMPLETER_MODE, XONSH_COMPLETER_TRACE, COMPLETION_QUERY_LIMIT, XONSH_COMPLETER_DIRS, CommandCompleter, xompletions, bash completion bridge, path completer, command completer, python completer, base completer | [references/completion.md](references/completion.md) | | PromptToolkitShell, PromptToolkitCompleter, PromptSession, Completion, CompleteStyle, key bindings, on_ptk_create, COMPLETIONS_DISPLAY, COMPLETION_MODE, COMPLETIONS_CONFIRM, COMPLETIONS_MENU_ROWS, UPDATE_COMPLETIONS_ON_KEYPRESS, COMPLETION_IN_THREAD, AUTO_SUGGEST_IN_COMPLETIONS, XONSH_PROMPT_AUTO_SUGGEST, auto-suggest, menu-complete, display_meta, _highlight_match, unquote, ptk shell, vi mode, emacs mode, XONSH_AUTOPAIR | [references/prompt-toolkit.md](references/prompt-toolkit.md) | | Python-powered shell, subprocess execution, SubprocSpec, CommandPipeline, capture modes, $() vs !() vs $[] vs ![], pipe redirect, a>p, e>p, subprocess syntax, Python expressions, shell expressions, @(), $(), ![], subprocess wrapping, quoting, string literals, raw strings, p-strings, f-strings, path strings, word splitting, glob expansion, tilde expansion, environment access, $VAR, ${VAR}, ${{VAR}}, alias system, callable alias, ExecAlias | [references/language-execution.md](references/language-execution.md) | | rc.xsh, .xonshrc, XONSHRC, XONSHRC_DIR, XONSH_CONFIG_DIR, xontrib, xontrib load, xontrib list, _load_xontrib_, _unload_xontrib_, entry points, event system, Event, LoadEvent, EventManager, on_chdir, on_precommand, on_postcommand, on_command_not_found, on_pre_prompt, on_post_prompt, on_envvar_change, on_transform_command, on_exit, on_ptk_create, on_completer_filter, XSH, XSH.env, XSH.completers, XSH.commands_cache, XSH.builtins, environment variables, Env class, Var, VarPattern, detype, LsColors, EnvPath, XONSH_* env vars, BASH_COMPLETIONS, COMPLETE_DOTS, SUBSEQUENCE_PATH_COMPLETION, FUZZY_PATH_COMPLETION, SUGGEST_THRESHOLD, CMD_COMPLETIONS_SHOW_DESC, ALIAS_COMPLETIONS_OPTIONS_BY_DEFAULT | [references/startup-config.md](references/startup-config.md) |

Quick Guide

  • **How do I write a contextual completer?** → [references/completion.md](references/completion.md)
  • **How does the completer pipeline work?** → [references/completion.md](references/completion.md)
  • **What is RichCompletion and its fields?** → [references/completion.md](references/completion.md)
  • **How do I register a completer with add_one_completer?** → [references/completion.md](references/completion.md)
  • **How does exclusive vs non-exclusive work?** → [references/completion.md](references/completion.md)
  • **How does the bash completion bridge work?** → [references/completion.md](references/completion.md)
  • **How does prompt-toolkit render completions?** → [references/prompt-toolkit.md](references/prompt-toolkit.md)
  • **How do I configure completion display?** → [references/prompt-toolkit.md](references/prompt-toolkit.md)
  • **How do I add custom key bindings?** → [references/prompt-toolkit.md](references/prompt-toolkit.md)
  • **How does xonsh execute subprocess commands?** → [references/language-execution.md](references/language-execution.md)
  • **What are the capture modes ($() vs !())?** → [references/language-execution.md](references/language-execution.md)
  • **How does quoting work in xonsh?** → [references/language-execution.md](references/language-execution.md)
  • **How do I set up rc.xsh?** → [references/startup-config.md](references/startup-config.md)
  • **How do I write a xontrib?** → [references/startup-config.md](references/startup-config.md)
  • **How does the event system work?** → [references/startup-config.md](references/startup-config.md)
  • **What are the XONSH_* environment variables?** → [references/startup-config.md](references/startup-config.md)

Cross-Project References

  • For carapace-specific xonsh integration (snippet, patch phase, value formatting, JSON output, style conversion), see the **carapace-dev** skill → `references/shell-xonsh.md`.
Read more
@carapace-sh
Ships withcarapace

Command argument completion generator for [cobra]. Supported shells: Bash Cmd (experimental) Elvish Fish Nushell Oil Powershell Tcsh (experimental) Xonsh Zsh

Stars on GitHub

Momentum

stars in total
1.5k
Star history of carapace-sh/carapace on GitHub, a chart by star-history.com

Other skills on carapace.

bash-ble

bash-ble

Use when working with ble.sh (Bash Line Editor) internals — completion system, cand/yield, menu styles, progcomp integration,…

bash

bash

Use when working with bash shell internals — programmable completion, Readline, quoting/expansion, execution model, startup…

carapace-dev

carapace-dev

Use when developing or debugging the carapace library — Action API, traverse engine, shell formatters, style system, pflag…

cmd-clink

cmd-clink

Use when working with clink or cmd.exe shell internals — clink completion system, argmatcher Lua API, match generators, Readline…

cobra-dev

cobra-dev

Use when developing or debugging spf13/cobra internals — Command struct internals, ExecuteC dispatch, Find vs Traverse, flag set…

compound-skill

compound-skill

Use when creating a compound skill — a structured knowledge base for a project or topic that uses a SKILL.md routing table and…

More skills from other plugins.

cli-anything-adguardhome

cli-anything-adguardho…

Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI…

@hkuds@hkudsInstall Skill
find-skills

find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a…

skills4d40k
@vercel-labs-2@vercel-labs-2Install Skill
ohmyposh

ohmyposh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on…

@jandedobbeleer@jandedobbeleerInstall Skill

Questions about xonsh.

Which coding agents can use xonsh?
xonsh installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.