atanunq / viu

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

Viu locks up when no image path is provided #31

Closed AaronViviano closed 4 years ago

AaronViviano commented 4 years ago

Hello Atanas, First, thanks for the great utility. Its worked well with VS Code's remote terminal.

Second, for the issue in question I've noticed that if you don't provide a path to a file Viu simple hangs in the terminal. It does not respond to force kill command, at least with VS Code.

Linux Instance: NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial

VS Code: Version: 1.41.1 Commit: 26076a4de974ead31f97692a0d32f90d735645c0 Date: 2019-12-18T14:57:51.166Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Darwin x64 19.2.0

Regards, Aaron

atanunq commented 4 years ago

Hi Aaron,

Thanks for the kind words. Hanging is the expected behaviour because when no path is given, viu will try to read an image from stdin, i.e make curl imageUrl | viu possible. It is unfortunate that no message is provided when stdin is empty. However, sending an EOF with Ctrl-D will get you out. I will add information about this in the readme since it is quite unintuitive to hang like that. Thanks for the issue!

Best, Atanas

AaronViviano commented 4 years ago

Hello Atanas, You are welcome and thank you for the response. Glad to see the option now for reading stdin in #32. Thats a great improvement and a much better default experience.

Regards, Aaron