summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-01 20:52:23 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-01 20:52:23 +0200
commit9fdb78b5df06a1cc2b51b57e85888f1c6db09377 (patch)
treeab856dfbcce5809e51b9cacf7c2d761623e7c0e4
parent0fbc855f34733369907af11c846abef3429ca5fa (diff)
Completion for raps2
-rw-r--r--etc/completions/_raps232
1 files changed, 32 insertions, 0 deletions
diff --git a/etc/completions/_raps2 b/etc/completions/_raps2
new file mode 100644
index 0000000..c48c0cf
--- /dev/null
+++ b/etc/completions/_raps2
@@ -0,0 +1,32 @@
+#compdef raps2
+
+typeset -i NORMARG
+
+function _raps2_action_args {
+ if [[ ${words[$NORMARG]} == add ]]; then
+ _message 'Account name'
+
+ elif [[ ${words[$NORMARG]} != list ]]; then
+ _path_files -W ${XDG_DATA_HOME-${HOME}/.local/share}/raps2/
+
+ fi
+}
+
+function _raps2_action {
+ typeset -a actions
+
+ actions=(
+ 'add:Add an account'
+ 'del:Remove an account'
+ 'dump:Dump all account data'
+ 'edit:Edit account'
+ 'get:Place account password in X clipboard'
+ 'info:Show account information'
+ 'list:list accounts'
+ )
+
+ _describe 'action' actions
+}
+
+_arguments -n ':action:_raps2_action' \
+ '*:arguments:_raps2_action_args'