Skip to content

Conversation

@cptaffe
Copy link

@cptaffe cptaffe commented Aug 28, 2025

Surround an argument with quotes before assembling it into a command base on whether a command requires quoting to be parsed by rc as it was received through args. If the arg contains any of rc's special characters or whitespace as documented in rc(1), it is quoted and any ' characters are escaped to ''.

The quoted command string is also appended to the dump command.

Fixes #135

@cptaffe cptaffe force-pushed the feat/escape-rc-commands branch from 94e159c to db16dce Compare August 28, 2025 19:19
Surround an argument with quotes before assembling it into a command
base on whether a command requires quoting to be parsed by rc as it
was received through args. If the arg contains any of rc's special
characters or whitespace as documented in rc(1), it is quoted and
any ' characters are escaped to ''.

The quoted command string is also appended to the dump command.

Fixes 9fans#135
@cptaffe cptaffe force-pushed the feat/escape-rc-commands branch from db16dce to 716bfae Compare August 28, 2025 19:57
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.

Watch: spaces in command are not preserved

1 participant