File tree 3 files changed +21
-18
lines changed
3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 44
44
45
45
OPTIONS = [
46
46
{
47
- 'title' : 'Search Google Drive'
47
+ 'title' : 'Search Google Drive' ,
48
+ 'autocomplete' : None
48
49
},
49
50
{
50
- 'title' : 'Type ">" for Settings'
51
+ 'title' : 'Type ">" for Settings' ,
52
+ 'autocomplete' : '> '
51
53
}
52
54
]
53
55
Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ def show_options(cls):
132
132
"""Show options"""
133
133
134
134
for option in OPTIONS :
135
- wf .add_item (title = option ['title' ])
135
+ wf .add_item (title = option ['title' ],
136
+ autocomplete = option ['autocomplete' ])
136
137
wf .send_feedback ()
137
138
138
139
@classmethod
Original file line number Diff line number Diff line change 8
8
wf = Workflow (update_settings = UPDATE_SETTINGS , help_url = HELP_URL )
9
9
10
10
def main (wf ):
11
- url = wf .args [0 ]
12
- if url == 'logout' :
13
- Drive .revoke_tokens ()
14
- return sys .stdout .write (" logged out" )
15
- elif url == 'login' :
16
- return Drive .open_auth_page ()
17
- elif url == 'clear' :
18
- Drive .clear_cache ()
19
- return sys .stdout .write (" cache cleared" )
20
- elif url .startswith ('set' ):
21
- length = int (url [3 :])
22
- Drive .set_cache_length (length )
23
- return sys .stdout .write (" cache set to %s seconds" % str (length ))
11
+ url = wf .args [0 ]
12
+ if url == 'logout' :
13
+ Drive .revoke_tokens ()
14
+ return sys .stdout .write (' logged out' )
15
+ elif url == 'login' :
16
+ return Drive .open_auth_page ()
17
+ elif url == 'clear' :
18
+ Drive .clear_cache ()
19
+ return sys .stdout .write (' cache cleared' )
20
+ elif url .startswith ('set' ):
21
+ length = int (url [3 :])
22
+ Drive .set_cache_length (length )
23
+ return sys .stdout .write (' cache set to %s seconds' % str (length ))
24
24
25
- Drive .open_page (url )
25
+ Drive .open_page (url )
26
26
27
27
if __name__ == '__main__' :
28
- sys .exit (wf .run (main ))
28
+ sys .exit (wf .run (main ))
You can’t perform that action at this time.
0 commit comments