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

fix: restrict use of evasion modifiers to end of line #195

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

theseion
Copy link
Collaborator

Until now, ~ and @ would be replaced by the evasion suffix regardless of their position in the string, even though the evasion suffix was only ever intended to be used as a suffix. With this commit, ~ and @ are only treated specially if they occur as the last character on the line.

In addition, it is now possible to escape a terminal ~ or @ with a backslash. The only limitation is that the toolchain cannot handle a sequence such as abc\\~, which would result in abc\\<suffix> instead of abc\<suffix> because there's no special handling of backslash espaces in general.

Fixes #185

@theseion theseion requested a review from fzipi December 31, 2024 14:13
@fzipi
Copy link
Member

fzipi commented Jan 1, 2025

Lint seems broken?

@theseion
Copy link
Collaborator Author

theseion commented Jan 2, 2025

Yeah, ignore that. I opened another commit that removes mage and fixes the failures.

Until now, `~` and `@` would be replaced by the evasion suffix
regardless of their position in the string, even though the evasion
suffix was only ever intended to be used as a suffix. With this commit,
`~` and `@` are only treated specially if they occur as the last
character on the line.

In addition, it is now possible to escape a terminal `~` or `@` with a
backslash. The only limitation is that the toolchain cannot handle a
sequence such as `abc\\~`, which would result in `abc\\<suffix>` instead
of `abc\<suffix>` because there's no special handling of backslash
espaces in general.

Fixes #185
@theseion theseion force-pushed the restrict-use-of-evasion-modifiers-to-end-of-line branch from d162120 to a857774 Compare January 2, 2025 19:27
@theseion theseion merged commit 780f4ec into main Jan 2, 2025
3 checks passed
@theseion theseion deleted the restrict-use-of-evasion-modifiers-to-end-of-line branch January 2, 2025 19:29
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 this pull request may close these issues.

~ and @ in the cmdline processor must only be used as suffixes
2 participants