Skip to content

Feature: Add support for multiple env#41

Merged
dearchap merged 1 commit intourfave:mainfrom
dearchap:add_multiple_env
Apr 2, 2025
Merged

Feature: Add support for multiple env#41
dearchap merged 1 commit intourfave:mainfrom
dearchap:add_multiple_env

Conversation

@dearchap
Copy link
Copy Markdown
Contributor

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #39

Special notes for your reviewer:

(fill-in or delete this section)

Testing

Updated existing tests

(fill-in or delete this section)

Release Notes

(REQUIRED)

Multiple env variables are supposed in tag definitions. As of now only urfave/cli supports flags with multiple envs

@dearchap dearchap requested a review from a team as a code owner November 14, 2024 02:32
@abitrolly
Copy link
Copy Markdown
Contributor

This breaks API and I don't see how this feature is going to be used. Docs and example is needed, because it becomes not intuitive anymore. Maybe it is possible to have separate extensions for such things? To keep binary sizes and feature creep minimal?

Also, what happens for programs that use old non-array way of env specifiers.

I don't see what happens in this PR because there are no examples and docs.

@dearchap
Copy link
Copy Markdown
Contributor Author

This breaks API and I don't see how this feature is going to be used. Docs and example is needed, because it becomes not intuitive anymore. Maybe it is possible to have separate extensions for such things? To keep binary sizes and feature creep minimal?

Also, what happens for programs that use old non-array way of env specifiers.

I don't see what happens in this PR because there are no examples and docs.

Yes it breaks API but most people I am assuming use the gen cmds to translate this to a particular cli libary so they wont be affected by this. This is not a new feature I am adding. Using ~ before a name caused the parser to ignore prefix and divider options for env vars. The only thing I am doing is extending this to be a string slice instead of a string.

@dearchap dearchap requested a review from m0sth8 November 14, 2024 12:11
@dearchap dearchap merged commit b398b91 into urfave:main Apr 2, 2025
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.

New features to get to a 1.0.0 release

2 participants