Remove unused code in zsh completion

Move completions/_proxychains4 to completions/zsh/_proxychains4 to avoid confusion
pull/524/head
Wu Zhenyu 2022-09-19 16:42:49 +08:00 committed by rofl0r
parent 133e06b3f0
commit 42d2d95160
3 changed files with 11 additions and 15 deletions

View File

@ -49,7 +49,7 @@ PXCHAINS = proxychains4
PXCHAINS_D = proxychains4-daemon
ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
ALL_CONFIGS = src/proxychains.conf
ZSH_COMPLETION = completions/_proxychains4
ZSH_COMPLETION = completions/zsh/_proxychains4
-include config.mak
@ -70,13 +70,13 @@ $(DESTDIR)$(libdir)/%: %
$(DESTDIR)$(sysconfdir)/%: src/%
$(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(zshcompletiondir)/%: completions/%
$(DESTDIR)$(zshcompletiondir)/%: completions/zsh/%
$(INSTALL) -D -m 644 $< $@
install-libs: $(ALL_LIBS:%=$(DESTDIR)$(libdir)/%)
install-tools: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%)
install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
install-zsh-completion: $(ZSH_COMPLETION:completions/%=$(DESTDIR)$(zshcompletiondir)/%)
install-zsh-completion: $(ZSH_COMPLETION:completions/zsh/%=$(DESTDIR)$(zshcompletiondir)/%)
clean:
rm -f $(ALL_LIBS)

View File

@ -1,12 +0,0 @@
#compdef proxychains4
setopt localoptions extended_glob
local -a _comp_priv_prefix
_arguments \
'(- *)--help[More help in README file]' \
'(-q)-q[makes proxychains quiet - this overrides the config setting]' \
'(-f)-f[allows one to manually specify a configfile to use]:filename:_files' \
'(-)1:command: _command_names -e' \
'*::arguments:{ _comp_priv_prefix=( '$words[1]' -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) ; _normal }'

View File

@ -0,0 +1,8 @@
#compdef proxychains4
_arguments \
'(- : *)--help[More help in README file]' \
'-q[makes proxychains quiet - this overrides the config setting]' \
'-f[allows one to manually specify a configfile to use]: :_files' \
'(-)1: :{_command_names -e}' \
'*:: :_normal'