Skip to content

autocomplete zsh script adding ANSI codes corrupting .zshrc file #482

@giovariot

Description

@giovariot

When running the suggested printf "$(internxt autocomplete script zsh)" >> ~/.zshrc; source ~/.zshrc command ANSI codes get added to .zshrc therefore showing the following error when running it:

Checking credentials... done ✓
/Users/username/.zshrc:105: bad pattern: ^[[1A

And showing the following text inside .zshrc

^[[1A
INTERNXT_AC_ZSH_SETUP_PATH=/Users/giovanni/Library/Caches/internxt-cli/autocomplete/zsh_setup && test -f $INTERNXT_AC_ZSH_SETUP_PATH && source $INTERNXT_AC_ZSH_SETUP_PATH; # internxt autocomplete setup

Expected behavior:
The command internxt autocomplete script zsh should output only the raw shell completion code to stdout. All status messages (spinners, "Checking credentials...", success ticks) should be directed to stderr so they do not interfere with file redirection or command substitution.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions