Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Quote command line arguments if necessary when printing them #6334

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

opam sometimes prints out command lines that it execute. However the printing function does not print the command line correctly. In particular if a space is included it cannot be recognized from other similar commands.
For example echo a b and echo 'a b' would be printed the same even though they are different commands.

This draft PR quotes arguments/commands if any special characters is encountered.
The syntax chosen is the sh/bash syntax on Unix and the cmd/powershell syntax on Windows.

Related to #5492

@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Dec 10, 2024
@kit-ty-kate kit-ty-kate added the PR: WIP Not for merge at this stage label Jan 21, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
AREA: API AREA: UI PR: WIP Not for merge at this stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant