3e16d6434778ee9e1d7d5369c53d1e9c6b0517cb

Author
Ján Koščo <640131+s7anley@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

geeknote: update completion (#4986)

Fixes Completion only working for first parameter

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/geeknote/README.md b/plugins/geeknote/README.md
  2index 3f235311231eb6f9420557b91718c61ea99556c9..99c1fbf5b06f438bc858cb77e5fb9f92b6a5498c 100644
  3--- a/plugins/geeknote/README.md
  4+++ b/plugins/geeknote/README.md
  5@@ -1,12 +1,19 @@
  6-## ZSH-Geeknote
  7+ZSH-Geeknote
  8+============
  9 
 10 [Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for oh-my-zsh.
 11 
 12 Plugins provides:
 13 
 14-- auto completion of commands and their options
 15-- alias `gn`
 16+* auto completion of commands and their options
 17+* alias `gn`
 18 
 19-You can find information how to install Geeknote and it's available commands on the [project website](http://www.geeknote.me/).
 20+## Installation
 21 
 22-Maintainer : Ján Koščo ([@s7anley](https://twitter.com/s7anley))
 23+### oh-my-zsh
 24+This plugin is already bundled in oh-my-zsh. To enable just configure plugin definition
 25+
 26+    plugins=( ... geeknote ...)
 27+
 28+### Antigen
 29+Use [Antigen's](https://github.com/zsh-users/antigen) bundle command to install by adding `antigen bundle s7anley/zsh-geeknote` to your `.zshrc` along with your other plugins.
 30diff --git a/plugins/geeknote/_geeknote b/plugins/geeknote/_geeknote
 31index cf1a187d252bc34ac4a5135539fc2ba84feda443..a34be59b1ea835ed599db8b45fe0bb07e7f31083 100644
 32--- a/plugins/geeknote/_geeknote
 33+++ b/plugins/geeknote/_geeknote
 34@@ -1,136 +1,157 @@
 35 #compdef geeknote
 36-# --------------- ------------------------------------------------------------
 37-#           Name : _geeknote
 38-#       Synopsis : zsh completion for geeknote
 39-#         Author : Ján Koščo <3k.stanley@gmail.com>
 40-#       HomePage : http://www.geeknote.me
 41-#        Version : 0.1
 42-#            Tag : [ shell, zsh, completion, evernote ]
 43-#      Copyright : © 2014 by Ján Koščo,
 44-#                  Released under current GPL license.
 45-# --------------- ------------------------------------------------------------
 46+
 47+# Geeknote Autocomplete plugin for Zsh
 48+# Requires: Geeknote installed
 49+# Author : Ján Koščo (@s7anley)
 50+
 51+__login() {
 52+    # no arguments
 53+}
 54+
 55+__logout() {
 56+    _arguments \
 57+        '--force[Do not ask about logging out.]'
 58+}
 59+
 60+__settings() {
 61+    _arguments \
 62+        "--editor+[Set the editor, which use to edit and create notes.]::"
 63+}
 64+
 65+__create() {
 66+    _arguments \
 67+        '--title+[The note title.]::' \
 68+        '--content+[The note content.]::' \
 69+        '--tags+[One tag or the list of tags which will be added to the note.]::' \
 70+        '--notebook+[Set the notebook where to save note.]::' \
 71+        '--resource+[Add a resource to the note.]::'
 72+}
 73+
 74+__edit() {
 75+    _arguments \
 76+        '--note+[The name or ID from the previous search of a note to edit.]::' \
 77+        '--title+[Set new title of the note.]::' \
 78+        '--content+[Set new content of the note.]::' \
 79+        '--tags+[Set new list o tags for the note.]::' \
 80+        '--notebook+[Assign new notebook for the note.]::' \
 81+        '--resource+[Add a resource to the note.]::'
 82+}
 83+
 84+__find() {
 85+    _arguments \
 86+        '--search+[Text to search.]::' \
 87+        '--tags+[Notes with which tag/tags to search.]::' \
 88+        '--notebook+[In which notebook search the note.]::' \
 89+        '--date+[Set date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy.]::' \
 90+        '--count+[How many notes show in the result list.]::' \
 91+        '--with-url[Add direct url of each note in results to Evernote web-version.]' \
 92+        '--content-search[Search by content, not by title.]' \
 93+        '--exact-entry[Search for exact entry of the request.]'
 94+}
 95+
 96+__show() {
 97+    _arguments \
 98+        '--note+[The name or ID from the previous search of a note to show.]::' \
 99+        '--raw[Show the raw note body.]'
100+}
101+
102+__remove() {
103+    _arguments \
104+        '--note+[The name or ID from the previous search of a note to remove.]::' \
105+        '--force[Do not ask about removing.]'
106+}
107+
108+__notebook-list() {
109+    # no arguments
110+}
111+
112+__notebook-create() {
113+    _arguments \
114+        '--title+[Set the title of new notebook.]::'
115+}
116+
117+__notebook-edit() {
118+    _arguments \
119+        '--title+[Set the title of new notebook.]::' \
120+        '--notebook+[The name of a notebook to rename.]::'
121+}
122+
123+__tag-list() {
124+    # no arguments
125+}
126+
127+__tag-create() {
128+    _arguments \
129+        '--title+[Set the title of new tag.]::'
130+}
131+
132+__tag-edit() {
133+    _arguments \