wide-midnight-78598
10/18/2022, 4:31 AM3rdparty/ build-support/ experimental-deploy internal-generate-test-lockfile-fixtures peek test
BUILD cargo* experimental-explorer java-dump-source-analysis publish test.sh
BUILD_ROOT check export jvm-symbol-map py-constraints testprojects/
CODE_OF_CONDUCT.md check-default-tools export-codegen lint pyproject.toml tests/
CONTRIBUTING.md completions filedeps list repl update-build-files
CONTRIBUTORS.md conftest.py filter package roots version
LICENSE count-loc fmt pants* run
MAINTAINERS.md dependees generate-lockfiles pants-plugins/ rust-toolchain
README.md dependencies help pants.ci.toml scala-dump-source-analysis
auth-acquire docs/ help-advanced pants.toml src/
auth-token-info experimental-bsp help-all paths tailor
Gets a bit better when narrowing, but still 🤷
% ./pants t
tailor test test.sh testprojects/ tests/
wide-midnight-78598
10/18/2022, 4:32 AMwide-midnight-78598
10/18/2022, 4:34 AM./
takes care of a lot of the filesystem-specific problemsgorgeous-winter-99296
10/18/2022, 10:53 AMpants <tab> -> goals
pants -<tab> -> global flags
pants GOAL <tab> -> paths
pants GOAL PATH:<tab> -> targets
pants GOAL //<tab> -> targets
pants GOAL -<tab> -> goal-flags
and so on.wide-midnight-78598
10/18/2022, 11:55 AMpants <tab> -> goals
pants -<tab> -> global flags
pants GOAL -<tab> -> goal-flags
pants GOAL <tab> -> goals and paths
Targets will come down the road. They're a bit trickier, since they'll need to be dynamic completions methinks - and that's slow so I'll want to cleverly cache and that's a problem for later.
Right now it's that last completion which is the oddball, because that's where the mingling happens, the reason being, this is perfectly valid:
./pants --changed-since=origin/main fmt lint --some-option check [path/targets]
So, this has me wondering if I should classify each goal as one that will/should directly be followed by a target (introspections mostly) vs chainable?bitter-ability-32190
10/18/2022, 11:57 AMwide-midnight-78598
10/18/2022, 12:01 PMFor completions, can we just assumed single goal for simplicity?Thought about it - tried it, didn't like it. Would rather show everything.
Alternatively what do similar tools do?I've looked at 10-15 other tools, but most of them are a bit more static in their structure - so
tool cmd -options subcmd -options file
wide-midnight-78598
10/18/2022, 12:02 PMgorgeous-winter-99296
10/18/2022, 12:03 PMpants GOAL <tab>
gives goals until there's a disambiguation like no-matching-goal or a slash or such?wide-midnight-78598
10/18/2022, 12:04 PMwide-midnight-78598
10/18/2022, 12:04 PMgorgeous-winter-99296
10/18/2022, 12:05 PMgorgeous-winter-99296
10/18/2022, 12:07 PMba<tab> te<tab> ser<tab>/bac<tab>:de<tab>
to get there faster. And then if I don't know, I still know whether I'm looking for an action or a path so I can disambiguate e.g. with //
for paths.gorgeous-winter-99296
10/18/2022, 12:08 PMwide-midnight-78598
10/18/2022, 12:08 PMI still know whether I'm looking for an action or a path so I can disambiguateI agree that once you're a bit more proficient, this is more likely to be the workflow - but a big part of completions is to help the user experience for newer users, who aren't -just- saving time, but might need a crutch to avoid staring at docs all the time
wide-midnight-78598
10/18/2022, 12:09 PMgorgeous-winter-99296
10/18/2022, 12:16 PM//
as a prefix to separate action from object for this reason. But I have colleagues who think that's stupid and I should use short relative paths instead. 😛happy-kitchen-89482
10/18/2022, 3:03 PMwide-midnight-78598
10/18/2022, 3:06 PM./pants
just felt odd