Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
17dd5792
Commit
17dd5792
authored
10 years ago
by
Marc Cornellà
Browse files
Options
Download
Email Patches
Plain Diff
Update pass completion to upstream
Conflicts: plugins/pass/_pass
parent
25a32443
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/pass/_pass
+20
-6
plugins/pass/_pass
with
20 additions
and
6 deletions
+20
-6
plugins/pass/_pass
View file @
17dd5792
#compdef pass
#compdef pass
#autoload
#autoload
# Copyright (C) 2012:
# Copyright (C) 2012
- 2014
:
# Johan Venant <jvenant@invicem.pro>
# Johan Venant <jvenant@invicem.pro>
# Brian Mattern <rephorm@rephorm.com>
# Brian Mattern <rephorm@rephorm.com>
# Jason A. Donenfeld <Jason@zx2c4.com>
# Jason A. Donenfeld <Jason@zx2c4.com>
.
# All Rights Reserved.
# All Rights Reserved.
#
#
# This file is licensed under the GPLv2+.
# This file is licensed under the GPLv2+.
...
@@ -26,8 +26,8 @@ _pass () {
...
@@ -26,8 +26,8 @@ _pass () {
case "${cmd}" in
case "${cmd}" in
init)
init)
_arguments : \
_arguments : \
"-
r[re-encrypt existing passwords
]" \
"-
p[gpg-id will only be applied to this subfolder
]" \
"--
reencrypt[re-encrypt existing passwords
]"
"--
path[gpg-id will only be applied to this subfolder
]"
_pass_complete_keys
_pass_complete_keys
;;
;;
ls|list|edit)
ls|list|edit)
...
@@ -46,9 +46,19 @@ _pass () {
...
@@ -46,9 +46,19 @@ _pass () {
"-n[don't include symbols in password]" \
"-n[don't include symbols in password]" \
"--no-symbols[don't include symbols in password]" \
"--no-symbols[don't include symbols in password]" \
"-c[copy password to the clipboard]" \
"-c[copy password to the clipboard]" \
"--clip[copy password to the clipboard]"
"--clip[copy password to the clipboard]" \
"-f[force overwrite]" \
"--force[force overwrite]" \
"-i[replace first line]" \
"--in-place[replace first line]"
_pass_complete_entries_with_subdirs
_pass_complete_entries_with_subdirs
;;
;;
cp|copy|mv|rename)
_arguments : \
"-f[force rename]" \
"--force[force rename]"
_pass_complete_entries_with_subdirs
;;
rm)
rm)
_arguments : \
_arguments : \
"-f[force deletion]" \
"-f[force deletion]" \
...
@@ -78,10 +88,14 @@ _pass () {
...
@@ -78,10 +88,14 @@ _pass () {
subcommands=(
subcommands=(
"init:Initialize new password storage"
"init:Initialize new password storage"
"ls:List passwords"
"ls:List passwords"
"find:Find password files or directories based on pattern"
"grep:Search inside decrypted password files for matching pattern"
"show:Decrypt and print a password"
"show:Decrypt and print a password"
"insert:Insert a new password"
"insert:Insert a new password"
"generate:Generate a new password using pwgen"
"generate:Generate a new password using pwgen"
"edit:Edit a password with \$EDITOR"
"edit:Edit a password with \$EDITOR"
"mv:Rename the password"
"cp:Copy the password"
"rm:Remove the password"
"rm:Remove the password"
"git:Call git on the password store"
"git:Call git on the password store"
"version:Output version information"
"version:Output version information"
...
@@ -104,7 +118,7 @@ _pass_cmd_show () {
...
@@ -104,7 +118,7 @@ _pass_cmd_show () {
_pass_complete_entries_helper () {
_pass_complete_entries_helper () {
local IFS=$'\n'
local IFS=$'\n'
local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}
.
##" -e 's#\.gpg##' | sort)
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}
/\{0,1\}
##" -e 's#\.gpg##' | sort)
}
}
_pass_complete_entries_with_subdirs () {
_pass_complete_entries_with_subdirs () {
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help