mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
Adds Zsh completion file (by Arnaud De Turckheim)
This commit is contained in:
parent
468438cb2c
commit
674391045a
2 changed files with 18 additions and 1 deletions
12
misc/transmissioncli.zsh
Normal file
12
misc/transmissioncli.zsh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#compdef transmissioncli
|
||||
|
||||
_arguments -s -S \
|
||||
'(-h --help)'{-h,--help}'[Print help and exit]' \
|
||||
'(-i --info)'{-i,--info}'[Print metainfo and exit]' \
|
||||
'(-d --download)'{-d,--download}'[Maximum download rate (nolimit = -1) (default = -1)]:integer:' \
|
||||
'(-n --net-traversal)'{-n,--nat-traversal}'[Attempt NAT traversal using NAT-PMP or UPnP IGD]' \
|
||||
'(-p --port)'{-p,--port}'[Port we should listen on (default = 9090)]:integer:' \
|
||||
'(-s --scrape)'{-s,--scrape}'[Print counts of seeders/leechers and exit]' \
|
||||
'(-u --upload)'{-u,--upload}'[Maximum upload rate (nolimit = -1) (default = 20)]:integer:' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Verbose level]:level:((0\:Low 1\:Medium 2\:High))' \
|
||||
"*:torrent files:_files -g '*.torrent'"
|
|
@ -29,7 +29,7 @@ all: $(TARGETS)
|
|||
@echo "* Building Transmission BeOS client"
|
||||
@make -C beos -f ../mk/beos.mk
|
||||
|
||||
install: all $(foreach SUB,$(TARGETS),.install$(SUB))
|
||||
install: all $(foreach SUB,$(TARGETS),.install$(SUB)) .install.misc
|
||||
|
||||
.install.cli: .cli
|
||||
@echo "* Installing Transmission CLI client"
|
||||
|
@ -41,6 +41,11 @@ install: all $(foreach SUB,$(TARGETS),.install$(SUB))
|
|||
|
||||
.install.beos:
|
||||
|
||||
.install.misc:
|
||||
@echo "* Installing Zsh completion file"
|
||||
@$(MKDIR) $(DESTDIR)$(PREFIX)/share/zsh/site-functions
|
||||
@$(CP) misc/transmissioncli.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_transmissioncli
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C libtransmission -f ../mk/lib.mk clean
|
||||
@$(MAKE) -C cli -f ../mk/cli.mk clean
|
||||
|
|
Loading…
Reference in a new issue