Yarn completion
- Yarn
- Node.js 8+
- Bash 3.2+
git clone git@github.com:liuruenshen/yarn-2-completion.git
./yarn-2-completion/install.sh
It is a yarn completion, supporting macOS default shipped bash version 3.2 and above.
Tested on bash 3.2, 4.4, and 5.0 with yarn 1.22.10, 2.1.0 and 2.4.2
-
Show all the matched workspace's package names for "yarn workspace(s)" commands.
-
Prevent alternative flags from being shown again if one of them is already on the command line
For example, -v is short flag for --version, having one on the command line disable the other one because they are the same.
-
List all the script names in the package.json for
yarn
,yarn run
,yarn workspace ...
oryarn workspace ... run
; the package.json for which the yarn-2-completion searches depends on the command or the path where the command is typing. -
Enable one-tab completion during installation (Optional).
-
List all the matched system executables for
yarn exec
oryarn workspace ... exec
(Optional). -
Show available words based on the current repository's yarn version; different repositories with different yarn versions won't interfere with each other.