X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fdnote%2F_dnote;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fdnote%2F_dnote;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=c8b33486a370e9db3412605589e1a6267bd9188c;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/dnote/_dnote b/stow/oh-my-zsh/.oh-my-zsh/plugins/dnote/_dnote deleted file mode 100644 index c8b3348..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/dnote/_dnote +++ /dev/null @@ -1,39 +0,0 @@ -#compdef dnote - -local -a _1st_arguments - -_1st_arguments=( - 'add:add a new note' - 'view:list books, notes, or view a content' - 'edit:edit a note or a book' - 'remove:remove a note or a book' - 'find:find notes by keywords' - 'sync:sync data with the server' - 'login:login to the dnote server' - 'logout:logout from the dnote server' - 'version:print the current version' - 'help:get help about any command' -) - -get_booknames() { - local names=$(dnote view --name-only) - local -a ret - - while read -r line; do - ret+=("${line}") - done <<< "$names" - - echo "$ret" -} - -if (( CURRENT == 2 )); then - _describe -t commands "dnote subcommand" _1st_arguments - return -elif (( CURRENT == 3 )); then - case "$words[2]" in - v|view|a|add) - _alternative \ - "names:book names:($(get_booknames))" - esac -fi -