zsh-yarn-completions
zsh-yarn-completions copied to clipboard
Autocompletion for file paths and available .bin commands
๐ @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:
-
CLI commands added by installed modules, e.g.
yarn install ts-node yarn ts[tab] โ yarn ts-node
-
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 asexe
inpackage.json
โscripts
: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! โจ
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.