Commit 08c681aa authored by marc0s's avatar marc0s

feat: autocomplete for npm run scripts

parents
#
# comp-npm-run.zsh
#
# Autocompletion for `npm run scripts`
#
# Requires jq.
#
# Copyright(c) 2019 marc0s <marcos@tenak.net>
# MIT Licensed
#
function _scripts () {
compls=$(cat package.json| jq -r '.scripts|keys|. []')
completions=(${=compls})
compadd -- $completions
}
compdef _scripts npm run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment