1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-06 21:49:40 +02:00

Use first arguments as wrapping value.

- Resistant to bad inputs.
- First checks if argument is a number and then checks if its greater than 2, if it's, the `wrapAt` variable is updated.
This commit is contained in:
hasecilu 2023-05-30 23:45:53 -06:00
parent 89dc2f8de7
commit 75960ab56d
No known key found for this signature in database
GPG Key ID: 58CDB5914C0F3F40

View File

@ -23,6 +23,7 @@ function print-decimal-unicode-range() {
local allChars=""
local allCodes=""
local wrapAt=16
[[ "$wrappingValue" =~ ^[0-9]+$ ]] && [ "$wrappingValue" -gt 2 ] && wrapAt="$wrappingValue"
local topLineStart="${bgColorBorder}╔═══"
local topLineMiddle="═══╦═══"
local topLineEnd="═══╗${reset_color}"
@ -182,4 +183,6 @@ function test-fonts() {
echo; echo
}
wrappingValue="$1"
test-fonts