commit 2bda067ad0f43365255297feb51119eddb184dff parent 09e4703574d51ac058a512ec58a127fe15995229 Author: Natasha Kerensikova <natgh@instinctive.eu> Date: Sun, 15 Dec 2024 15:01:07 +0000 UTF-8 detection is corrected when locale(1) is missing Diffstat:
M | src/run.sh | | | 14 | ++++++++------ |
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/run.sh b/src/run.sh @@ -43,13 +43,15 @@ TREE__=' ' TREE_I='| ' TREE_T='|- ' TREE_L='`- ' -CMAP="$(locale charmap)" -if [ "${CMAP}" = "UTF-8" ]; then - TREE_I='│ ' - TREE_T='├─ ' - TREE_L='└─ ' +if type locale >/dev/null 2>&1; then + CMAP="$(locale charmap)" + if [ "${CMAP}" = "UTF-8" ]; then + TREE_I='│ ' + TREE_T='├─ ' + TREE_L='└─ ' + fi + unset CMAP fi -unset CMAP ### Terminal color support BOLD_TEXT=""