If there are multiple files in a subdirectory that are candidates for completion, only complete the common directory prefix to reduce the number of completion candidates shown at once.
This matches the normal shell completion of file paths.
Checklist
If applicable:
[ ] I have updated CHANGELOG.md
[ ] I have updated the documentation (README.md, docs/, demos/)
[ ] I have updated the config schema (cli/src/config-schema.json)
stacked on #4887 (teach commands about files)
If there are multiple files in a subdirectory that are candidates for completion, only complete the common directory prefix to reduce the number of completion candidates shown at once.
This matches the normal shell completion of file paths.
Checklist
If applicable:
CHANGELOG.md