all repos — shlide @ c78c23a27544c78de1d39c08c44cac7687a62d2e

slide deck presentation tool written in pure bash

fix spacing glitch on newline encounters
Akshay nerdypepper@tuta.io
Sun, 02 Feb 2020 22:41:45 +0530
commit

c78c23a27544c78de1d39c08c44cac7687a62d2e

parent

9da2d560a0872ec4a1cf4a847ec3555983cc746f

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M shlideshlide

@@ -51,11 +51,16 @@

printf '\e[%s;%sH' "$l" "$c" while IFS= read -r line; do + reduce=0 # Print the contents of the slide file, # line by line. printf "%s" "$line" + case $line in + "" | *"\n"*) + ((++reduce));; + esac # Move down and back after each print. - printf '\e[%sD\e[B' "${#line}" + printf '\e[%sD\e[B' "$((${#line} - $reduce))" done <<< "$slide_contents" }