diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2020-03-25 08:16:42 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-25 08:16:42 +0900 |
| commit | bf24777aa1ed2fe72145545924fb305a81480664 (patch) | |
| tree | 496e8298d4e34275c76bacd561f0ffb422d2ccf7 | |
| parent | Merge pull request #692 from syohex/syohex/update-kitchen (diff) | |
| parent | Complete local file 'yarn add' (diff) | |
| download | zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar.gz zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar.bz2 zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar.lz zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar.xz zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.tar.zst zsh-completions-bf24777aa1ed2fe72145545924fb305a81480664.zip | |
Merge pull request #694 from syohex/syohex/yarn-add-file-completion
Complete local file 'yarn add'
| -rw-r--r-- | src/_yarn | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -32,6 +32,7 @@ # ------- # # * Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# * Shohei YOSHIDA <syohex@gmail.com> # # ------------------------------------------------------------------------------ @@ -110,6 +111,12 @@ _yarn_commands() { _describe 'command' _commands -- _global_commands } +_yarn_add_files() { + if compset -P "(file|link):"; then + _files + fi +} + _yarn() { local context state state_descr line typeset -A opt_args @@ -173,7 +180,7 @@ _yarn() { '(-O --optional)'{-O,--optional}'[install packages in optionalDependencies]' \ '(-E --exact)'{-E,--exact}'[install packages as exact versions]' \ '(-T --tilde)'{-T,--tilde}'[install the most recent release of the packages that have the same minor version]' \ - '*:package-name:' + '*:package-name:_yarn_add_files' ;; cache) |
