<#18912 Support flag-like CLI aliases> Issue creat...
# github-notifications
c
#18912 Support flag-like CLI aliases Issue created by tgolsson Is your feature request related to a problem? Please describe. I love the
[cli.alias]
feature in pants.toml, but some things I want to define are more flag-like than arg-like. To take the canonical example from the docs:
Copy code
[cli.alias]
green = "fmt lint check"
all-changed = "--changed-since=HEAD --changed-dependees=transitive"
Which is invoked as
Copy code
$ pants green all-changed
I think it'd make a lot more sense for users and in documentation if I could define flag-aliases, and the above would be
Copy code
[cli.alias]
green = "fmt lint check"

[cli.flag-alias]
all-changed = "--changed-since=HEAD --changed-dependees=transitive"
Invoked as
Copy code
$ pants green --all-changed
This would be more symmetric with the original meaning and expanded command-line. Describe the solution you'd like A section allowing flag-like aliases. Describe alternatives you've considered I've not found a way to achieve this using the existing alias setup. * * * I'm not sure where this expansion happens, but I'd be willing to (try to) contribute a patch if this sounds reasonable! pantsbuild/pants