Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DietPi-Banner | Word wrap for small terminals #5820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: dev
Choose a base branch
Loading
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
shellcheck
  • Loading branch information
mtekman authored and MichaIng committed Apr 27, 2023
commit e85ef4caec9de6f89cbfd64fd28fba96fa74c33f
4 changes: 2 additions & 2 deletions 4 dietpi/func/dietpi-banner
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
## Sometimes the title is long, so a sanity check is performed to fold the title
## if it exceeds the window size. Because of the hyphen it receives 3 spaces padding.
if (( $title_len >= $TERM_WIDTH )); then
title=$(echo "$stripped_title" | fold -s -w $TERM_WIDTH)
title=$(echo "$stripped_title" | fold -s -w "$TERM_WIDTH")
title="${title//$'\n'/$'\n' }"
title="${aCOLOUR[1]}${title}$COLOUR_RESET"
## Recalculate the title length based on the last line with padding
Expand All @@ -131,7 +131,7 @@
## The description is typically very long, and is folded from the second line
## onwards into the remaining available space, with left padding.
if (( $descp_len >= $avail_len )); then
descp=$(echo "$stripped_descp" | fold -s -w $avail_len)
descp=$(echo "$stripped_descp" | fold -s -w "$avail_len")
descp="${descp//$'\n'/$'\n'${left_pad}}"
fi
fi
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.