Merge pull request #146 from TheThunderGuyS/seperator-fix

Fix #145
This commit is contained in:
dylan 2021-09-04 19:55:18 +03:00 committed by GitHub
commit 99ba07c5cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
pfetch
View File

@ -112,8 +112,9 @@ log() {
# End here if no data was found.
[ "$2" ] || return
# Store the value of '$1' as we reset the argument list below.
# Store the values of '$1' and '$3' as we reset the argument list below.
name=$1
use_seperator=$3
# Use 'set --' as a means of stripping all leading and trailing
# white-space from the info string. This also normalizes all
@ -138,8 +139,8 @@ log() {
printf '%s' "$name"
esc_p SGR 0
# Print the info name and info data separator.
printf %s "$PF_SEP"
# Print the info name and info data separator, if applicable.
[ "$use_seperator" ] || printf %s "$PF_SEP"
# Move the cursor backward the length of the *current* info name and
# then move it forwards the length of the *longest* info name. This
@ -189,7 +190,7 @@ get_title() {
esc SGR "3${PF_COL3:-1}"
hostname=$e$hostname
log "${user}@${hostname}" " " >&6
log "${user}@${hostname}" " " " " >&6
}
get_os() {
@ -1058,10 +1059,10 @@ get_palette() {
palette="$palette$e"
}
# Print the palette with a new-line before and afterwards.
# Print the palette with a new-line before and afterwards but no seperator.
printf '\n' >&6
log "$palette
" " " >&6
" " " " " >&6
}
get_ascii() {