atanunq / viu

Terminal image viewer with native support for iTerm and Kitty
MIT License
2.53k stars 56 forks source link

Does not work with xargs #74

Open ray-x opened 3 years ago

ray-x commented 3 years ago

I would like to use the viu in a scrip but I find viu does not work with xargs e.g

echo 'myimage_name.jpg' | xargs viu

I got an error of thread 'main' has overflowed its stack fatal runtime error: stack overflow Is there an argument required?

atanunq commented 3 years ago

Hi! What environment does that happen in? I cannot reproduce it locally (tried Kitty with & without tmux)

ray-x commented 3 years ago

I thought it is very easy to reproduce.

1) OS: MacOS 10.15.7 2) Shell: zsh (seems also reproduce in fish) 3) Terminal: Kitty (b570dfcd, and the master build today), both have the same issue. I also test Terminal shipped with MacOS it works fine. Alacritty works fine.

So, it seems only happen with kitty with latest version.

atanunq commented 3 years ago

I happened to have a Mac 10.15.7 lying around (no, really), and tried to reproduce it but still to no avail.... Does it happen with every image? Can you viu the image if you pass it as an argument?

ray-x commented 3 years ago

if I run viu image_name.jpg, it works fine in kitty.