Live data from Hacker News

lsix: ls for images

github.com

41–50 of 111 posts

Re: lsix: ls for images

#42
post #20

Cooool! Is there any way to get this work with tmux? Currently it seems it's filtering Sixel escape sequences. On a raw xterm it's fine.

Probably not, see https://github.com/tmux/tmux/issues/44 (tldr: maintainer says no).

There's a fork that purports to add support, but it's not been updated for a while: https://github.com/yatli/tmux-sixel

Re: lsix: ls for images

#45

You can also specify filenames and, of course, use shell wild cards However, some may be slow to render (like PDF), so lsix doesn't show them unless you ask specifically. Regardless of the justification, I don't think creating such extra exception/edge-case behaviours are ever a good idea in a commandline tool like this. The equivalent in regular ls would be something like not showing more than X files "unless you as…

It doesn't matter. These are smart defaults. Just like ripgrep uses gitignore files by default. It makes my normal use useful.

> It doesn't matter.

Why?

I, like gp, prefer consistency and predictability over unique tool-specific defaults. If every command line tool had it's own special quirks, I would need to consult man pages every single time I issue something more complex that a `cd`.

Perhaps lsix should be separated into two tools like find and locate; one that uses cached rendered previews and the other generates them on the fly.

Re: lsix: ls for images

#46
post #21
post #17

Earlier quoted context omitted.

As far as I know it's just xterm on desktop. It's fascinating that we have this standard that allows us to build programming environments like notebooks -- without resorting to layering hacks on hacks to make it work on web -- practically crossplatform yet we don't make use of it. At repl.it we've been toying around with adding sixel support for xterm.js and we have a prototype up and people in our community are alre…

It's also facinating that programs that generate text output do so in a format that's well over 40 years old. What if our CLI programs could output HTML or JSON depending on whether they are piped or printed. Both standards are not good for this, but is VT100 really that great?

You're describing Powershell's object-passing.

Re: lsix: ls for images

#47

You can also specify filenames and, of course, use shell wild cards However, some may be slow to render (like PDF), so lsix doesn't show them unless you ask specifically. Regardless of the justification, I don't think creating such extra exception/edge-case behaviours are ever a good idea in a commandline tool like this. The equivalent in regular ls would be something like not showing more than X files "unless you as…

Regular `ls` lists files in a variable number of columns depending on the terminal width. Many utils enable or disable color output depending on the destination of that output, and on terminal's capabilities.

CLI utils are full of special behaviors for convenience of use by people. To enable strict consistence that is mostly necessary for usage by other programs, there are flags.

Re: lsix: ls for images

#48
Well, I learned three things today:

- Sixels exist

- Konsole doesn't support them.

- I don't have xterm installed.

After installing xterm and trying this out, I'm pretty impressed. Though not impressed enough to stop using Konsole.

Re: lsix: ls for images

#49
post #5

It's pretty incredible that this is a bash script that outputs sixel graphics, and it in no way makes use of libsixel[0]. [0] https://github.com/saitoha/libsixel

It uses various Imagemagick tools (Imagemagick supports sixel). Nobody manipulates binary files/pixel data in bash, do they?

> nobody

That's a strong word you have there.

Re: lsix: ls for images

#50

You can also specify filenames and, of course, use shell wild cards However, some may be slow to render (like PDF), so lsix doesn't show them unless you ask specifically. Regardless of the justification, I don't think creating such extra exception/edge-case behaviours are ever a good idea in a commandline tool like this. The equivalent in regular ls would be something like not showing more than X files "unless you as…

Are PDFs really expected to preview in an image viewer though? I don't really think of them as images, so I see the flag to preview them as more of an "extra feature", which is exactly what flags are for. If it didn't preview GIFs without a flag, or PNGs, then your point would absolutely stand.

Exactly. PDFs are documents, not images. Just because ImageMagick can convert PDFs into images doesn't make them images.

Every image viewer on Earth excludes DOCs and PPTs by default, but nobody complains about that.

Post reply on HN