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

Displaying inline images #776

Open
uwe-schwarz opened this issue May 12, 2024 · 3 comments
Open

Displaying inline images #776

uwe-schwarz opened this issue May 12, 2024 · 3 comments

Comments

@uwe-schwarz
Copy link

I'm trying to display an inline image from a file via this script: https://iterm2.com/utilities/imgcat. It looks like it's doing something, because it displays the following:

Inline Images | block | allow this session | always allow

This should be some kind of dialog box, but it's only text. IIRC is ish based on the same emulator and there I get the dialog box and can click on allow, after that it's working the next time.

Displaying the image uses this esc-sequence: printf "\033]1337;File=inline=%s" "$2"

@holzschu
Copy link
Owner

Hi,
thank you for opening this issue. I was almost certain it was impossible, so I did not look into it until you asked.
There were multiple issues with imgcat. Some of them were due to it using a syntax that is specific to bash, while we only have dash. Others were related to a-Shell having issues when dash stores a long output into a variable (as in out = $(base64 imageFile)). I couldn't make everything work, but imgcat will be available as a downloadable command (pkg install imgcat).

You will need to wait until the next release because I also had to disable the test that displays: Inline Images | block | allow this session | always allow.

@holzschu
Copy link
Owner

holzschu commented Jun 4, 2024

Hi, the TestFlight version ( https://testflight.apple.com/join/REdHww5C ) is now out, and it should work. You'll have to install the imgcat command with pkg install imgcat. The command is not exactly the same as the one from iTerm2 (I mostly disabled functions that check the validity of the arguments).

@uwe-schwarz
Copy link
Author

Works like a charm. Thanks!

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

2 participants