Skip to content

Commit a185e55

Browse files
authored
Merge pull request #494 from i3wm/master
Pull request for addition of rclone completions
2 parents 6410565 + b0cb2ad commit a185e55

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed

Diff for: src/_rclone

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#compdef rclone
2+
3+
# ------------------------------------------------------------------------------
4+
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
5+
# All rights reserved.
6+
#
7+
# Redistribution and use in source and binary forms, with or without
8+
# modification, are permitted provided that the following conditions are met:
9+
# * Redistributions of source code must retain the above copyright
10+
# notice, this list of conditions and the following disclaimer.
11+
# * Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
# * Neither the name of the zsh-users nor the
15+
# names of its contributors may be used to endorse or promote products
16+
# derived from this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
22+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
# ------------------------------------------------------------------------------
29+
# Description
30+
# -----------
31+
#
32+
# Completion script for rclone (http://rclone.org/).
33+
#
34+
# ------------------------------------------------------------------------------
35+
# Author(s)
36+
# -------
37+
#
38+
# * Rajat Roy <[email protected]>
39+
#
40+
# ------------------------------------------------------------------------------
41+
42+
_rclone() {
43+
local state
44+
45+
_arguments \
46+
'1: :->subcommand' \
47+
'--bwlimit' \
48+
'--checkers' \
49+
'(-c --checksum)'{-c,--checksum}'[check the file hash and size to determine if files are equal]' \
50+
'--config' \
51+
'--contimeout' \
52+
'--dedupe-mode' \
53+
'(-n --dry-run)'{-n,--dry-run}'[Do a trial run with no permanent changes]' \
54+
'--ignore-existing' \
55+
'--ignore-size' \
56+
'(-I --ignore-times)'{-I,--ignore-times}'[unconditionally upload all files regardless of the state of files on the destination]' \
57+
'--log-file' \
58+
'--low-level-retries' \
59+
'--max-depth' \
60+
'--modify-window' \
61+
'--no-gzip-encoding' \
62+
'--no-update-modtime' \
63+
'(-q --quiet)'{-q,--quiet}'[as little output as possible]' \
64+
'--retries' \
65+
'--size-only' \
66+
'--stats' \
67+
'--delete-' \
68+
'--timeout' \
69+
'--transfers' \
70+
'(-u --update)'{-u,--update}'[skip any files which exist on the destination and have a modified time that is newer than the source file]' \
71+
'(-v --verbose)'{-v,--verbose}'[tells you about every file it considers and transfers]' \
72+
'--delete-excluded' \
73+
'--filter' \
74+
'--filter-from' \
75+
'-exclude' \
76+
'--exclude-from' \
77+
'--include' \
78+
'--include-from' \
79+
'--files-from' \
80+
'--min-size' \
81+
'--max-size' \
82+
'--min-age' \
83+
'--max-age' \
84+
'--dump-filters' \
85+
'*:files:_files'
86+
87+
case $state in
88+
subcommand)
89+
_arguments '1: :(
90+
config
91+
copy
92+
sync
93+
move
94+
delete
95+
purge
96+
mkdir
97+
rmdir
98+
check
99+
ls
100+
lsd
101+
lsl
102+
md5sum
103+
sha1sum
104+
size
105+
version
106+
cleanup
107+
dedupe
108+
authorize
109+
cat
110+
genautocomplete
111+
gendocs
112+
listremotes
113+
mount
114+
--help)'
115+
;;
116+
esac
117+
}
118+
119+
_rclone "$@"

0 commit comments

Comments
 (0)