diff options
author | davidovski <david@davidovski.xyz> | 2024-01-23 09:09:26 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-01-23 09:09:26 +0000 |
commit | d8761db85b40f59117a24648c33a70bddb3416a7 (patch) | |
tree | 5f3925605ca0daeae8b65f94348d786e933f31ef | |
parent | 880957699c5acf7a2c18439b30bbcca125d15d4a (diff) |
remove non-posix $''
-rwxr-xr-x | typr.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 } |