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

[FR]: Color: Always #267

Open
jtrv opened this issue Oct 18, 2023 · 4 comments
Open

[FR]: Color: Always #267

jtrv opened this issue Oct 18, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jtrv
Copy link

jtrv commented Oct 18, 2023

It would be nice to have a setting/flag to always output ansi escape codes, so if you decide to write the output or pipe it etc, you can maintain colored output.

I currently have a "greeting" script that prints a few different things in my editor when I turn on my machine, including the output of this utility, however the output loses some readability when the ansi-colors are lost.

@ttytm
Copy link
Owner

ttytm commented Oct 20, 2023

Hey @jtrv,

Comprehensible use case. Gonna look into it when a moment opens up. Also, if you'd like to contribute, feel free 👍

@ttytm
Copy link
Owner

ttytm commented Oct 14, 2024

@jtrv would it be possible to share the piece of your script and add some environment information? This would bring me closer to have something reproducible and concrete to address.

Best regards

@jtrv
Copy link
Author

jtrv commented Oct 14, 2024

steps to reproduce:

wthrr > test.txt
cat test.txt

cat will render ansi escapes if present.
You can also open test.txt in an editor to see that ansi escapes are not produced.

Environment:

Kernel:    6.11.1-zen1-1-zen
Distro:    Arch Linux
Shell:     fish
Terminal:  alacritty

I don't suspect this is an environmental issue.

@ttytm ttytm added the enhancement New feature or request label Oct 15, 2024
@ttytm
Copy link
Owner

ttytm commented Oct 15, 2024

@jtrv

Would the script command work for you to capture the raw output?

This results in colored output / ansi contents in the file:

script --flush --quiet --return /tmp/wthrr-out.txt --command "wthrr"

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

No branches or pull requests

2 participants