2018-01-20 20:47:29 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
PROMPT="▶"
|
2018-01-26 12:43:06 +01:00
|
|
|
|
|
|
|
enter() {
|
2018-01-26 13:07:54 +01:00
|
|
|
prompt
|
2018-01-26 12:43:06 +01:00
|
|
|
type $1
|
|
|
|
sleep 0.5
|
2018-01-26 12:50:49 +01:00
|
|
|
printf '%b' " ⏎\n"
|
2018-01-20 20:47:29 +01:00
|
|
|
eval $1
|
2018-01-26 12:43:06 +01:00
|
|
|
type "\n"
|
2018-01-26 13:07:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
prompt() {
|
|
|
|
printf $PROMPT
|
|
|
|
type " "
|
2018-01-26 12:43:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type() {
|
|
|
|
printf '%b' $1 | pv -qL $[10+(-2 + RANDOM%5)]
|
2018-01-20 20:47:29 +01:00
|
|
|
}
|
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
main() {
|
|
|
|
IFS='%'
|
|
|
|
|
|
|
|
enter "fd"
|
|
|
|
|
|
|
|
enter "fd -e md"
|
2018-01-20 20:47:29 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
enter "fd -e md --exec wc -l"
|
2018-01-26 12:50:49 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
enter "fd mod"
|
2018-01-26 12:50:49 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
enter "fd sh"
|
2018-01-20 20:47:29 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
enter "fd -H sample"
|
2018-01-20 20:47:29 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
enter "fd -h"
|
|
|
|
|
|
|
|
prompt
|
|
|
|
|
|
|
|
sleep 3
|
|
|
|
|
|
|
|
unset IFS
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
}
|
2018-01-20 20:47:29 +01:00
|
|
|
|
2018-01-26 13:07:54 +01:00
|
|
|
main
|