summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-22 23:15:25 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-22 23:15:25 +0200
commita1811d68b7949150bca11b5ccfd30264cc7e0eab (patch)
tree57cb1b8b8515edc65d912239c7e8958ba9e39a1d
parent09af785cb755956f7e85604d99aabd343747a533 (diff)
downloadpass-a1811d68b7949150bca11b5ccfd30264cc7e0eab.tar.gz
pass-a1811d68b7949150bca11b5ccfd30264cc7e0eab.tar.bz2
pass-a1811d68b7949150bca11b5ccfd30264cc7e0eab.zip
Use describe with commands style.
Diffstat (limited to '')
-rw-r--r--contrib/pass.zsh-completion49
1 files changed, 29 insertions, 20 deletions
diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
index bcb2f98..c6fe678 100644
--- a/contrib/pass.zsh-completion
+++ b/contrib/pass.zsh-completion
@@ -1,7 +1,10 @@
#compdef pass
-# Copyright (C) 2012 Johan Venant <jvenant@invicem.pro> and
-# Brian Mattern <rephorm@rephorm.com>. All Rights Reserved.
+# Copyright (C) 2012:
+# Johan Venant <jvenant@invicem.pro>
+# Brian Mattern <rephorm@rephorm.com>
+# Jason A. Donenfeld <Jason@zx2c4.com>.
+# All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
_pass () {
@@ -49,30 +52,36 @@ _pass () {
_pass_complete_entries_with_subdirs
;;
git)
- _values 'subcommands' \
- "init[Initialize git repository]" \
- "push[Push to remote repository]" \
- "pull[Pull from remote repository]" \
- "config[Show git config]" \
- "log[Show git log]" \
- "reflog[Show git reflog]"
+ local -a subcommands
+ subcommands=(
+ "init:Initialize git repository"
+ "push:Push to remote repository"
+ "pull:Pull from remote repository"
+ "config:Show git config"
+ "log:Show git log"
+ "reflog:Show git reflog"
+ )
+ _describe -t commands 'pass git' subcommands
;;
show|*)
_pass_cmd_show
;;
esac
else
- _values 'command' \
- "init[Initialize new password storage]" \
- "ls[List passwords]" \
- "show[Decrypt and print a password]" \
- "insert[Insert a new password]" \
- "generate[Generate a new password using pwgen]" \
- "edit[Edit a password with \$EDITOR]" \
- "rm[Remove the password]" \
- "git[Call git on the password store]" \
- "version[Output version information]" \
- "help[Output help message]"
+ local -a subcommands
+ subcommands=(
+ "init:Initialize new password storage"
+ "ls:List passwords"
+ "show:Decrypt and print a password"
+ "insert:Insert a new password"
+ "generate:Generate a new password using pwgen"
+ "edit:Edit a password with \$EDITOR"
+ "rm:Remove the password"
+ "git:Call git on the password store"
+ "version:Output version information"
+ "help:Output help message"
+ )
+ _describe -t commands 'pass' subcommands
_arguments : \
"--version[Output version information]" \
"--help[Output help message]"