commit
737bce8e4b
10
src/_node
10
src/_node
|
|
@ -69,6 +69,9 @@ _node_scripts() {
|
||||||
_describe 'scripts' scripts
|
_describe 'scripts' scripts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_node() {
|
||||||
|
local ret=1
|
||||||
|
|
||||||
_arguments \
|
_arguments \
|
||||||
'-[script read from stdin (default; interactive mode if a tty)]' \
|
'-[script read from stdin (default; interactive mode if a tty)]' \
|
||||||
'--[indicate the end of node options]' \
|
'--[indicate the end of node options]' \
|
||||||
|
|
@ -244,7 +247,12 @@ _arguments \
|
||||||
'--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]' \
|
||||||
'(- 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'
|
'*: :_node_args' && ret=0
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_node "$@"
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: Shell-Script
|
# mode: Shell-Script
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
#compdef tsx
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
# a copy of this software and associated documentation files (the
|
||||||
|
# "Software"), to deal in the Software without restriction, including
|
||||||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
# the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
# OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# Completion script for tsx v4.21.0. (https://github.com/privatenumber/tsx)
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
_tsx_completion() {
|
||||||
|
_arguments \
|
||||||
|
'(- *)'{-h,--help}'[show help]' \
|
||||||
|
'(- *)'{-v,--version}'[show version]' \
|
||||||
|
'--no-cache[disable caching]' \
|
||||||
|
'--tsconfig[custom tsconfig.json path]:path:_files -g "*.json"' \
|
||||||
|
'1: :(watch)'
|
||||||
|
}
|
||||||
|
|
||||||
|
_tsx() {
|
||||||
|
_alternative 'tsx: :_tsx_completion' 'node: :_node'
|
||||||
|
}
|
||||||
|
|
||||||
|
_tsx "$@"
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: Shell-Script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# sh-basic-offset: 2
|
||||||
|
# End:
|
||||||
|
# vim: ft=zsh sw=2 ts=2 et
|
||||||
Loading…
Reference in New Issue