mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-17 17:35:16 +01:00
Ensure -h output can be read at end of cast
This commit is contained in:
parent
b269f4902e
commit
4fea5f3a3c
1 changed files with 28 additions and 12 deletions
|
@ -4,21 +4,26 @@ set -e
|
|||
PROMPT="▶"
|
||||
|
||||
enter() {
|
||||
IFS='%'
|
||||
type $PROMPT
|
||||
prompt
|
||||
type $1
|
||||
sleep 0.5
|
||||
printf '%b' " ⏎\n"
|
||||
sleep 0.1
|
||||
eval $1
|
||||
type "\n"
|
||||
unset IFS
|
||||
}
|
||||
|
||||
prompt() {
|
||||
printf $PROMPT
|
||||
type " "
|
||||
}
|
||||
|
||||
type() {
|
||||
printf '%b' $1 | pv -qL $[10+(-2 + RANDOM%5)]
|
||||
}
|
||||
|
||||
main() {
|
||||
IFS='%'
|
||||
|
||||
enter "fd"
|
||||
|
||||
enter "fd -e md"
|
||||
|
@ -32,3 +37,14 @@ enter "fd sh"
|
|||
enter "fd -H sample"
|
||||
|
||||
enter "fd -h"
|
||||
|
||||
prompt
|
||||
|
||||
sleep 3
|
||||
|
||||
unset IFS
|
||||
|
||||
echo ""
|
||||
}
|
||||
|
||||
main
|
Loading…
Reference in a new issue