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

Autocompletion for file paths and available .bin commands #7

Open
kachkaev opened this issue Nov 3, 2021 · 1 comment
Open

Autocompletion for file paths and available .bin commands #7

kachkaev opened this issue Nov 3, 2021 · 1 comment

Comments

@kachkaev
Copy link

kachkaev commented Nov 3, 2021

👋 @chrisands, great plugin!

Sorry if I’m repeating someone else’s question but I wonder if it is possible to support these two autocompletion sources:

  1. CLI commands added by installed modules, e.g.

    yarn install ts-node
    yarn ts[tab] → yarn ts-node
  2. Local file path, e.g.

    yarn install ts-node
    yarn ts[tab] → yarn ts-node
    yarn ts-node scr[tab] → yarn ts-node scripts/
    yarn ts-node scripts/d[tab] → yarn ts-node scripts/do-something.ts

    Alternative use, if ts-node --transpile-only is aliased as exe in package.jsonscripts:

    yarn ex[tab] → yarn exe
    yarn exe scr[tab] → yarn exe scripts/
    yarn exe scripts/d[tab] → yarn exe scripts/do-something.ts

Thanks a lot for your work! Autocompletion for scripts and workspaces works like a charm! ✨

@chrisands
Copy link
Owner

Thanks!
Yes, I think it is possible. Maybe complete from .bin only if the command from yarn wasn't matched so we won't parse every time .bin directory.

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

No branches or pull requests

2 participants