aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-14 08:38:13 +0000
committermerakor <cem@ckyln.com>2020-05-14 08:38:13 +0000
commit50c2211fa1cd2f7624b8ccee48c891f80514026d (patch)
tree5a99844b09a2fae8f8067bd920fd2016e2942c84
parentb1faad8782494bfc951c88ccc62ef6f1479e0bf3 (diff)
downloadcpt-50c2211fa1cd2f7624b8ccee48c891f80514026d.tar.gz
kiss: change KISS_COLOUR variable to KISS_COLOR
American English smh... FossilOrigin-Name: 98f76b6b201d870593d647b8c0d9ec38942eecf7d378f20cfbe9e4400bf4457f
-rw-r--r--CHANGELOG.md8
-rwxr-xr-xkiss18
-rw-r--r--man/kiss.16
3 files changed, 20 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 71905b9..01f0667 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,14 @@ this project _somewhat_ adheres to [Semantic Versioning].
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
+UNRELEASED
+----------
+
+### Changed
+- Replaced `KISS_COLOUR` with `KISS_COLOR` to match upstream.
+- Renamed `colour` variable to `color` for consistency.
+
+
1.21.1 - 2020-05-14
-------------------
diff --git a/kiss b/kiss
index 4dc6a42..ecee601 100755
--- a/kiss
+++ b/kiss
@@ -1450,7 +1450,7 @@ args() {
if [ -f "$sys_db/$pkg/message" ]; then
printf '%s\n%b%s%b\n%s\n\n' \
"==============================" \
- "${colour:+"\033[1m"}" "$pkg" "${colour:+"\033[m"}" \
+ "${color:+"\033[1m"}" "$pkg" "${color:+"\033[m"}" \
"==============================" >&2
cat "$sys_db/$pkg/message" >&2
msg=1
@@ -1474,7 +1474,7 @@ args() {
# These are binary files so they should be ignored
contains "readlink stat" "$path" && continue
- printf '%b->%b %-*s ' "${colour:+"\033[1;31m"}" "${colour:+"\033[m"}" \
+ printf '%b->%b %-*s ' "${color:+"\033[1;31m"}" "${color:+"\033[m"}" \
"$max" "${path#*/kiss-}"
sed -n 's/^# *//;2p' "$(command -v "kiss-$path")"
done | sort -uk1 >&2
@@ -1604,15 +1604,15 @@ main() {
"${log_dir:=$cac_dir/logs}" \
"${bin_dir:=$cac_dir/bin}"
- # Disable colour escape sequences if running in a subshell.
- # This behaviour can be changed by adding a KISS_COLOUR
+ # Disable color escape sequences if running in a subshell.
+ # This behaviour can be changed by adding a KISS_COLOR
# variable to the environment. If it is set to 1 it will
- # always enable colour escapes, and if set to 0 it will
- # always disable colour escapes.
- if [ "$KISS_COLOUR" = 1 ]; then colour=1
- elif [ "$KISS_COLOUR" = 0 ] || ! [ -t 1 ]; then
+ # always enable color escapes, and if set to 0 it will
+ # always disable color escapes.
+ if [ "$KISS_COLOR" = 1 ]; then color=1
+ elif [ "$KISS_COLOR" = 0 ] || ! [ -t 1 ]; then
log() { printf '%s %s %s\n' "${3:-->}" "$1" "$2" >&2 ;}
- else colour=1
+ else color=1
fi
args "$@"
diff --git a/man/kiss.1 b/man/kiss.1
index 8074ca3..318eb20 100644
--- a/man/kiss.1
+++ b/man/kiss.1
@@ -178,12 +178,12 @@ export KISS_TMPDIR=
.SS ENABLING/DISABLING COLOUR
If run in a subshell, \fBKISS\fR disables colour output. However, this behaviour
-can be overriden. If a user defines a \fIKISS_COLOUR\fR environment value, it will
+can be overriden. If a user defines a \fIKISS_COLOR\fR environment value, it will
be enabled or disabled globally
.IP
-export KISS_COLOUR=1 # Enables globally
+export KISS_COLOR=1 # Enables globally
.IP
-export KISS_COLOUR=0 # Disables globally
+export KISS_COLOR=0 # Disables globally
.PP
.SS DISABLING PROMPTS
User can disable prompts by setting a \fIKISS_NOPROMPT\fR environment value. This