diff --git a/README.md b/README.md index e319fa3..a7ad12e 100644 --- a/README.md +++ b/README.md @@ -167,13 +167,6 @@ GitHub. will be removed once xterm can handle images greater than 1000x1000. [Last tested with XTerm(344)]. -* Filenames that begin with "@" are special to ImageMagick and it'll - freak out if you don't prepend a directory. (`lsix ./@foo.png`) - (This is a bug in ImageMagick, not lsix). - -* Specifying the empty string `""` as a filename makes ImageMagick hang. - (This appears to be an ImageMagick bug / misfeature). - * Long filenames are wrapped, but not intelligently. Would it complicate this script too much to make it prefer to wrap on whites space, dashes, underscores, and periods? Maybe. @@ -274,4 +267,4 @@ GitHub. * [VT340 Test](https://github.com/hackerb9/vt340test), a project to document the actual behaviour of the DEC VT340 hardware. - * [Digital ANSI-Compliant Printing Protocol: Level 2 Programming Reference Manual](http://www.vaxhaven.com/images/f/f7/EK-PPLV2-PM-B01.pdf), Chapter 5: Sixel Graphics. An excellent and reasonably clear discussion for anyone who wants to generate or parse sixel graphics. \ No newline at end of file + * [Digital ANSI-Compliant Printing Protocol: Level 2 Programming Reference Manual](http://www.vaxhaven.com/images/f/f7/EK-PPLV2-PM-B01.pdf), Chapter 5: Sixel Graphics. An excellent and reasonably clear discussion for anyone who wants to generate or parse sixel graphics. diff --git a/lsix b/lsix index 0a11a57..9e9a0a0 100755 --- a/lsix +++ b/lsix @@ -234,14 +234,19 @@ main() { len=${#onerow[@]} onerow[len++]="-label" onerow[len++]=$(processlabel "$1") - onerow[len++]="file://$1" + onerow[len++]="file://$(imescape $1)" shift done - montage "${onerow[@]}" $imoptions gif:- \ + + montage "${onerow[@]}" $imoptions gif:- \ | convert - -colors $numcolors sixel:- done } +imescape() { + echo "$@" | sed -e 's|^@|./@|g;' +} + processlabel() { # This routine is all about appeasing ImageMagick. # 1. Remove silly [0] suffix and : prefix.