-
Notifications
You must be signed in to change notification settings - Fork 220
Escape characters (^[[) leak into zsh completion data causing errors #405
Copy link
Copy link
Open
Description
Description
When using inshellisense with zsh, escape characters ( / ) leak into the shell's completion match data, causing errors in zsh's core completion functions.
Error
_setup:33: bad math expression: illegal character: ^[
This occurs in zsh's built-in _setup function (at /usr/share/zsh/functions/Completion/Base/_setup) when it tries to manipulate compstate[list] which contains embedded escape sequences from inshellisense's PTY layer.
Steps to Reproduce
- Install inshellisense (git build from main)
- Configure zsh with:
- powerlevel10k prompt
- zsh-autosuggestions
- zsh-completions
- fzf-tab
- Run
isto start an inshellisense session - Press Tab to trigger completions
Expected Behavior
Tab completions work without errors. Escape sequences from inshellisense's PTY should not leak into zsh's completion data.
Actual Behavior
Errors like _setup:33: bad math expression: illegal character: ^[ appear. Completions still function but produce noisy error output.
Additional Context
- The issue also affects fzf-tab (
-ftb-generate-complist:33: bad math expression: illegal character: ^[) - The escape characters appear to be injected into
compstate[list]or the completion match data by inshellisense's PTY before zsh's completion system processes them - Disabling
list-packed,list-rows-first, andlist-colorsvia zstyle does not resolve the issue since the escape characters are in the match data itself, not the display options
Environment
- OS: Arch Linux (CachyOS)
- Shell: zsh 5.9
- inshellisense: git build (main branch, 0.0.1.r1.g86bdd7b)
- Node.js: v22.22.2
- Terminal: various (issue reproduces in all)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels