mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Complete list of available scripts for npm run/run-script command
This commit is contained in:
parent
11c8a47d22
commit
3b5aab6edb
1 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,11 @@ function __fish_npm_settings
|
||||||
command npm config ls -l | command grep -o '.* =' | command tr -d '; ' | command tr -d ' ='
|
command npm config ls -l | command grep -o '.* =' | command tr -d '; ' | command tr -d ' ='
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# return everything that can be used with the npm run command
|
||||||
|
function __fish_npm_run
|
||||||
|
command npm run | command grep '^ [^ ]' | command tr -d ' '
|
||||||
|
end
|
||||||
|
|
||||||
# cache
|
# cache
|
||||||
complete -f -c npm -n '__fish_npm_needs_command' -a 'cache' -d "Manipulates package's cache"
|
complete -f -c npm -n '__fish_npm_needs_command' -a 'cache' -d "Manipulates package's cache"
|
||||||
complete -f -c npm -n '__fish_npm_using_command cache' -a 'add' -d 'Add the specified package to the local cache'
|
complete -f -c npm -n '__fish_npm_using_command cache' -a 'add' -d 'Add the specified package to the local cache'
|
||||||
|
@ -106,6 +111,10 @@ for c in 'up' 'update'
|
||||||
complete -f -c npm -n "__fish_npm_using_command $c" -s g -l global -d 'Update global package(s)'
|
complete -f -c npm -n "__fish_npm_using_command $c" -s g -l global -d 'Update global package(s)'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# run
|
||||||
|
complete -f -c npm -n "__fish_npm_using_command run" -a '(__fish_npm_run)'
|
||||||
|
complete -f -c npm -n "__fish_npm_using_command run-script" -a '(__fish_npm_run)'
|
||||||
|
|
||||||
# misc shorter explanations
|
# misc shorter explanations
|
||||||
complete -f -c npm -n '__fish_npm_needs_command' -a 'adduser add-user login' -d 'Add a registry user account'
|
complete -f -c npm -n '__fish_npm_needs_command' -a 'adduser add-user login' -d 'Add a registry user account'
|
||||||
complete -f -c npm -n '__fish_npm_needs_command' -a 'bin' -d 'Display npm bin folder'
|
complete -f -c npm -n '__fish_npm_needs_command' -a 'bin' -d 'Display npm bin folder'
|
||||||
|
|
Loading…
Reference in a new issue