vhs icon indicating copy to clipboard operation
vhs copied to clipboard

Ghost text and ansi escape codes at the beginning of tape arent setting the proper settings

Open sweetbbak opened this issue 2 years ago • 2 comments

I saw #39 and Im having a similar issue to that, the proposed solution was to add Hide and Sleep to the beginning of the tape, however no matter how long I do that the same type of text shows up. I'm not sure if its because of the shell or if its a part of how VHS starts things. I can add Type clear and sleep to the beginning but you can still see the history making the text appear when it shouldn't as show below.

lain

Output lain.gif

Enter
Hide Sleep 15s Show
Enter
Enter

Set FontFamily "Maple Mono"

# Set up a 1200x600 terminal with 46px font.
Set FontSize 46
Set Width 1200
Set Height 600

Sleep 100ms

# Type a command in the terminal.
Type@500ms "Hello...?"

Backspace 10

# Pause for dramatic effect...
Sleep 500ms

Type 'Are you there?'

# Run the command by pressing enter.
Enter

Backspace

Type "neofetch"
Enter

# Admire the output for a bit.
Sleep 5s

sweetbbak avatar Mar 27 '23 00:03 sweetbbak

The code for detecting whether to skip the first part of a tape only triggers when the first (non setup) command is Hide. It needs to come before the "Enter" command. Not sure if you need to put the commands on different lines.

I find that this is useful for skipping output of the build output that might show prior to running some example. e.g.:

Hide
cargo run --example demo
Sleep 10s
Show
... rest of demo script

joshka avatar Jul 19 '23 03:07 joshka

Thanks! I appreciate it.

sweetbbak avatar Jul 19 '23 04:07 sweetbbak