[packages/lesspipe] sqlite3 extension, run-mailcap without DISPLAY and another pager - solved here instead of mailcap [2
gotar
gotar at pld-linux.org
Mon Apr 2 10:41:39 CEST 2018
commit 9fd8fc87f369d96eab47fe3565e831b7d7c8811b
Author: Tomasz Pala <gotar at pld-linux.org>
Date: Mon Apr 2 10:35:46 2018 +0200
sqlite3 extension, run-mailcap without DISPLAY and another pager
- solved here instead of mailcap [2e19c8e1da5875a5b895c46a127621c223e1f208]
highlight --no-trailing-nl available since 2.16
lesspipe.sh | 6 +++---
lesspipe.spec | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/lesspipe.spec b/lesspipe.spec
index 22b2c40..76ed4b7 100644
--- a/lesspipe.spec
+++ b/lesspipe.spec
@@ -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
diff --git a/lesspipe.sh b/lesspipe.sh
index 7fc3fd1..9e5bd8f 100755
--- a/lesspipe.sh
+++ b/lesspipe.sh
@@ -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")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lesspipe.git/commitdiff/9fd8fc87f369d96eab47fe3565e831b7d7c8811b
More information about the pld-cvs-commit
mailing list