diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-07-21 12:11:13 +0530 |
---|---|---|
committer | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-07-21 12:11:13 +0530 |
commit | 40523ce2887b099e591c917a43dc274e277bfa15 (patch) | |
tree | 7559de57bb02c7a9d1eef20f56527f918f9b184f /.config/zsh/completion/_lxd | |
parent | c1ce8d6fb0a6d0a60f098a9babce0a0de69cbb4c (diff) |
zsh: completion: addding lxc/lxd completion
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Diffstat (limited to '.config/zsh/completion/_lxd')
-rw-r--r-- | .config/zsh/completion/_lxd | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.config/zsh/completion/_lxd b/.config/zsh/completion/_lxd new file mode 100644 index 0000000..1a62c3b --- /dev/null +++ b/.config/zsh/completion/_lxd @@ -0,0 +1,47 @@ +#compdef lxd + +# _lxd +# +# Copyright (c) 2020 endaaman +# +# This software may be modified and distributed under the terms +# of the MIT license. See the LICENSE file for details. + +_lxd() { + _arguments -C \ + '1: :__lxd_commands' \ + '*: :__lxd_global_flags' +} + + +__lxd_global_flags() { + local -a _c + _c=( + {-d,--debug}':Show all debug messages' + '--group:The group of users that will be allowed to talk to LXD' + {-h,--help}':Print help' + '--logfile:Path to the log file' + '--syslog:Log to syslog' + '--trace:Log tracing targets' + ) + _describe -o -t global_options 'Flags' _c +} + + + +__lxd_commands() { + local -a _c + _c=( + 'activateifneeded:Check if LXD should be started' + 'cluster:Low-level cluster administration commands' + 'help:Help about any command' + 'import:Import existing containers' + 'init:Configure the LXD daemon' + 'shutdown:Tell LXD to shutdown all containers and exit' + 'version:Show the server version' + 'waitready:Wait for LXD to be ready to process requests' + ) + _describe -t commands 'Commands' _c +} + +compdef _lxd lxd |