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

Clean up argument parsing in most commands #1882

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

CendioOssman
Copy link
Member

Mainly consolidating things around a single implementation. But also some better handling of invalid arguments, mimicing other Unix commands.

These never even had an implementation.
These were barely needed to begin with, and were purged from upstream
ages ago.
Let's avoid using special string formats when we can send this data
structured instead.
Avoid duplicating this complexity everywhere and make sure all commands
get the same handling and fixes.
This was a weird hack just to support the method that split arguments.
We don't need this know as we expect callers to do any string handling.
Only one is supposed to be specified, so error out instead of ignoring
all but one of the arguments.
Instead of just printing the huge usage text and hoping the user figures
out what was wrong.
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