Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] tab-complete fails to complete project list after --to #4649

Closed
harttle opened this issue Apr 16, 2024 · 1 comment · Fixed by #4682
Closed

[rush] tab-complete fails to complete project list after --to #4649

harttle opened this issue Apr 16, 2024 · 1 comment · Fixed by #4682

Comments

@harttle
Copy link
Contributor

harttle commented Apr 16, 2024

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

  1. On MacOS, configure bash as per https://rushjs.io/pages/developer/tab_completion/#bash
  2. Clone rushstack repo as per https://rushjs.io/pages/intro/get_started/
  3. cd into ./rushstack, run rush install and rush build, they'll be successful
  4. Type in bash: rush build --to , note the whitespace at the end of line, then type <Tab>

Actual Result:
image

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
Copy link
Member

iclanton commented May 8, 2024

Thanks for reporting. I identified the issue and put together a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants