aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2020-03-09 15:24:49 +0200
committerDylan Araps <dylan.araps@gmail.com>2020-03-09 15:24:49 +0200
commit271458be6eb4e325f263f430bc9d0c544c3a771d (patch)
treebf6b2a2f5c26908071901bf6a8271c5bb312293d
parent9fc34b000093d32d552bc1bde4fca6074bcd9427 (diff)
downloadpfetch-271458be6eb4e325f263f430bc9d0c544c3a771d.tar.gz
pfetch: Fixed posix change
-rwxr-xr-xpfetch6
1 files changed, 2 insertions, 4 deletions
diff --git a/pfetch b/pfetch
index 8d44c36..9e119eb 100755
--- a/pfetch
+++ b/pfetch
@@ -22,11 +22,9 @@ log() {
info=$*
}
- align=$(printf '%*s' "$((${#name}-info_length))" "")
-
# Construct the information string.
out="[3${PF_COL1-4};1m${name}"
- out="$out${PF_SEP}${align}"
+ out="$out${PF_SEP}[$((info_length-${#name}))C"
out="$out[3${PF_COL2-7}m${info}"
}
@@ -1401,7 +1399,7 @@ main() {
while IFS= read -r line || [ "$1" ]; do
"get_$1"
shift "$(($# ? 1 : 0))"
- printf '%*s%s\r%s\n' "$ascii_width" "" "$out" "$line" >&6
+ printf '\033[%sC%s\r%s\n' "$ascii_width" "$out" "$line" >&6
out=
done <<-EOF
$ascii