Compare commits
17 Commits
a8b55358b5
...
0c2d329b88
| Author | SHA1 | Date |
|---|---|---|
|
|
0c2d329b88 | |
|
|
1b97a1492b | |
|
|
4a7179ffff | |
|
|
7aeefd0020 | |
|
|
9e2a5239dc | |
|
|
c47e10641a | |
|
|
c49bb88997 | |
|
|
5fd23d5376 | |
|
|
e74df1347f | |
|
|
41a21a4d57 | |
|
|
1cbda7f841 | |
|
|
26e54f9772 | |
|
|
d682198a7b | |
|
|
4e8c09fa83 | |
|
|
a5f749cd4a | |
|
|
483c208156 | |
|
|
3dc13483c1 |
|
|
@ -83,6 +83,14 @@ rm -f ~/.zcompdump; compinit
|
|||
|
||||
---
|
||||
|
||||
Second Solution:
|
||||
zsh-completions as a plugin, they suggest manually adding its source directory to fpath before sourcing oh-my-zsh.sh.
|
||||
This ensures Zsh loads the completion files only once, improving performance.
|
||||
Recommended Fix:
|
||||
Instead of the existing method, they propose adding this line:
|
||||
|
||||
fpath=($ZSH/custom/plugins/zsh-completions/src $fpath)
|
||||
|
||||
### Contributing
|
||||
|
||||
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
#compdef distro-info ubuntu-distro-info debian-distro-info
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 for distro-info
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei YOSHIDA (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[display help message and exit]' \
|
||||
'--date=[data for calculating the version]:date' \
|
||||
'(-a --all)'{-a,--all}'[list all known versions]' \
|
||||
'(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \
|
||||
'(-d --devel)'{-d,--devel}'[latest development version]' \
|
||||
'--series=[series to calculate the version for]:series' \
|
||||
'(-s --stable)'{-s,--stable}'[latest stable version]' \
|
||||
'--supported[list of all supported version, including development releases]' \
|
||||
'--unsupported[list of all unsupported stable versions]' \
|
||||
'(-c --codename)'{-c,--codename}'[print the codename(default)]' \
|
||||
'(-r --release)'{-r,--release}'[print the release version]' \
|
||||
'(-f --fullname)'{-f,--fullname}'[print the full name]'
|
||||
|
||||
# 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
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for emacs 29. (https://www.gnu.org/software/emacs/)
|
||||
# Completion script for emacs 31. (https://www.gnu.org/software/emacs/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -59,12 +59,14 @@ _arguments \
|
|||
'--init-directory=[use DIR when looking for the Emacs init files]: :_files -/' \
|
||||
'(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \
|
||||
'--script[run FILE as an Emacs Lisp script]: :_files' \
|
||||
'-x[same as -Q --script]' \
|
||||
'(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
|
||||
'(-u --user)'{-u,--user}'[load ~USER/.emacs instead of your own]' \
|
||||
\*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \
|
||||
{--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \
|
||||
\*{--file,--find-file,--visit}'[visit FILE]: :_files' \
|
||||
\*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \
|
||||
'--insert[insert contents of FILE into current buffer]:file:_files' \
|
||||
'--kill[exit without asking for confirmation]' \
|
||||
\*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
|
||||
'(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
|
||||
|
|
@ -95,7 +97,6 @@ _arguments \
|
|||
'(- *)--version[output version information and exit]' \
|
||||
'*: :_files'
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
|
|
|
|||
|
|
@ -37,15 +37,22 @@
|
|||
# * Timofey Titovets <nefelim4ag@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
_exportfs() {
|
||||
_values -w 'option' \
|
||||
|
||||
_arguments \
|
||||
'(-d --debug)'{-d,--debug}'[Turn on debugging]:kind:(all auth call general parse)' \
|
||||
'(-i)-a[Export or unexport all directories]' \
|
||||
'(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \
|
||||
'-o[Specify a list of export options in the same manner as in exports]:option' \
|
||||
'(-i)-r[Reexport all directories]' \
|
||||
'(-i)-u[Unexport one or more directories]' \
|
||||
'-f[Flush everything out of export table]' \
|
||||
'-o[option1,option2.. Specify a list of export options]' \
|
||||
'-s[Display the current export list suitable for /etc/exports]' \
|
||||
'-v[Be verbose]'
|
||||
}
|
||||
_exportfs "$@"
|
||||
"-f[Flush everything out of kernel's export table]" \
|
||||
'-v[Be verbose]' \
|
||||
'-s[Display the current export list suitable for /etc/exports]'
|
||||
|
||||
# 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
|
||||
|
|
|
|||
12
src/_glances
12
src/_glances
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for glances (https://nicolargo.github.io/glances/).
|
||||
# Completion script for glances 4.3.3 (https://nicolargo.github.io/glances/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -42,8 +42,10 @@
|
|||
_glances() {
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show this help message and exit]' \
|
||||
'--print-completion[print shell completion script]:shell:(bash zsh tcsh)' \
|
||||
'(- *)'{-V,--version}"[show program's version number and exit]" \
|
||||
'(-C,--config)'{-C,--config}'[path to the configuration file]: :_files' \
|
||||
'(-d --debug)'{-d,--debug}'[enable debug mode]' \
|
||||
'(-C --config)'{-C,--config}'[path to the configuration file]: :_files' \
|
||||
'(--modules-list --module-list)'{--modules-list,--module-list}'[display modules list and exit]' \
|
||||
'(--disable-plugin --disable-plugins)'{--disable-plugin,--disable-plugins}'[disable plugin(comma separated list or all)]:plugin' \
|
||||
'(--enable-plugin --enable-plugins)'{--enable-plugin,--enable-plugins}'[enable plugin(comma separated list)]:plugin' \
|
||||
|
|
@ -62,7 +64,8 @@ _glances() {
|
|||
'--disable-bg[disable background colors in the terminal]' \
|
||||
'--enable-irq[enable IRQ mode]' \
|
||||
'--enable-process-extended[enable extended stats on top process]' \
|
||||
'(--separator --enable-separator)'{--separator,--enable-separator}'[enable separator in the UI]' \
|
||||
'--disable-separator[disable separator in the UI]' \
|
||||
'--disable-cursor[disable cursor in the UI]' \
|
||||
'--sort-process[sort processes]: :(cpu_percent memory_percent username cpu_times io_counters name)' \
|
||||
'(--programs --program)'{--programs,--program}'[Accumulate processes by program]' \
|
||||
'--export[enable export module]:module' \
|
||||
|
|
@ -70,11 +73,12 @@ _glances() {
|
|||
'--export-csv-overwrite[overwrite existing CSV file]' \
|
||||
'--export-json-file[file path for JSON exporter]: :_files' \
|
||||
'--export-graph-path[Folder for Graph exporter]: :_files -/' \
|
||||
'--export-process-filter[set the export process filter]:filters' \
|
||||
'(-c --client)'{-c,--client}'[connect to a Glances server]:host:_hosts' \
|
||||
'(-s --server)'{-s,--server}'[run Glances in server mode]' \
|
||||
'--browser[start the client browser]' \
|
||||
'--disable-autodiscover[disable autodiscover feature]' \
|
||||
'(-p --port)'{-p,--port}'[define the client/server TCP port]' \
|
||||
'(-p --port)'{-p,--port}'[define the client/server TCP port]:port' \
|
||||
'(-B --bind)'{-B,--bind}'[bind server to the given IPv4/IPv6 address or hostname]:host:_hosts' \
|
||||
'--username[define a client/server username]' \
|
||||
'--password[define a client/server password]' \
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ _arguments -s -C \
|
|||
'(-n --noparity)'{-n,--noparity}'[Set the parity of the serial line to none]' \
|
||||
'(-o --oddparity)'{-o,--oddparity}'[Set the parity of the serial line to odd]' \
|
||||
'(-s --speed)'{-s,--speed}'[Set the speed(the baud rate) of the serial line]:value' \
|
||||
'(-C --intro-command)'{-C,--intro-command}'[An intro command before the invocation of ldattach]:command' \
|
||||
'(-c --intro-command)'{-c,--intro-command}'[An intro command before the invocation of ldattach]:command' \
|
||||
'(-p --pause)'{-p,--pause}'[Sleep for given seconds before the invocation of ldattach]:value' \
|
||||
'(- *)'{-h,--help}'[Display help text and exit]'\
|
||||
'(- *)'{-V,--version}'[Print version and exit]' \
|
||||
|
|
|
|||
24
src/_node
24
src/_node
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Node.js v24.4.0 (https://nodejs.org)
|
||||
# Completion script for Node.js v25.0.0 (https://nodejs.org)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -69,10 +69,7 @@ _node_scripts() {
|
|||
_describe 'scripts' scripts
|
||||
}
|
||||
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
_arguments \
|
||||
'-[script read from stdin (default; interactive mode if a tty)]' \
|
||||
'--[indicate the end of node options]' \
|
||||
'--abort-on-uncaught-exception[aborting instead of exiting causes a core file to be generated for analysis]' \
|
||||
|
|
@ -80,6 +77,8 @@ _arguments -C \
|
|||
'--allow-child-process[allow use of child process when any permissions are set]' \
|
||||
'--allow-fs-read=[allow permissions to read the filesystem]: :_files' \
|
||||
'--allow-fs-write=[allow permissions to write in the filesystem]:_files' \
|
||||
'--allow-inspector[allow use of inspector when any permissions are set]' \
|
||||
'--allow-net[allow use of network when any permissions are set]' \
|
||||
'--allow-wasi[allow wasi when any permissions are set]' \
|
||||
'--allow-worker[allow worker threads when any permissions are set]' \
|
||||
'--build-snapshot[generate a snapshot blob when the process exits]' \
|
||||
|
|
@ -110,16 +109,17 @@ _arguments -C \
|
|||
'--experimental-default-config-file[set config file from default config file]' \
|
||||
'--experimental-eventsource[enable experimental EventSource API]' \
|
||||
'--experimental-import-meta-resolve[experimental ES Module import.meta.resolve() support]' \
|
||||
'--experimental-inspector-network-resource[experimental load network resources via the inspector]' \
|
||||
'(--loader --experimental-loader)'{--loader,--experimental-loader}'=[Specify the module of a custom ECMAScript Module loader]: :_files' \
|
||||
'--experimental-network-inspection[enable experimental network inspection support]' \
|
||||
'--experimental-print-required-tla[print pending top-level await]' \
|
||||
'--experimental-quic[experimental QUIC support]' \
|
||||
'--experimental-sea-config=[generate a blob that can be embedded into the single executable application]: :_files' \
|
||||
'--experimental-test-coverage[enable code coverage in the test runner]' \
|
||||
'--experimental-test-module-mocks[enable module mocking in the test runner]' \
|
||||
'--experimental-transform-types[enable transformation of TypeScript-onlysyntax into JavaScript code]' \
|
||||
'--experimental-vm-modules[experimental ES Module support in vm module]' \
|
||||
'--experimental-wasm-modules[experimental ES module support for webassembly modules]' \
|
||||
'--experimental-webstorage[experimental Web Storage API]' \
|
||||
'--experimental-worker-inspection[experimental worker inspection support]' \
|
||||
'--expose-gc[expose gc extension]' \
|
||||
'--force-context-aware[disable loading non-context-aware addons]' \
|
||||
'--force-fips[force FIPS crypto]' \
|
||||
|
|
@ -145,8 +145,10 @@ _arguments -C \
|
|||
'--jitless[Disable runtime allocation of executable memory]' \
|
||||
'--localstorage-file=[file used to persist localStorage data]:file:_files' \
|
||||
'--max-http-header-size=[set the maximum size of HTTP headers]: :number' \
|
||||
"--max-old-space-size-percentage=[set V8's max old space size as a percentage of available memory]:memory" \
|
||||
'--network-family-autoselection-attempt-timeout=[sets the default value for the network family autoselection attempt timeout]:timeout' \
|
||||
'--no-addons[disable loading native addons]' \
|
||||
'--no-async-context-frame[improve AsyncLocalStorage performance with AsyncContextFrame]' \
|
||||
'--no-deprecation[silence deprecation warnings]' \
|
||||
'--no-experimental-detect-module[when ambiguous modules fail to evaluate, try again to evaluate them as ES modules]' \
|
||||
'--no-experimental-global-navigator[expose experimental Navigator API on the global scope]' \
|
||||
|
|
@ -158,7 +160,9 @@ _arguments -C \
|
|||
'--no-extra-info-on-fatal-exception[hide extra information on fatal exception that causes exit]' \
|
||||
'--no-force-async-hooks-checks[disable checks for async_hooks]' \
|
||||
'--no-global-search-paths[disable global module search paths]' \
|
||||
'--no-network-family-autoselection[disable network address family autodetection algorithm]' \
|
||||
'--no-warnings[silence all process warnings]' \
|
||||
'--no-webstorage[disable Web Storage API]' \
|
||||
'--node-memory-debug[run with extra debug checks for memory leaks in Node.js itself]' \
|
||||
'--openssl-config=[load OpenSSL configuration from the specified file (overrides OPENSSL_CONF)]:file:_files' \
|
||||
'--openssl-legacy-provider[enable OpenSSL 3.0 legacy provider]' \
|
||||
|
|
@ -191,11 +195,13 @@ _arguments -C \
|
|||
'--test-coverage-include=[include files from coverage report that match this glob pattern]:pattern' \
|
||||
'--test-coverage-lines=[the line coverage minimum threshold]:threshold' \
|
||||
'--test-force-exit[force test runner to exit upon completion]' \
|
||||
'--test-global-setup=[specify the path to the global setup file]:file:_files' \
|
||||
'--test-isolation=[configurations the type of test isolation used in the test runner]:isolation' \
|
||||
'--test-name-pattern=[run tests whose name matches this regular expression]:pattern' \
|
||||
'--test-only[run tests with "only" option set]' \
|
||||
'*--test-reporter=[report test output using the given reporter]:reporter:(tap spec dot)' \
|
||||
'*--test-reporter-destination=[report given reporter to the given destination]:destination:_files' \
|
||||
'--test-rerun-failures=[specify the path to the rerun state file]:state file:_files' \
|
||||
'--test-shard=[run test at specific shard]:shard' \
|
||||
'--test-skip-pattern=[run tests whose name do not match this regular expression]' \
|
||||
'--test-timeout=[specify test runner timeout]' \
|
||||
|
|
@ -238,9 +244,7 @@ _arguments -C \
|
|||
'--zero-fill-buffers[automatically zero-fill all newly allocated Buffer and SlowBuffer instances]' \
|
||||
'(- 1 *)'{-h,--help}'[print node command line options]' \
|
||||
'(- 1 *)'{-v,--version}'[print Node.js version]' \
|
||||
'*: :_node_args' && ret=0
|
||||
|
||||
return ret
|
||||
'*: :_node_args'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ _protoc() {
|
|||
'--js_out=[Generate JavaScript source]:out_dir:_files -/' \
|
||||
'--objc_out=[Generate Objective C header and source]:out_dir:_files -/' \
|
||||
'--php_out=[Generate PHP source file]:out_dir:_files -/' \
|
||||
'--pyi_out=[Generate python pyi stub]:out_dir:_files -/' \
|
||||
'--python_out=[Generate Python source file]:out_dir:_files -/' \
|
||||
'--ruby_out=[Generate Ruby source file]:out_dir:_files -/' \
|
||||
'--rust_out=[Generate Rust sources]:out_dir:_files -/' \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
#compdef swaplabel
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 swaplabel v2.41 (https://github.com/util-linux/util-linux)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[display help message]' \
|
||||
'(- *)'{-V,--version}'[display version]' \
|
||||
'(-L --label)'{-L,--label}'[specify a new label]:label' \
|
||||
'(-U --uuid)'{-U,--uuid}'[specify a new uuid]:uuid' \
|
||||
'*::file:_files'
|
||||
|
||||
# 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
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#compdef swapoff
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 swapoff v2.41 (https://github.com/util-linux/util-linux)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(-a --all)'{-a,--all}'[enable all swaps from /etc/fstab]' \
|
||||
'(- *)'{-h,--help}'[display help message]' \
|
||||
'(- *)'{-V,--version}'[display version]' \
|
||||
'-L[synonym for LABEL=<label>]:label' \
|
||||
'-U[synonym for UUID=<uuid>]:uuid' \
|
||||
'*::file:_files'
|
||||
|
||||
# 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
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#compdef swapon
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 swapon v2.41 (https://github.com/util-linux/util-linux)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
(( $+functions[_swapon_column] )) ||
|
||||
_swapon_column() {
|
||||
local -a columns=(
|
||||
"NAME[device file or partition path]"
|
||||
"TYPE[type of the device]"
|
||||
"SIZE[size of the swap area]"
|
||||
"USED[bytes in use]"
|
||||
"PRIO[swap priority]"
|
||||
"UUID[swap uuid]"
|
||||
"LABEL[swap label]"
|
||||
)
|
||||
|
||||
_values -s ',' column $columns
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'(-a --all)'{-a,--all}'[enable all swaps from /etc/fstab]' \
|
||||
'(-d --discard)'{-d,--discard=-}'[enable swap discards, if supported by device]:policy:(once pages)' \
|
||||
'(-e --ifexists)'{-e,--ifexists}'[silently skip devices that do not exist]' \
|
||||
'(-f --fixpgsz)'{-f,--fixpgsz}'[reinitialize the swap space if necessary]' \
|
||||
\*{-o,--options}'[comma-separated list of swap options]:options' \
|
||||
'(-p --priority)'{-p,--priority}'[specify the priority of the swap device]:priority' \
|
||||
'(-s --summary)'{-s,--summary}'[display summary about used swap devices]' \
|
||||
'(-T --fstab)'{-T,--fstab}'[alternative file to /etc/fstab]:path:_files' \
|
||||
'--show=-[display summary in definable table]:column:_swapon_column' \
|
||||
'--noheadings[do not print table heading(with --show)]' \
|
||||
'--raw[use the raw output format(with --show)]' \
|
||||
'--bytes[display swap size in bytes in --show output]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
|
||||
'(- *)'{-h,--help}'[display help message]' \
|
||||
'(- *)'{-V,--version}'[display version]' \
|
||||
'-L[synonym for LABEL=<label>]:label' \
|
||||
'-U[synonym for UUID=<uuid>]:uuid' \
|
||||
'*::file:_files'
|
||||
|
||||
# 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
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ts-node v10.9.1. (https://github.com/TypeStrong/ts-node)
|
||||
# Completion script for ts-node v10.9.2. (https://github.com/TypeStrong/ts-node)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -41,6 +41,7 @@ _arguments \
|
|||
'(-e --eval)'{-e,--eval}'[Evaluate code]:code' \
|
||||
'(-p --print)'{-p,--print}'[Print result of "--eval"]' \
|
||||
'*'{-r,--require}'[Require a node module before execution]:path:_files' \
|
||||
'(-i --interactive)'{-i,--interactive}'[Open the REPL even if stdin does not appear to be a terminal]' \
|
||||
'--esm[Bootstrap with the ESM loader, enabling full ESM support]' \
|
||||
'--swc[Use the faster swc transpiler]' \
|
||||
'(- *)--showConfig[Print resolved configuration and exit]' \
|
||||
|
|
|
|||
Loading…
Reference in New Issue