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

Start of key value implementation #1144

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

Conversation

emileplas
Copy link

This is related to #979

I spent some time this afternoon with a very simple start:

  • added method to separate key=value pairs and to add key and value to the argument list.
  • added some basic initial tests
  • added configuration option to enable or disable the key value separation

I, however, have some additional questions:

1. For array values: currently, that would look like:

command option one two three

With a key-value separator: would that look like this?

command option==one two three

2. empty values:
The current (initial start) implementation would assign this as an empty value:

command option=

I can see where that could be unclear.

3. place of current key-value implementation:
Currently, the key-value split method will look at all arguments, including commands. The advantage is that it doesn't touch the Lexer.class tokenize method, but I would understand if only options should be separated from their value using the key value separator. In that case, I will change this a bit.

I didn't want to push this initial draft too far, before getting your feedback. Please let me know what you think.

- added method to separate key=value pairs and adding them to the argument list.
- added some initial tests
- added configuration option to enable or disable the key value separation
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