Add zsh completion scripts
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
ea5f547fdc
commit
6dea60aa9f
7
Makefile
7
Makefile
@ -120,11 +120,14 @@ lint:
|
||||
|
||||
install: $(COMPILED_BINS)
|
||||
install -dm755 $(DESTDIR)$(BINDIR)
|
||||
install -dm755 $(DESTDIR)$(ZSH_COMPL_DEST)
|
||||
$(foreach i,$(USR_BIN), \
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/ ;)
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/ ; \
|
||||
install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;)
|
||||
install -dm755 $(DESTDIR)$(SBINDIR)
|
||||
$(foreach i,$(USR_SBIN), \
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(SBINDIR)/ ;)
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(SBINDIR)/ ; \
|
||||
install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;)
|
||||
install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup
|
||||
$(foreach i,$(SERVICE_BIN), \
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
||||
|
2
debian/proxmox-backup-client.install
vendored
2
debian/proxmox-backup-client.install
vendored
@ -2,3 +2,5 @@ usr/bin/proxmox-backup-client
|
||||
usr/bin/pxar
|
||||
usr/share/man/man1/proxmox-backup-client.1
|
||||
usr/share/man/man1/pxar.1
|
||||
usr/share/zsh/vendor-completions/_proxmox-backup-client
|
||||
usr/share/zsh/vendor-completions/_pxar
|
||||
|
1
debian/proxmox-backup-server.install
vendored
1
debian/proxmox-backup-server.install
vendored
@ -11,3 +11,4 @@ usr/share/javascript/proxmox-backup/images/proxmox_logo.png
|
||||
usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js
|
||||
usr/share/man/man1/proxmox-backup-manager.1
|
||||
usr/share/man/man1/proxmox-backup-proxy.1
|
||||
usr/share/zsh/vendor-completions/_proxmox-backup-manager
|
||||
|
@ -8,6 +8,7 @@ MAN1DIR = $(PREFIX)/share/man/man1
|
||||
DOCDIR = $(PREFIX)/share/doc/proxmox-backup
|
||||
JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
|
||||
SYSCONFDIR = /etc
|
||||
ZSH_COMPL_DEST = $(PREFIX)/share/zsh/vendor-completions
|
||||
|
||||
# For local overrides
|
||||
-include local.mak
|
||||
|
13
zsh-completions/_proxmox-backup-client
Normal file
13
zsh-completions/_proxmox-backup-client
Normal file
@ -0,0 +1,13 @@
|
||||
#compdef _proxmox-backup-client() proxmox-backup-client
|
||||
|
||||
function _proxmox-backup-client() {
|
||||
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-backup-client bashcomplete "$cmd" "$curr" "$prev")
|
||||
}
|
13
zsh-completions/_proxmox-backup-manager
Normal file
13
zsh-completions/_proxmox-backup-manager
Normal file
@ -0,0 +1,13 @@
|
||||
#compdef _proxmox-backup-manager() proxmox-backup-manager
|
||||
|
||||
function _proxmox-backup-manager() {
|
||||
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-backup-manager bashcomplete "$cmd" "$curr" "$prev")
|
||||
}
|
13
zsh-completions/_pxar
Normal file
13
zsh-completions/_pxar
Normal file
@ -0,0 +1,13 @@
|
||||
#compdef _pxar() pxar
|
||||
|
||||
function _pxar() {
|
||||
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" \
|
||||
pxar bashcomplete "$cmd" "$curr" "$prev")
|
||||
}
|
Loading…
Reference in New Issue
Block a user