old --repo|-r syntax doesn not work anymore #57

Closed
opened 2019-10-25 21:48:49 +00:00 by 6543 · 3 comments
Owner
No description provided.
Member

To be more precise:
The flag works when specified after a subcommand:

tea issues -r foo/bar

but not like so:

tea -r foo/bar issues

I like the latter syntax, as it allows for faster command iteration with less typing

To be more precise: The flag works when specified *after* a subcommand: ``` tea issues -r foo/bar ``` but **not** like so: ``` tea -r foo/bar issues ``` I like the latter syntax, as it allows for faster command iteration with less typing
6543 changed title from --repo|-r doesn not work anymore to --repo|-r doesn not work with old syntax 2019-10-25 22:22:53 +00:00
6543 changed title from --repo|-r doesn not work with old syntax to old --repo|-r syntax doesn not work anymore 2019-10-25 22:32:29 +00:00
Member

Gathering some information spread over several PRs & issues:

In #28 different options were proposed to fix weird global flag behaviour (#12).
The chosen solution #26 did not fix the issue entirely (as described here in #57).

The underlying issue is faulty flag inheritance in urfave/cli (https://github.com/urfave/cli/issues/585).
Now that we switched to urfave/cli/v2, this problem might be resolvable properly again (will check in the next days).

If not, I still plead to get rid of this mess by switching to github.com/spf13/cobra or submit an upstream fix (which will probably never land due to breaking changes)

Gathering some information spread over several PRs & issues: In #28 different options were proposed to fix weird global flag behaviour (#12). The chosen solution #26 did not fix the issue entirely (as described here in #57). The underlying issue is faulty flag inheritance in `urfave/cli` (https://github.com/urfave/cli/issues/585). Now that we switched to `urfave/cli/v2`, this problem might be resolvable properly again (will check in the next days). If not, I still plead to get rid of this mess by switching to `github.com/spf13/cobra` or submit an upstream fix (which will probably never land due to breaking changes)
Author
Owner

I'll close this because of stale

I'll close this because of stale
6543 closed this issue 2020-07-14 02:37:18 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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#57
No description provided.