mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-28 15:54:48 +00:00
Merge pull request #1276 from zsh-users/support-debugger-flags
Support 'node inspect' specific flags
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
#
|
#
|
||||||
# Completion script for Node.js v26.1.0 (https://nodejs.org)
|
# Completion script for Node.js v26.4.0 (https://nodejs.org)
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Authors
|
# Authors
|
||||||
@@ -87,6 +87,19 @@ _node() {
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local -a inspect_options=()
|
||||||
|
if [[ "$words[2]" == 'inspect' ]]; then
|
||||||
|
inspect_options+=(
|
||||||
|
'*--probe[source location of the probe]:location:_files'
|
||||||
|
'--expr[expression to evaluate of the preceding --probe each time execution reaches it]:expr'
|
||||||
|
'--max-hit[per-probe limit on evaluated hits, when not specified, there is no limit]::num'
|
||||||
|
'--json[output JSON, when not specified, human-readable text]'
|
||||||
|
'--preview[include V8 object previews in JSON output]'
|
||||||
|
'--timeout[global session timeout(default 30000ms)]:msecs'
|
||||||
|
'--port[inspector port for the debuggee(default or 0 use random port)]:port'
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
local ret=1
|
local ret=1
|
||||||
|
|
||||||
_arguments \
|
_arguments \
|
||||||
@@ -274,6 +287,7 @@ _node() {
|
|||||||
'--watch-preserve-output[preserve outputs on watch mode restart]' \
|
'--watch-preserve-output[preserve outputs on watch mode restart]' \
|
||||||
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
|
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
|
||||||
$v8_options[@] \
|
$v8_options[@] \
|
||||||
|
$inspect_options[@] \
|
||||||
'(- 1 *)'{-h,--help}'[print node command line options]' \
|
'(- 1 *)'{-h,--help}'[print node command line options]' \
|
||||||
'(- 1 *)'{-v,--version}'[print Node.js version]' \
|
'(- 1 *)'{-v,--version}'[print Node.js version]' \
|
||||||
'*: :_node_args' && ret=0
|
'*: :_node_args' && ret=0
|
||||||
|
|||||||
Reference in New Issue
Block a user