Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Support alternative name/value separator #239

Open
2 tasks done
epage opened this issue Dec 6, 2021 · 1 comment
Open
2 tasks done

Support alternative name/value separator #239

epage opened this issue Dec 6, 2021 · 1 comment

Comments

@epage
Copy link
Owner

epage commented Dec 6, 2021

Issue by epage
Monday Nov 15, 2021 at 14:52 GMT
Originally opened as clap-rs/clap#3026


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
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by mkayaalp
Friday Nov 19, 2021 at 06:20 GMT


  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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant