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

Add fallthrough for antler-proj subcommands or move --path up one level. #67

Open
ScottBailey opened this issue May 11, 2023 · 1 comment
Labels

Comments

@ScottBailey
Copy link
Contributor

The following pattern for --path feels uncomfortable to me:
antler-proj add --path <path> app <args...>

My discomfort is mostly because --path is hard to find in help. It is NOT displayed from antler-proj --help or antler-proj add app --help.

One of the following feels better:

  1. antler-proj --path <path> add app <args...>
  2. antler-proj add app --path <path> <args...>

Solution 1 above is consistent with the -C flag in git. We prefer to mimic git when possible; however, antler-proj init has a different help text and behavior than the other subcommands.

Solution 2 can be achieved by adding fallthrough(true) to the add, remove, and update subcommands; however, in order for CLI11 to show the fallthrough commands in --help a patch must be applied.

It may be that we prefer solution 1 and can accept the difference between init and other subcommands. If so, the addition of fallthrough at the highest level and the patch would still allow help to display --path at all levels AND allow it's use at all levels.

@ScottBailey
Copy link
Contributor Author

experimental branch that implements option 2

experimental branch that implements option 1 + fallthrough help Definately experimental!

I kind of like option 1 best with fallthrough with or without help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants