aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2026-04-02 15:39:11 +0900
committerGitHub <noreply@github.com>2026-04-02 15:39:11 +0900
commit959c0fa66513f575160c5b44b0fbf83a373a65d3 (patch)
tree2a6b71e5fbd2daa08cc86112aeb107acbfacc893
parentMerge pull request #1253 from zsh-users/elixir_completions (diff)
parentAdd valid v8 options (diff)
downloadzsh-completions-master.tar
zsh-completions-master.tar.gz
zsh-completions-master.tar.bz2
zsh-completions-master.tar.lz
zsh-completions-master.tar.xz
zsh-completions-master.tar.zst
zsh-completions-master.zip
Merge pull request #1256 from zsh-users/add-v8-optionsHEADmaster
Add valid v8 options
-rw-r--r--src/_node20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/_node b/src/_node
index bb86542..5162458 100644
--- a/src/_node
+++ b/src/_node
@@ -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