Equals sign seems unnecessarily escaped
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 28
- Forks
- 7
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
In rubygems, we sometimes print quite complicated commands when building extensions fail, so that the user can try to rerun things and reproduce the problem. I noticed that equal signs are escaped, making things a bit more overwhelming.
I think there might be a reason for it that I don't know of, or some shell where it's necessary, but I checked the equivalent python package, and it does not escape them, so maybe it can be changed.
➜ ~ python -c 'import shlex; print(shlex.join(["FOO=BAR", "baz"]))'
FOO=BAR baz
➜ ~ ruby -rshellwords -e 'puts Shellwords.join(["FOO=BAR", "bar"])'
FOO\=BAR baz
If the change is accepted, I can work on it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Shellwords.join entry point shown in the issue and trace how command words containing equal signs are escaped. Check the existing shell-safety behavior before deciding whether the output can match the Python example, then verify that equal signs are handled as intended without regressing other escaping cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100