mirror of
https://git.sr.ht/~leon_plickat/wayneko
synced 2025-09-19 16:03:22 +02:00
Add zsh completions
This commit is contained in:
parent
163e18e205
commit
c1919dc3a7
2 changed files with 20 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -4,6 +4,7 @@ PREFIX=/usr/local
|
|||
BINDIR=$(PREFIX)/bin
|
||||
MANDIR=$(PREFIX)/share/man
|
||||
BASHCOMPDIR=$(PREFIX)/share/bash-completion/completions
|
||||
ZSHCOMPDIR=$(PREFIX)/share/zsh/vendor-completions
|
||||
|
||||
CFLAGS=-Wall -Werror -Wextra -Wpedantic -Wno-unused-parameter -Wconversion $\
|
||||
-Wformat-security -Wformat -Wsign-conversion -Wfloat-conversion $\
|
||||
|
@ -29,11 +30,13 @@ install: wayneko
|
|||
install -D wayneko $(DESTDIR)$(BINDIR)/wayneko
|
||||
install -m 644 -D wayneko.1 $(DESTDIR)$(MANDIR)/man1/wayneko.1
|
||||
install -D bash-completion $(DESTDIR)$(BASHCOMPDIR)/wayneko
|
||||
install -D zsh-completion $(DESTDIR)$(ZSHCOMPDIR)/_wayneko
|
||||
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(BINDIR)/wayneko
|
||||
$(RM) $(DESTDIR)$(MANDIR)/man1/wayneko.1
|
||||
$(RM) $(DESTDIR)$(BASHCOMPDIR)/wayneko
|
||||
$(RM) $(DESTDIR)$(ZSHCOMPDIR)/_wayneko
|
||||
|
||||
clean:
|
||||
$(RM) wayneko $(GEN) $(OBJ)
|
||||
|
|
17
zsh-completion
Normal file
17
zsh-completion
Normal file
|
@ -0,0 +1,17 @@
|
|||
#compdef wayneko
|
||||
|
||||
types=('neko' 'inu' 'random')
|
||||
layers=('background' 'bottom' 'top' 'overlay')
|
||||
bools=('true' 'false')
|
||||
|
||||
_arguments '--help[Print help]' \
|
||||
'--outline-colour:0xRRGGBB[AA]' \
|
||||
'--background-colour:0xRRGGBB[AA]' \
|
||||
'--type[Animal type]:type:{_describe "type" types}' \
|
||||
'--idle-sleep:integer' \
|
||||
'--sleepiness:integer' \
|
||||
'--sleepiness-night:integer' \
|
||||
'--layer[Layer for the surface]:layer:{_describe "layer" layers}' \
|
||||
'--follow-pointer[Follows pointer]:bool:{_describe "bool" bools}' \
|
||||
'--survive-close[Can migrate outputs if closed]' \
|
||||
&& return 0
|
Loading…
Add table
Add a link
Reference in a new issue