Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oxend uses ANSI escape sequences without regard for $TERM or isatty(3) #1574

Open
ianmacd opened this issue Jul 11, 2022 · 0 comments
Open

Comments

@ianmacd
Copy link

ianmacd commented Jul 11, 2022

Describe the bug

$ oxend print_height
2022-07-11 15:04:49.662	I Oxen 'Wistful Wagyu' (v10.1.2-d826fbee0-dev)
1100132

Looking at the above, h=$(oxend print_height | tail -n 1) ought to be a trivial operation, but it's not. I have to pipe oxend's output through sed or similar to de-ANSI-fy it. Otherwise:

$ h=`oxend print_height | tail -n 1`
$ echo $h
?2004l

oxend should respect $TERM (e.g. TERM=dumb) and use isatty(3) before deciding to use ANSI control sequences in its output.

At the very least, can we please have a --no-ansi flag or something similar for the purposes of scripting?

@ianmacd ianmacd changed the title oxend's use of ANSI escape sequences is scripter-unfriendly. oxend uses ANSI escape sequences without regard for $TERM or isatty(3) Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant