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

Support alternative name/value separator #3026

Open
2 tasks done
Tracked by #2468
epage opened this issue Nov 15, 2021 · 1 comment
Open
2 tasks done
Tracked by #2468

Support alternative name/value separator #3026

epage opened this issue Nov 15, 2021 · 1 comment
Labels
A-parsing Area: Parser's logic and needs it changed somehow. C-enhancement Category: Raise on the bar on expectations S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation'

Comments

@epage
Copy link
Member

epage commented Nov 15, 2021

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Clap Version

master

Describe your use case

A part of supporting non-unix syntax (#2468) is supporting a custom name/value separator.

Example:

icacls <filename> [/grant[:r] <sid>:<perm>[...]] [/deny <sid>:<perm>[...]] [/remove[:g|:d]] <sid>[...]] [/t] [/c] [/l] [/q] [/setintegritylevel <Level>:<policy>[...]]

Describe the solution you'd like

  1. Come up with a name for this separator
  2. Add a use_<name>, requires_<name>, and <name>_delimiter like use_delimiter, requires_delimiter, and value_delimiter
  3. Deprecated requires_equals in favor of requires_<name> (especially since it references a specific syntax)
  4. Rename use_delimiter to use_value_delimiter and requires_delimiter to requires_value_delimiter to disambiguate

Alternatives, if applicable

No response

Additional Context

No response

@epage epage added T: new feature S-waiting-on-decision Status: Waiting on a go/no-go before implementing A-parsing Area: Parser's logic and needs it changed somehow. labels Nov 15, 2021
@mkayaalp
Copy link
Contributor

  1. Come up with a name for this separator

I don't think we'll be able to come up with anything that does not include the word "separator" in it and calling it simply the separator would be no better than calling the other one simply the delimiter. So, I think you got in the title. I vote name_value_separator. It does separate the name and the value from each other after all.

  1. Rename use_delimiter to use_value_delimiter and requires_delimiter to requires_value_delimiter to disambiguate

Agreed. It parallels value_terminator.

@epage epage added C-enhancement Category: Raise on the bar on expectations S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation' and removed T: new feature S-waiting-on-decision Status: Waiting on a go/no-go before implementing labels Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parsing Area: Parser's logic and needs it changed somehow. C-enhancement Category: Raise on the bar on expectations S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation'
Projects
None yet
Development

No branches or pull requests

2 participants