Skip to content

Commit 5561c0e

Browse files
authored
Merge pull request Grive#132 from doronbehar/master
Add completion file for zsh.
2 parents 3c90425 + bddf8cf commit 5561c0e

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

completion.zsh

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#compdef grive
2+
# ------------------------------------------------------------------------------
3+
# Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
# * Neither the name of the zsh-users nor the
14+
# names of its contributors may be used to endorse or promote products
15+
# derived from this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
21+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
# ------------------------------------------------------------------------------
28+
# Description
29+
# -----------
30+
#
31+
# Completion script for Grive (https://github.com/vitalif/grive2)
32+
#
33+
# ------------------------------------------------------------------------------
34+
# Authors
35+
# -------
36+
#
37+
# * Doron Behar <https://github.com/doronbehar>
38+
#
39+
# ------------------------------------------------------------------------------
40+
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
41+
# vim: ft=zsh sw=2 ts=2 et
42+
# ------------------------------------------------------------------------------
43+
44+
local curcontext="$curcontext" state line ret=1
45+
typeset -A opt_args
46+
47+
_arguments -C \
48+
'(-h --help)'{-h,--help}'[Produce help message]' \
49+
'(-v --version)'{-v,--version}'[Display Grive version]' \
50+
'(-a --auth)'{-a,--auth}'[Request authorization token]' \
51+
'(-p --path)'{-p,--path}'[Root directory to sync]' \
52+
'(-s --dir)'{-s,--dir}'[Single subdirectory to sync (remembered for next runs)]' \
53+
'(-V --verbose)'{-V,--verbose}'[Verbose mode. Enable more messages than normal.]' \
54+
'(--log-http)--log-http[Log all HTTP responses in this file for debugging.]' \
55+
'(--new-rev)--new-rev[Create,new revisions in server for updated files.]' \
56+
'(-d --debug)'{-d,--debug}'[Enable debug level messages. Implies -v.]' \
57+
'(-l --log)'{-l,--log}'[Set log output filename.]' \
58+
'(-f --force)'{-f,--force}'[Force grive to always download a file from Google Drive instead of uploading it.]' \
59+
'(--dry-run)--dry-run[Only,detect which files need to be uploaded/downloaded,without actually performing them.]' \
60+
'(--ignore)--ignore[Perl,RegExp to ignore files (matched against relative paths, remembered for next runs) ]' \
61+
'*: :_files' && ret=0
62+
63+
return ret

0 commit comments

Comments
 (0)