Is there a reason that filter and list are differe...
# general
l
Is there a reason that filter and list are different goals? It seems like filter is a superset of list functionality?
I ask because I want to make use of the new cli aliases feature, but all my useful ones require piping filter and list calls together
h
You're right that filter is a superset of list. There is technically the
list --documented
feature, but that's weird and can now be replaced probably by using the
peek
goal with JQ I think we could merge filter into list? Benefit is one fewer goals I suppose?
👍 1
l
yeah
or maybe add the filter params to all relevant goals?
💯 1
./pants --filter-target-type=shell_sources fmt
rather than
./pants filter --filter-target-type=shell_sources | xargs ./pants fmt
h
Yeah that's probably a better approach!
c
I was pondering what it would look like to support piping aliases into own runs.. something like
Copy code
[cli.alias]
cmd = “| filter
—target-type=… “ But wasn't sure how to use that in a useful way. Having the filter args support for all targets makes a lot more sense.
l
yeah i would suggest trying to avoid piping there. git aliases support it though
👍 2