diff options
Diffstat (limited to 'src/_tsx')
| -rw-r--r-- | src/_tsx | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/_tsx b/src/_tsx new file mode 100644 index 0000000..e54c772 --- /dev/null +++ b/src/_tsx @@ -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 |
