hyper
hyper copied to clipboard
Feature: display image files in the teminal
aka imgcat: https://www.iterm2.com/documentation-images.html
I would like to specify request for inline images. Thus ls *.jpg would render a list of thumbnails in current directory.
I would like to attempt this. Any advice on where/how to start?
Well 3 months now and still no word, are you @jorgegonzalez still on this? I would like to help if possible, does anyone have any advice on how to start tackling this feature?
Sorry for never updating. I believe the problem lies in hterm's inability to render images.
https://github.com/zeit/hyper/blob/ca849425acef23c9e28b34c8946e89e323e597bd/lib/hterm.js
See these discussions:
https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-hterm/images/chromium-hterm/Rd6eUIiof9M/5Au_82-FAQAJ
https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-hterm/images/chromium-hterm/wWC-u-U9AR8/hCr2MmT_uGcJ
Well seeing as they now seem to be planning to migrate to xterm.js you might want to hold off on this for now. #1275
Those rumors may be overstated. According to the most recent conversations I have had on slack, the decision was ultimately to stick with hterm.
On Sun, Jun 11, 2017, 12:47 PM DuIslingr [email protected] wrote:
Well seeing as they now seem to be planning to migrate to xterm.js you might want to hold off on this for now. #1275 https://github.com/zeit/hyper/issues/1275
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zeit/hyper/issues/101#issuecomment-307648590, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQBZuZNsI_-6wGkyl5PsyPiZ83YBQwmks5sDDZEgaJpZM4JNupz .
And apparently, I may be out of date.... On Sun, Jun 11, 2017, 1:02 PM Marty Gentillon [email protected] wrote:
Those rumors may be overstated. According to the most recent conversations I have had on slack, the decision was ultimately to stick with hterm.
On Sun, Jun 11, 2017, 12:47 PM DuIslingr [email protected] wrote:
Well seeing as they now seem to be planning to migrate to xterm.js you might want to hold off on this for now. #1275 https://github.com/zeit/hyper/issues/1275
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zeit/hyper/issues/101#issuecomment-307648590, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQBZuZNsI_-6wGkyl5PsyPiZ83YBQwmks5sDDZEgaJpZM4JNupz .
The issue still happens on v2 with xterm. Using imgcat, the image is not displayed in my terminal.
The issue still happens.
almost 2 years after initial request?
Thanks for the effort on this but I don't think we'll be moving forward with this any time soon. I'd say we should hold off on supporting this until we get more of the current stories finished up, have a good plan on how to handle varying height rows and we're sure we want to commit to supporting this (is it a security issue for apps being able to add tracking images?). https://github.com/xtermjs/xterm.js/pull/1577#issuecomment-439737128
Damn - was imagining all the weird things I could potentially do with this... a on-server try-catch-stackoverflow solution using a terminal based QR code would be funny af.
I'm guessing we still don't have images in hyper?
it's 2020... still no images... no water... no hope... james took the last of the supplies... i can hear them getting closer at night, becoming unafraid of the campfire... how much longer can we last without images...
Sticking a oar in...
Would it not better for hyper to recognise and render html rather than images? It should then be trivial to write a hyper-cat script that could encapsulate any particular file type supported by html that can be inlined.
Use case: I ssh to a remote server, and I still want to read html files, view svml graphics and jpegs, without a seperate utility for each.
That'd likely lead to a remote code execution vulnerability. It'd be a lot more work to render full HTML than to render just images because of the context isolation that would need to be added in.
Surely its pretty simple to not run embedded code.... ?
Perhaps just a little bit more complex than just displaying images. We'd have to create a new BrowserWindow instance and disable javascript. Then we'd probably use offscreen rendering to grab a bitmap of the rendered HTML to display in the main Hyper instance. So at the end of the day we're back to the "displaying images in Hyper" again lol
iterm2 is doing it by adding a set of proprietary escape sequences for identifying and displaying images. Since we don't really handle the parsing and rendering ourselves, it might be better to request this on https://github.com/xtermjs/xterm.js
It might be a bit better to build this out as a xterm addon since there's not really an open standard for supporting images in the terminal. Since iTerm2 is GPL licensed, would supporting its escape sequence require the code to be GPL licensed as well?
Sorry if I don't know enough about this, but they could display the HTML in a sandboxed iframe.
Image support added in #6987 , will be in the next canary release soon.