From: Martin Pitt Date: Mon, 28 Sep 2026 10:01:48 +0000 (+0200) Subject: shellpresent: typing emulation X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=ce29bc87087ac09ec2b556a5e248f4fe40e360fd;p=bin.git shellpresent: typing emulation --- diff --git a/shellpresent b/shellpresent index fcf1ba0..8c2c48b 100755 --- a/shellpresent +++ b/shellpresent @@ -57,7 +57,10 @@ while IFS= read -r line <&3; do fi # execute command - echo -n "$line" + for ((i = 0; i < ${#line}; i++)); do + printf '%s' "${line:i:1}" + sleep "0.0$((10 + RANDOM % 26))" + done read echo -ne "\e[${OUTPUT}m" eval "$line" 3<&-