Skip to content

fix: strip ansi sequences from stdin#739

Merged
caarlos0 merged 1 commit intomainfrom
sanitize
Dec 9, 2024
Merged

fix: strip ansi sequences from stdin#739
caarlos0 merged 1 commit intomainfrom
sanitize

Conversation

@caarlos0
Copy link
Copy Markdown
Contributor

@caarlos0 caarlos0 commented Dec 4, 2024

most programs should not give output with ansi sequences to a pipe, but as some of them do, this will strip them out.

closes #188

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 added the enhancement New feature or request label Dec 4, 2024
@caarlos0 caarlos0 self-assigned this Dec 4, 2024
@bashbunni
Copy link
Copy Markdown
Contributor

bashbunni commented Dec 9, 2024

less ansi-example.txt | go run . pager gives
image

ansi-example.txt has ansi sequences that are stripped with this change 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sanitize input

3 participants