Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RingsRight is not a valid bar style #543

Open
popey opened this issue Nov 6, 2024 · 0 comments · May be fixed by #544
Open

RingsRight is not a valid bar style #543

popey opened this issue Nov 6, 2024 · 0 comments · May be fixed by #544

Comments

@popey
Copy link

popey commented Nov 6, 2024

Describe the bug

The following configuration in a tape file is parsed as invalid, despite being in the documentation as one of the valid options (Colorful, Rings, ColorfulRight, and RingsRight).

Set WindowBar RingsRight

Setup

  • OS macOS & Ubuntu
  • Shell zsh
  • Terminal Emulator Alacritty
  • Terminal Multiplexer none

To Reproduce

  1. Add Set WindowBar RingsRight to a tape file
  2. Run vhs
$ vhs test.tape
File: test.tape
  3 │ Set WindowBar RingsRight
                    ^^^^^^^^^^ RingsRight is not a valid bar style.

parser: 1 error(s)
recording failed

Source Code

$ cat test.tape
Output "demo.gif"
Set WindowBar RingsRight
Set FontSize 46
Set Width 1200
Set Height 600
Type echo 'Welcome to VHS!'
Sleep 500ms
Enter 1
Sleep 5s

Expected behavior

vhs should validate the tape file correctly and begin recording a gif.

Screenshots

image

Additional context

The issue is a typo in https://github.com/charmbracelet/vhs/blob/main/parser/parser.go#L771

// Check if a given windowbar type is valid
func isValidWindowBar(w string) bool {
	return w == "" ||
		w == "Colorful" || w == "ColorfulRight" ||
		w == "Rings" || w == "RightsRight"
}

RightsRight should be RingsRight

@popey popey linked a pull request Nov 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant