summaryrefslogtreecommitdiff
path: root/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
commit77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch)
tree5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch
parentbd4aeefe33e63f613512604e47bfca7b2187697d (diff)
gentoo resync : 10.11.2019
Diffstat (limited to 'app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch')
-rw-r--r--app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch b/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch
new file mode 100644
index 000000000000..48db4dbccfd5
--- /dev/null
+++ b/app-shells/kshdb/files/kshdb-1.0.0-remove-COLORFGBG-message.patch
@@ -0,0 +1,47 @@
+From a989aef80767d6608f3c3c9db007c5aafd022358 Mon Sep 17 00:00:00 2001
+From: rocky <rocky@gnu.org>
+Date: Sun, 3 Nov 2019 18:23:07 -0500
+Subject: [PATCH] Remove COLORFGBG message from term-background.sh
+
+---
+ init/term-background.sh | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/init/term-background.sh b/init/term-background.sh
+index 63f6e7d..716bb04 100644
+--- a/init/term-background.sh
++++ b/init/term-background.sh
+@@ -57,9 +57,9 @@ get_default_bg() {
+ # Pass as parameters R G B values in hex
+ # On return, variable is_dark_bg is set
+ is_dark_rgb() {
+- typeset r g b
++ typeset -i r g b
+ r=$1; g=$2; b=$3
+- if (( (16#$r + 16#$g + 16#$b) < $TERMINAL_COLOR_MIDPOINT )) ; then
++ if (( (16#r + 16#g + 16#b) < TERMINAL_COLOR_MIDPOINT )) ; then
+ is_dark_bg=1
+ else
+ is_dark_bg=0
+@@ -172,11 +172,7 @@ if (( !success )) && [[ -n $TERM ]] ; then
+ fi
+
+ if (( success )) ; then
+- if (( is_dark_bg == 1 )) ; then
+- echo "Dark background from ${method}"
+- else
+- echo "Light background from ${method}"
+- fi
++ :
+ elif [[ -n $COLORFGBG ]] ; then
+ # Note that this can be wrong if
+ # COLORFGBG was set prior invoking a terminal
+@@ -196,7 +192,7 @@ fi
+ # some environment variables
+ if is_sourced ; then
+ if (( exitrc == 0 )) ; then
+- if (( $is_dark_bg == 1 )) ; then
++ if (( is_dark_bg == 1 )) ; then
+ export DARK_BG=1
+ [[ -z $COLORFGBG ]] && export COLORFGBG='0;15'
+ else