Package: less
Version: 481-2.1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu  ubuntu-patch




In Ubuntu, the attached patch was applied to achieve the following:

  * debian/lesspipe:
    - add snap support, thanks to Adam Collard


Thanks for considering the patch.

Cheers,
 Michael

-- System Information:
Debian Release: stretch/sid
  APT prefers artful-updates
  APT policy: (500, 'artful-updates'), (500, 'artful-security'), (500, 
'artful'), (100, 'artful-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-16-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru less-481/debian/lesspipe less-481/debian/lesspipe
--- less-481/debian/lesspipe    2016-07-22 15:55:47.000000000 +0200
+++ less-481/debian/lesspipe    2017-11-28 10:22:35.000000000 +0100
@@ -192,6 +192,13 @@
                                        rpm -q -l -p "$1"
                                else echo "rpm isn't available, no query on rpm 
package possible"; fi ;;
 
+                        *.snap)
+                            if [ -x "`which snap`" ]; then snap info "$1"; fi
+                            if [ -x "`which unsquashfs`" ]; then
+                                echo
+                                echo '*** Contents:'; unsquashfs -ll -d '' 
"$1" 
+                            else echo "No unsquashfs available"; fi ;;
+                        
                        *.tar.gz|*.tgz|*.tar.z|*.tar.dz)
                                tar tzvf "$1" --force-local
                                ;;

Reply via email to