summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtypr.sh9
1 files 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
}