e585904e1040acedd2fc3092ef99a3a9aaa0d661
- Author
- Ján Koščo <3k.stanley@gmail.com>
- Committer
- Ján Koščo <3k.stanley@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/geeknote/_geeknote b/plugins/geeknote/_geeknote
2new file mode 100644
3index 0000000000000000000000000000000000000000..4d5339f2b4461f9f6408d43653e079a843eb1eb6
4--- /dev/null
5+++ b/plugins/geeknote/_geeknote
6@@ -0,0 +1,135 @@
7+#compdef geeknote
8+# --------------- ------------------------------------------------------------
9+# Name : _geeknote
10+# Synopsis : zsh completion for geeknote
11+# Author : Ján Koščo <3k.stanley@gmail.com>
12+# HomePage : http://www.geeknote.me
13+# Version : 0.1
14+# Tag : [ shell, zsh, completion, evernote ]
15+# Copyright : © 2014 by Ján Koščo,
16+# Released under current GPL license.
17+# --------------- ------------------------------------------------------------
18+
19+local -a _1st_arguments
20+_1st_arguments=(
21+ 'login'
22+ 'logout'
23+ 'settings'
24+ 'create'
25+ 'edit'
26+ 'find'
27+ 'show'
28+ 'remove'
29+ 'notebook-list'
30+ 'notebook-create'
31+ 'notebook-edit'
32+ 'tag-list'
33+ 'tag-create'
34+ 'tag-edit'
35+ 'gnsync'
36+ 'user'
37+)
38+
39+_arguments '*:: :->command'
40+
41+if (( CURRENT == 1 )); then
42+ _describe -t commands "geeknote command" _1st_arguments
43+ return
44+fi
45+
46+local -a _command_args
47+case "$words[1]" in
48+ user)
49+ _command_args=(
50+ '(--full)--full' \
51+ )
52+ ;;
53+ logout)
54+ _command_args=(
55+ '(--force)--force' \
56+ )
57+ ;;
58+ settings)
59+ _command_args=(
60+ '(--editor)--editor' \
61+ )
62+ ;;
63+ create)
64+ _command_args=(
65+ '(-t|--title)'{-t,--title}'[note title]' \
66+ '(-c|--content)'{-c,--content}'[note content]' \
67+ '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
68+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
69+ )
70+ ;;
71+ edit)
72+ _command_args=(
73+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
74+ '(-t|--title)'{-t,--title}'[note title]' \
75+ '(-c|--content)'{-c,--content}'[note content]' \
76+ '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
77+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
78+ )
79+ ;;
80+ remove)
81+ _command_args=(
82+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
83+ '(--force)--force' \
84+ )
85+ ;;
86+ show)
87+ _command_args=(
88+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
89+ )
90+ ;;
91+ find)
92+ _command_args=(
93+ '(-s|--search)'{-s,--search}'[text to search]' \
94+ '(-tg|--tags)'{-tg,--tags}'[notes with which tag/tags to search]' \
95+ '(-nb|--notebook)'{-nb,--notebook}'[in which notebook search the note]' \
96+ '(-d|--date)'{-d,--date}'[date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy]' \
97+ '(-cn|--count)'{-cn,--count}'[how many notes show in the result list]' \
98+ '(-wu|--with-url)'{-wu,--with-url}'[add direct url of each note in results to Evernote web-version]' \
99+ '(-ee|--exact-entry)'{-ee,--exact-entry}'[search for exact entry of the request]' \
100+ '(-cs|--content-search)'{-cs,--content-search}'[search by content, not by title]' \
101+ )
102+ ;;
103+ notebook-create)
104+ _command_args=(
105+ '(-t|--title)'{-t,--title}'[notebook title]' \
106diff --git a/plugins/geeknote/geeknote.plugin.zsh b/plugins/geeknote/geeknote.plugin.zsh
107new file mode 100644
108index 0000000000000000000000000000000000000000..8126d26b33e0cf2e3d6444b3e8a706995e183dfa
109--- /dev/null
110+++ b/plugins/geeknote/geeknote.plugin.zsh
111@@ -0,0 +1,2 @@
112+#Alias
113+alias gn='geeknote'