]> git.pld-linux.org Git - packages/lesspipe.git/commitdiff
sqlite3 extension, run-mailcap without DISPLAY and another pager auto/th/lesspipe-1.57-4
authorTomasz Pala <gotar@pld-linux.org>
Mon, 2 Apr 2018 08:35:46 +0000 (10:35 +0200)
committerTomasz Pala <gotar@pld-linux.org>
Mon, 2 Apr 2018 08:35:46 +0000 (10:35 +0200)
- solved here instead of mailcap [2e19c8e1da5875a5b895c46a127621c223e1f208]
highlight --no-trailing-nl available since 2.16

lesspipe.sh
lesspipe.spec

index 7fc3fd111e94b8af14e7852205fd2917a2a42f58..9e5bd8f7be7efbcb07064b61c9d9a3f92e34969e 100755 (executable)
@@ -134,7 +134,7 @@ lesspipe() {
                [ "$FILE" = 'troff' ] && groff -s -p -t -e -Tlatin1 -mandoc "$1" || return 1
                ;;
        # possible sqlite3
-       *.db)
+       *.db|*.sqlite3)
                FILE=$(file -bL "$1" | cut -d , -f 1)
                [ "$FILE" = 'SQLite 3.x database' ] && sqlite3 "$1" .dump || return 1
                ;;
@@ -145,8 +145,8 @@ lesspipe() {
                *)
                        output=ansi;;
                esac
-               run-mailcap "$1" || {
-                       echo "$LESS" | grep -qi r || ps -p $PPID,$(ps -p $PPID -oppid=) -oargs= | grep -qiw -- -r && highlight --out-format=$output --style=darkblue "$1";
+               DISPLAY= run-mailcap --no-pager "$1" || {
+                       echo "$LESS" | grep -qi r || ps -p $PPID,$(ps -p $PPID -oppid=) -oargs= | grep -qiw -- -r && highlight --validate-input --no-trailing-nl --out-format=$output --style=darkblue "$1";
                }
        # Check to see if binary, if so -- view with 'strings'
        # FILE=$(file -L "$1")
index 22b2c401b19f011ae100fd52e412a385ef2d6648..76ed4b7234d633023f23cd738907c19b1dbce218 100644 (file)
@@ -6,7 +6,7 @@ Summary:        Input preprocessor for less
 Summary(pl.UTF-8):     Preprocesor wejścia dla narzędzia less
 Name:          lesspipe
 Version:       1.57
-Release:       3
+Release:       4
 License:       GPL v2
 Group:         Applications/Text
 Source0:       %{name}.sh
@@ -17,6 +17,7 @@ Suggests:     highlight >= 3.0
 Suggests:      mailcap >= 2.3
 Suggests:      objdump
 Suggests:      openssl-tools
+Conflicts:     highlight < 2.16
 Conflicts:     less < 394-7.1
 Conflicts:     tar < 1:1.22
 BuildArch:     noarch
This page took 0.16406 seconds and 4 git commands to generate.