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

Iterm support not detected #196

Closed
sudo-burger opened this issue Mar 29, 2024 · 6 comments
Closed

Iterm support not detected #196

sudo-burger opened this issue Mar 29, 2024 · 6 comments
Labels
bug Not working as advertised

Comments

@sudo-burger
Copy link

sudo-burger commented Mar 29, 2024

Using iTerm2 3.50beta22 on MacOS Ventura 13.6.6/Intel.
$ chafa --version
Chafa version 1.14.0

Loaders: GIF JPEG PNG QOI SVG TIFF WebP XWD
Features: mmx sse4.1 popcnt avx2
Applying: mmx sse4.1 popcnt avx2
[...]

Chafa doesn't seem to detect the iTerm capabilities, resulting in pixelated output.
Setting '--format iterm' gives the expected, good quality output.

A few environment variables; based on a quick read of the code, chafa should be able to detect it is running in iTerm by reading a couple of these:

$ env|grep TERM|sort
COLORTERM=truecolor
ITERM_PROFILE=Default
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.5.0beta22
TERM=xterm-256color
TERMINFO_DIRS=/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo
TERM_FEATURES=T3CwLrMSc7UUw9Ts3BFGsSyHNoSxF
TERM_PROGRAM=iTerm.app
TERM_PROGRAM_VERSION=3.5.0beta22

Output with no --format flag:
$ chafa Downloads/Lenna_(test_image).png
Screenshot 2024-03-29 at 17 44 06

Output with '--format iterm':
$ chafa --format iterm Downloads/Lenna_(test_image).png
Screenshot 2024-03-29 at 17 45 12

@hpjansson
Copy link
Owner

Thanks for filing the issue! Found the cause, fix will be on master and in the next release.

@sudo-burger
Copy link
Author

Awesome. Thank you!

@junegunn
Copy link

junegunn commented Jun 1, 2024

Thanks for fixing this! Any plan to cut a new release?

@hpjansson
Copy link
Owner

Yes, very soon now - I wanted to close out #184 first, but it looks like it might not be an endianness/crash issue on our end, so will punt on that one unless my latest finding is contradicted.

hpjansson added a commit that referenced this issue Jun 11, 2024
@hpjansson
Copy link
Owner

@junegunn And it's done!

@junegunn
Copy link

Thanks! I can confirm that the problem's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as advertised
Projects
None yet
Development

No branches or pull requests

3 participants