summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2016-03-30 04:31:09 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-03-30 04:31:09 +0200
commitc74681a1990c66205e27d803f3d3740b0bbb7202 (patch)
tree60764154d1390cc3304674d1195185b85e9aa2df /plugins
parentd1a5fad25b4e1ed008844efd055c1f33d6d5f633 (diff)
parenta6ab704482f3f092b907a306eec2b3b8d908a5da (diff)
downloadzsh-c74681a1990c66205e27d803f3d3740b0bbb7202.tar.gz
zsh-c74681a1990c66205e27d803f3d3740b0bbb7202.tar.bz2
zsh-c74681a1990c66205e27d803f3d3740b0bbb7202.zip
Merge pull request #2392 from s7anley/master
Geeknote autocomplete and alias
Diffstat (limited to 'plugins')
-rw-r--r--plugins/geeknote/README.md12
-rw-r--r--plugins/geeknote/_geeknote136
-rw-r--r--plugins/geeknote/geeknote.plugin.zsh2
3 files changed, 150 insertions, 0 deletions
diff --git a/plugins/geeknote/README.md b/plugins/geeknote/README.md
new file mode 100644
index 000000000..a6b50e27f
--- /dev/null
+++ b/plugins/geeknote/README.md
@@ -0,0 +1,12 @@
+## ZSH-Geeknote
+
+[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for [oh-my-zsh framework](http://github.com/robbyrussell/oh-my-zsh).
+
+Plugins provides:
+
+- auto completion of commands and their options
+- alias `gn`
+
+You can find information how to install Geeknote and it's available commands on the [project website](http://www.geeknote.me/).
+
+Maintainer : Ján Koščo ([@s7anley](https://twitter.com/s7anley))
diff --git a/plugins/geeknote/_geeknote b/plugins/geeknote/_geeknote
new file mode 100644
index 000000000..cf1a187d2
--- /dev/null
+++ b/plugins/geeknote/_geeknote
@@ -0,0 +1,136 @@
+#compdef geeknote
+# --------------- ------------------------------------------------------------
+# Name : _geeknote
+# Synopsis : zsh completion for geeknote
+# Author : Ján Koščo <3k.stanley@gmail.com>
+# HomePage : http://www.geeknote.me
+# Version : 0.1
+# Tag : [ shell, zsh, completion, evernote ]
+# Copyright : © 2014 by Ján Koščo,
+# Released under current GPL license.
+# --------------- ------------------------------------------------------------
+
+local -a _1st_arguments
+_1st_arguments=(
+ 'login'
+ 'logout'
+ 'settings'
+ 'create'
+ 'edit'
+ 'find'
+ 'show'
+ 'remove'
+ 'notebook-list'
+ 'notebook-create'
+ 'notebook-edit'
+ 'tag-list'
+ 'tag-create'
+ 'tag-edit'
+ 'tag-remove'
+ 'gnsync'
+ 'user'
+)
+
+_arguments '*:: :->command'
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "geeknote command" _1st_arguments
+ return
+fi
+
+local -a _command_args
+case "$words[1]" in
+ user)
+ _command_args=(
+ '(--full)--full' \
+ )
+ ;;
+ logout)
+ _command_args=(
+ '(--force)--force' \
+ )
+ ;;
+ settings)
+ _command_args=(
+ '(--editor)--editor' \
+ )
+ ;;
+ create)
+ _command_args=(
+ '(-t|--title)'{-t,--title}'[note title]' \
+ '(-c|--content)'{-c,--content}'[note content]' \
+ '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
+ )
+ ;;
+ edit)
+ _command_args=(
+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
+ '(-t|--title)'{-t,--title}'[note title]' \
+ '(-c|--content)'{-c,--content}'[note content]' \
+ '(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
+ )
+ ;;
+ remove)
+ _command_args=(
+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
+ '(--force)--force' \
+ )
+ ;;
+ show)
+ _command_args=(
+ '(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
+ )
+ ;;
+ find)
+ _command_args=(
+ '(-s|--search)'{-s,--search}'[text to search]' \
+ '(-tg|--tags)'{-tg,--tags}'[notes with which tag/tags to search]' \
+ '(-nb|--notebook)'{-nb,--notebook}'[in which notebook search the note]' \
+ '(-d|--date)'{-d,--date}'[date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy]' \
+ '(-cn|--count)'{-cn,--count}'[how many notes show in the result list]' \
+ '(-uo|--url-only)'{-uo,--url-only}'[add direct url of each note in results to Evernote web-version]' \
+ '(-ee|--exact-entry)'{-ee,--exact-entry}'[search for exact entry of the request]' \
+ '(-cs|--content-search)'{-cs,--content-search}'[search by content, not by title]' \
+ )
+ ;;
+ notebook-create)
+ _command_args=(
+ '(-t|--title)'{-t,--title}'[notebook title]' \
+ )
+ ;;
+ notebook-edit)
+ _command_args=(
+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook to rename]' \
+ '(-t|--title)'{-t,--title}'[new notebook title]' \
+ )
+ ;;
+ notebook-remove)
+ _command_args=(
+ '(-nb|--notebook)'{-nb,--notebook}'[name of notebook to remove]' \
+ '(--force)--force' \
+ )
+ ;;
+ tag-create)
+ _command_args=(
+ '(-t|--title)'{-t,--title}'[title of tag]' \
+ )
+ ;;
+ tag-edit)
+ _command_args=(
+ '(-tgn|--tagname)'{-tgn,--tagname}'[tag to edit]' \
+ '(-t|--title)'{-t,--title}'[new tag name]' \
+ )
+ ;;
+ tag-remove)
+ _command_args=(
+ '(-tgn|--tagname)'{-tgn,--tagname}'[tag to remove]' \
+ '(--force)--force' \
+ )
+ ;;
+ esac
+
+_arguments \
+ $_command_args \
+ && return 0
diff --git a/plugins/geeknote/geeknote.plugin.zsh b/plugins/geeknote/geeknote.plugin.zsh
new file mode 100644
index 000000000..8126d26b3
--- /dev/null
+++ b/plugins/geeknote/geeknote.plugin.zsh
@@ -0,0 +1,2 @@
+#Alias
+alias gn='geeknote'