# This patch has been put into the public domain # by Per Øyvind Karlsen . --- lesspipe.sh.old 2006-09-20 20:21:46.000000000 +0200 +++ lesspipe.sh 2007-05-04 00:10:43.000000000 +0200 @@ -180,6 +180,12 @@ get_cmd () { set "$1" $tmp.. fi + #(peroyvind): magic bytes for lzma not okay yet, do check against file ending in stead + if [[ "$2" = *.lzma ]] ; then + cmd=(lzma -cd "$2") + return + fi + if [[ "$1" = *bzip*compress* || "$1" = *compress[\'e]d\ * || "$1" = *packed\ data* ]]; then if [[ "$3" = $sep$sep ]]; then return --- lesspipe.sh.in.lzma 2007-06-07 16:14:38.000000000 +0200 +++ lesspipe.sh.in 2007-06-07 16:14:40.000000000 +0200 @@ -183,6 +183,12 @@ get_cmd () { set "$1" $tmp.. fi + #(peroyvind): magic bytes for lzma not okay yet, do check against file ending in stead + if [[ "$2" = *.lzma ]] ; then + cmd=(lzma -cd "$2") + return + fi + if [[ "$1" = *bzip*compress* || "$1" = *compress[\'e]d\ * || "$1" = *packed\ data* ]]; then if [[ "$3" = $sep$sep ]]; then return