hackerb9 / lsix

Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.
GNU General Public License v3.0
4.03k stars 127 forks source link

Filenames with spaces #40

Closed rloomans closed 3 years ago

rloomans commented 3 years ago

The script doesn't deal well with filenames that have spaces in them.

eg, I have a file named Bitbucket errors.png in the current directory...

$ lsix *.png
montage: unable to open image 'Bitbucket': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
montage: unable to open image 'errors.png': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: unable to open image 'errors.png': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: unable to open image 'climbing': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: unable to open image 'climbing': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
montage: unable to open image 'cynefin': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: unable to open image 'cynefin': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
montage: unable to open image '7.png': No such file or directory @ error/blob.c/OpenBlob/3537.
montage: unable to open image '7.png': No such file or directory @ error/blob.c/OpenBlob/3537.
hackerb9 commented 3 years ago

Does it work if you run lsix without the *.png? It's likely a bug in parsing command line arguments.

hackerb9 commented 3 years ago

Ah, it just needed some double quotes in the command line arg parsing section. Let me know if the latest version works for you.

rloomans commented 3 years ago

Looks good to me. Thanks!