add proxmox-tape zsh-completions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-03-03 15:00:50 +01:00 committed by Dietmar Maurer
parent b83e136fb6
commit f46573f8c3
2 changed files with 14 additions and 0 deletions

View File

@ -32,5 +32,6 @@ usr/share/man/man5/media-pool.cfg.5
usr/share/man/man5/tape.cfg.5 usr/share/man/man5/tape.cfg.5
usr/share/man/man5/tape-job.cfg.5 usr/share/man/man5/tape-job.cfg.5
usr/share/zsh/vendor-completions/_proxmox-backup-manager usr/share/zsh/vendor-completions/_proxmox-backup-manager
usr/share/zsh/vendor-completions/_proxmox-tape
usr/share/zsh/vendor-completions/_pmtx usr/share/zsh/vendor-completions/_pmtx
usr/share/zsh/vendor-completions/_pmt usr/share/zsh/vendor-completions/_pmt

View File

@ -0,0 +1,13 @@
#compdef _proxmox-tape() proxmox-tape
function _proxmox-tape() {
local cwords line point cmd curr prev
cworkds=${#words[@]}
line=$words
point=${#line}
cmd=${words[1]}
curr=${words[cwords]}
prev=${words[cwords-1]}
compadd -- $(COMP_CWORD="$cwords" COMP_LINE="$line" COMP_POINT="$point" \
proxmox-tape bashcomplete "$cmd" "$curr" "$prev")
}