summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'