Shell Integration
Your shell talks to Chau7. Command boundaries, directories, exit codes. Automatically.
What is Shell Integration in Chau7?
Shell Integration is a feature in the Chau7 terminal that installs lightweight hooks into zsh, bash, and fish. These hooks report command boundaries, working directories, and exit codes to Chau7 automatically.
Chau7 uses these signals to build a structured model of each command: the prompt region, the command text, the output region, the exit code, and the working directory at the time of execution.
How does Chau7's shell integration work?
Chau7 installs lightweight shell hooks into zsh, bash, and fish that emit invisible escape sequences at key points in the command lifecycle. OSC 7 reports the current working directory after every directory change. A proprietary OSC 9 sequence (\e]9;chau7;exit=${code}\a) reports exit codes after each command completes.
Chau7's shell integration hooks are minimal, under 20 lines per shell. They do not modify shell behavior, aliases, or key bindings. Chau7 auto-injects these hooks when it detects a supported shell at startup.
What features does Chau7's shell integration enable?
Chau7's structured command model powers click-to-select-command-output, scroll-to-previous-prompt, and new-tab-in-same-directory. Per-command timing becomes available because Chau7 knows exactly when each command starts and finishes.
Directory-aware tab titles update automatically in Chau7 because OSC 7 reports the current working directory. Command-level navigation lets you jump between prompts without scrolling through output.
Does Chau7's shell integration modify your shell configuration files?
No. Chau7 injects the integration hooks at shell startup via environment variables. Chau7 does not modify .zshrc, .bashrc, or config.fish. Your configuration files remain untouched.
Users who manage their own shell configuration can disable Chau7's auto-injection in settings and add the hooks manually instead.
What happens if you use a shell that is not zsh, bash, or fish?
Chau7 still functions as a standard terminal emulator. Features that depend on Chau7's shell integration, like command detection and directory tracking, will be unavailable. All other it functionality works normally.
You can manually emit OSC 7 and the proprietary OSC 9 sequences from any shell to enable Chau7's shell integration features. This makes Chau7's integration extensible to shells like nushell, elvish, or custom interpreters.
How does Chau7's shell integration compare to other terminals?
iTerm2 offers shell integration that requires manual script installation. Warp has built-in integration but only for zsh. Alacritty and Kitty have no shell integration at all.
Chau7 auto-injects minimal hooks into zsh, bash, and fish at startup without modifying configuration files. Chau7's shell integration provides command detection, directory tracking, and exit code reporting out of the box with zero configuration.
Why Chau7's shell integration matters
Without shell integration, a terminal sees only a stream of characters with no structure. The terminal cannot tell where one command ends and another begins, what the current directory is, or whether the last command succeeded.
Chau7's shell integration hooks into zsh, bash, and fish to report all of this automatically. This enables per-command timing, directory-aware tab titles, and command-level navigation in Chau7 with zero manual setup.
Questions this answers
- What is Shell Integration in Chau7 terminal?
- How does Chau7's shell integration compare to other terminals?
- How does terminal shell integration work?
- Does shell integration modify my shell configuration files?
- What happens if I use a shell that is not zsh, bash, or fish?
Frequently asked questions
What is Shell Integration in Chau7 terminal?
Shell Integration is a feature in the Chau7 terminal that installs lightweight hooks into zsh, bash, and fish to report command boundaries, working directories, and exit codes. Chau7 uses these signals to build a structured model of each command, enabling features like click-to-select output and scroll-to-previous-prompt.
How does Chau7's shell integration compare to other terminals?
iTerm2 offers shell integration that requires manual script installation. Warp has built-in integration but only for zsh. Alacritty and Kitty have no shell integration. Chau7 auto-injects minimal hooks into zsh, bash, and fish at startup without modifying configuration files, providing command detection, directory tracking, and exit code reporting out of the box.
Does Chau7's shell integration modify my shell configuration files?
No. Chau7 injects the integration hooks at shell startup via environment variables, without modifying .zshrc, .bashrc, or config.fish. Your configuration files remain untouched. You can disable auto-injection in Chau7's settings.
What happens if I use a shell that is not zsh, bash, or fish?
Chau7 still functions as a standard terminal emulator. Features that depend on Chau7's shell integration like command detection and directory tracking will be unavailable, but all other it functionality works normally. You can manually emit OSC 7 and the proprietary OSC 9 sequences from any shell to enable integration.
Can I disable Chau7's shell integration?
Yes. A single toggle in Chau7's settings disables automatic hook injection. You can also selectively disable individual features like directory tracking while keeping others active.