1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 01:34:23 +00:00

adding "remove" option for #47 and fix a few issues/bugs

This commit is contained in:
deadc0de6
2019-06-02 18:18:52 +02:00
parent 44db88ce74
commit 4ed7b4d78c
13 changed files with 509 additions and 102 deletions

View File

@@ -38,6 +38,7 @@ _dotdrop ()
'import'
'compare'
'update'
'remove'
'listfiles'
'detail'
'list'
@@ -59,6 +60,9 @@ _dotdrop ()
update)
_dotdrop-update
;;
remove)
_dotdrop-remove
;;
listfiles)
_dotdrop-listfiles
;;
@@ -97,7 +101,7 @@ _dotdrop-install ()
'(-D)-D' \
'(--showdiff)--showdiff' \
'(-a)-a' \
'(--force-action)--force-action' \
'(--force-actions)--force-actions' \
'(-c=-)-c=-' \
'(--cfg=-)--cfg=-' \
'(-p=-)-p=-' \
@@ -193,6 +197,35 @@ _dotdrop-update ()
fi
}
_dotdrop-remove ()
{
local context state state_descr line
typeset -A opt_args
if [[ $words[$CURRENT] == -* ]] ; then
_arguments -C \
':command:->command' \
'(-V)-V' \
'(--verbose)--verbose' \
'(-b)-b' \
'(--no-banner)--no-banner' \
'(-f)-f' \
'(--force)--force' \
'(-d)-d' \
'(--dry)--dry' \
'(-k)-k' \
'(--key)--key' \
'(-c=-)-c=-' \
'(--cfg=-)--cfg=-' \
'(-p=-)-p=-' \
'(--profile=-)--profile=-' \
else
myargs=('<path>')
_message_next_arg
fi
}
_dotdrop-listfiles ()
{
local context state state_descr line