mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-06 21:02:55 +08:00
Add zsh completion file
This commit is contained in:
parent
0a4daa62d6
commit
04023d3811
10
Makefile
10
Makefile
@ -11,7 +11,8 @@ bindir = $(exec_prefix)/bin
|
|||||||
prefix = /usr/local/
|
prefix = /usr/local/
|
||||||
includedir = $(prefix)/include
|
includedir = $(prefix)/include
|
||||||
libdir = $(prefix)/lib
|
libdir = $(prefix)/lib
|
||||||
sysconfdir=$(prefix)/etc
|
sysconfdir = $(prefix)/etc
|
||||||
|
zshcompletiondir = $(prefix)/share/zsh/site_functions
|
||||||
|
|
||||||
OBJS = src/common.o src/main.o
|
OBJS = src/common.o src/main.o
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ PXCHAINS = proxychains4
|
|||||||
PXCHAINS_D = proxychains4-daemon
|
PXCHAINS_D = proxychains4-daemon
|
||||||
ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
|
ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
|
||||||
ALL_CONFIGS = src/proxychains.conf
|
ALL_CONFIGS = src/proxychains.conf
|
||||||
|
ZSH_COMPLETION = completions/_proxychains
|
||||||
|
|
||||||
-include config.mak
|
-include config.mak
|
||||||
|
|
||||||
@ -68,9 +70,13 @@ $(DESTDIR)$(libdir)/%: %
|
|||||||
$(DESTDIR)$(sysconfdir)/%: src/%
|
$(DESTDIR)$(sysconfdir)/%: src/%
|
||||||
$(INSTALL) -D -m 644 $< $@
|
$(INSTALL) -D -m 644 $< $@
|
||||||
|
|
||||||
|
$(DESTDIR)$(zshcompletiondir)/%: completions/%
|
||||||
|
$(INSTALL) -D -m 644 $< $@
|
||||||
|
|
||||||
install-libs: $(ALL_LIBS:%=$(DESTDIR)$(libdir)/%)
|
install-libs: $(ALL_LIBS:%=$(DESTDIR)$(libdir)/%)
|
||||||
install-tools: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%)
|
install-tools: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%)
|
||||||
install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
|
install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
|
||||||
|
install-zsh-completion: $(ZSH_COMPLETION:completions/%=$(DESTDIR)$(zshcompletiondir)/%)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(ALL_LIBS)
|
rm -f $(ALL_LIBS)
|
||||||
@ -97,4 +103,4 @@ $(PXCHAINS_D): $(DOBJS)
|
|||||||
$(CC) $^ $(USER_LDFLAGS) -o $@
|
$(CC) $^ $(USER_LDFLAGS) -o $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all clean install install-config install-libs install-tools
|
.PHONY: all clean install install-config install-libs install-tools install-zsh-completion
|
||||||
|
12
completions/_proxychains
Normal file
12
completions/_proxychains
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#compdef proxychains
|
||||||
|
|
||||||
|
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 }'
|
Loading…
Reference in New Issue
Block a user