diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2026-04-02 12:00:31 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2026-04-02 12:01:35 +0900 |
| commit | 673251514cc53b08ec68092906f0f26e8cea56f8 (patch) | |
| tree | fa48d77db5ceeea3bc2656489e04c56cefd8bd56 /src | |
| parent | Merge pull request #1254 from zsh-users/update_cmake (diff) | |
| download | zsh-completions-add-v8-options.tar zsh-completions-add-v8-options.tar.gz zsh-completions-add-v8-options.tar.bz2 zsh-completions-add-v8-options.tar.lz zsh-completions-add-v8-options.tar.xz zsh-completions-add-v8-options.tar.zst zsh-completions-add-v8-options.zip | |
Add valid v8 optionsadd-v8-options
Diffstat (limited to 'src')
| -rw-r--r-- | src/_node | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for Node.js v25.8.0 (https://nodejs.org) +# Completion script for Node.js v25.9.0 (https://nodejs.org) # # ------------------------------------------------------------------------------ # Authors @@ -70,6 +70,23 @@ _node_scripts() { } _node() { + # See https://github.com/nodejs/node/blob/main/doc/api/cli.md + # Note some allowed v8 options are listed in 'node --help' but others are not + local -a v8_options=( + '--max-heap-size=[max size of the heap in Mbytes]:size' + '--max-old-space-size=[max size of the old space in Mbytes]:size' + '--max-semi-space-size=[max size of a semi-space in Mbytes]:size' + '--stack-trace-limit=[number of stack frames to capture]:limit' + ) + if [[ $OSTYPE == linux* ]]; then + v8_options+=( + '--perf-basic-prof-only-functions[only report function code ranges to perf]' + '--perf-basic-prof[enable basic support for perf profiler]' + '--perf-prof-unwinding-info[enable unwinding info for perf linux profiler]' + '--perf-prof[enable annotate support for perf profiler]' + ) + fi + local ret=1 _arguments \ @@ -252,6 +269,7 @@ _node() { "--watch-path=[path to watch]: :_node_files" \ '--watch-preserve-output[preserve outputs on watch mode restart]' \ '--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \ + $v8_options[@] \ '(- 1 *)'{-h,--help}'[print node command line options]' \ '(- 1 *)'{-v,--version}'[print Node.js version]' \ '*: :_node_args' && ret=0 |
