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

Impossible to escape / in Wait regex #592

Open
3v1n0 opened this issue Feb 28, 2025 · 0 comments
Open

Impossible to escape / in Wait regex #592

3v1n0 opened this issue Feb 28, 2025 · 0 comments

Comments

@3v1n0
Copy link

3v1n0 commented Feb 28, 2025

Describe the bug

Using Wait+Screen /foo\\/bar/ or something vhs fails with

22 │ Wait+Screen /foo\\\/bar/
        	            	                  ^^^^^^ Invalid regular expression 'foo\\\': error parsing regexp: trailing backslash at end of expression: ``
        	            	
        	            	 22 │ Wait+Screen /foo\\\/bar/
        	            	                          ^^^^ Invalid command: bar/

Or similar using a single-escape:

22 │ Wait+Screen /foo\/bar/
        	            	                  ^^^^ Invalid regular expression 'foo\': error parsing regexp: trailing backslash at end of expression: ``
        	            	
        	            	 22 │ Wait+Screen /foo\/bar/
        	            	                        ^^^^ Invalid command: bar/

The only way to check it is using \x{2F} instead of /

3v1n0 added a commit to 3v1n0/authd that referenced this issue Mar 3, 2025
In Type in prompt commands we may include slashes, but VHS doesn't
escape them properly, so we need to replace them manually with their
character-escaped version.

See: charmbracelet/vhs#592
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

No branches or pull requests

1 participant