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

Add quote function for escaping strings #1022

Merged
merged 1 commit into from
Nov 8, 2021
Merged

Add quote function for escaping strings #1022

merged 1 commit into from
Nov 8, 2021

Conversation

casey
Copy link
Owner

@casey casey commented Nov 8, 2021

quote(s) surrounds s with single quotes and replaces all single
quotes in s with '\'', serving to escape special characters for most
shells, including Bourne shell descendants.

Replace all single quotes with `'\''` and prepend and append single
quotes to `s`. This is sufficient to escape special characters for many
shells, including most Bourne shell descendants.
@casey casey enabled auto-merge (squash) November 8, 2021 19:20
@casey casey mentioned this pull request Nov 8, 2021
@casey casey merged commit 3ef420c into master Nov 8, 2021
@casey casey deleted the quote branch November 8, 2021 19:22
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.

1 participant