[rush] tab-complete fails to complete project list after `--to`
harttle opened this issue · 1 comments
harttle commented
Summary
I'm following https://rushjs.io/pages/developer/tab_completion/#bash to use autocomplete in Bash, it works to autocomplete subcommand, but not for project names.
Repro steps
- On MacOS, configure bash as per https://rushjs.io/pages/developer/tab_completion/#bash
- Clone rushstack repo as per https://rushjs.io/pages/intro/get_started/
- cd into
./rushstack
, runrush install
andrush build
, they'll be successful - Type in bash:
rush build --to
, note the whitespace at the end of line, then type<Tab>
Expected Result: The by rush
part should list project names.
Insights
As I investigated, it calls this command to auto complete:
> rush tab-complete --position 16 --word "rush build --to "
--to
--to-except
--to-version-policy
Strangely if --position
is 17 or even 15, it prints the list of projects, but not with 16.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
5.120.2 |
rushVersion from rush.json? |
5.120.2 |
useWorkspaces from rush.json? |
undefined |
Operating system? | Mac |
Would you consider contributing a PR? | Maybe |
Node.js version (node -v )? |
v18.15.0 |
iclanton commented
Thanks for reporting. I identified the issue and put together a fix.