From d8761db85b40f59117a24648c33a70bddb3416a7 Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 23 Jan 2024 09:09:26 +0000 Subject: remove non-posix $'' --- typr.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/typr.sh b/typr.sh index 9474ee9..b9d5e6b 100755 --- a/typr.sh +++ b/typr.sh @@ -224,7 +224,8 @@ typr_redraw_line () { } typr_new_line () { - [ -n "$entered_text" ] && entered_text="$entered_text"$'\n' + [ -n "$entered_text" ] && entered_text="$entered_text +" entered_text="${entered_text}${entered_line}" typr_update_acc @@ -270,8 +271,10 @@ typr_del_letter () { # removes the last line, ignoring trailing whitespace # typr_remove_last_line() { - t="${1%$'\n'}" - printf "%s" "${1%$'\n'}" | while IFS= read -r line; do + t="${1% +}" + printf "%s" "${1% +}" | while IFS= read -r line; do printf "%s\n" "$line" done } -- cgit v1.2.1