charmbracelet / charmbracelet/vhs
Ghost text and ansi escape codes at the beginning of tape arent setting the proper settings
- Dominant language
- Go
- Stars
- 20.9k
- Forks
- 474
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 2
Description
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.

```
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
```
Contributor guide
Research direction
Reproduce the tape shown in the issue, then trace startup handling for Hide, Show, Sleep, and the terminal's initial history or ANSI output. Done means the generated GIF starts without the ghost text or escape codes while preserving the requested terminal setup and typing sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100