handle global Flags #28

Closed
opened 2019-05-02 05:57:50 +00:00 by lunny · 7 comments
Owner

Author: @root360-AndreasUlm

While trying to solve #12 with PR #15 several options were discussed.
To move the discussion out of the PR and summarize the available options I create this issue.

The short summary of the problem #12 pointed out is that the current CLI lib does not inherit global flags into several subcommands (see https://github.com/urfave/cli/issues/585)

The currently available options are:

  • switching to Cobra a different CLI lib (suggested by @noerw )
  • creating global flags and use append() to merge subcommand flags with global flags (suggested by @techknowlogick )

To compare both options I created a branch in my fork for each of them:

Author: @root360-AndreasUlm While trying to solve #12 with PR #15 several options were discussed. To move the discussion out of the PR and summarize the available options I create this issue. The short summary of the problem #12 pointed out is that the current CLI lib does not inherit global flags into several subcommands (see https://github.com/urfave/cli/issues/585) The currently available options are: - switching to Cobra a different CLI lib (suggested by @noerw ) - creating global flags and use append() to merge subcommand flags with global flags (suggested by @techknowlogick ) To compare both options I created a branch in my fork for each of them: - Cobra: #27 - current cli: #26
Author
Owner

Author: @root360-AndreasUlm

After implementing #26 I found this solution to be easier and the workaround seems to work quite well.
The switch to Cobra will take more time.

Author: @root360-AndreasUlm After implementing #26 I found this solution to be easier and the workaround seems to work quite well. The switch to Cobra will take more time.
Author
Owner

Author: @lunny

@root360-AndreasUlm I think #26 is easier for review.

Author: @lunny @root360-AndreasUlm I think #26 is easier for review.
Author
Owner

Author: @root360-AndreasUlm

@lunny then let's go with #26.
I'll close #15 and #27.

Author: @root360-AndreasUlm @lunny then let's go with #26. I'll close #15 and #27.
lunny added the
kind
enhancement
label 2019-06-09 13:37:22 +00:00
Member

Now that #39 is merged, we should be able to close this.

Note though, that the following is not possible anymore:

tea -r gitea/tea issues

Is this intentional? This syntax to me has the best ergonomics for command iteration

Now that #39 is merged, we should be able to close this. Note though, that the following is not possible anymore: ``` tea -r gitea/tea issues ``` Is this intentional? This syntax to me has the best ergonomics for command iteration
Owner

Note though, that the following is not possible anymore:

other issue #57

> Note though, that the following is not possible anymore: other issue https://gitea.com/gitea/tea/issues/57
6543 closed this issue 2019-10-25 21:49:15 +00:00
6543 added this to the v0.1.0 milestone 2019-10-25 21:49:23 +00:00
Owner

@lunny hope this if fine for you?

@lunny hope this if fine for you?
Author
Owner

@6543 OK. I missed this.

@6543 OK. I missed this.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#28
No description provided.