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

Improve CommandLineUtil to string methods so they look prettier #1074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonahgraham
Copy link
Member

Initially CommandLineUtil.argumentsToString was used to provide properly quoted string when interacting with GDB. But it is also useful to print a string that can be copied + pasted to a terminal for the user.

When doing this the always quote every argument looks less nice, so this change updates the code to only quote argument if needed.

Tests have also been added for the quoting.

Improves look and feel of changes in #1073

Initially CommandLineUtil.argumentsToString was used to provide properly
quoted string when interacting with GDB. But it is also useful to
print a string that can be copied + pasted to a terminal for the user.

When doing this the always quote every argument looks less nice, so
this change updates the code to only quote argument if needed.

Tests have also been added for the quoting.

Improves look and feel of changes in eclipse-cdt#1073
@jonahgraham
Copy link
Member Author

This change removes the extra ' around make and other arguments that don't need it.

Before (with #1073):

image

After (with #1073 and #1074):

image

Copy link

github-actions bot commented Feb 2, 2025

Test Results

   600 files  ±0     600 suites  ±0   13m 29s ⏱️ +8s
10 206 tests ±0  10 183 ✅ ±0  23 💤 ±0  0 ❌ ±0 
10 244 runs  ±0  10 221 ✅ ±0  23 💤 ±0  0 ❌ ±0 

Results for commit 9419ecf. ± Comparison against base commit c8e47b3.

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