From 586f6bd1eb32766168645d0582839dbf36e7f205 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 17 Apr 2014 23:04:59 +0200 Subject: move/copy: always reencrypt passwords at destination --- src/completion/pass.bash-completion | 4 ++-- src/completion/pass.fish-completion | 4 ++++ src/completion/pass.zsh-completion | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/completion') diff --git a/src/completion/pass.bash-completion b/src/completion/pass.bash-completion index 08378f7..69a044d 100644 --- a/src/completion/pass.bash-completion +++ b/src/completion/pass.bash-completion @@ -57,7 +57,7 @@ _pass() { COMPREPLY=() local cur="${COMP_WORDS[COMP_CWORD]}" - local commands="init ls find grep show insert generate edit rm git help version" + local commands="init ls find grep show insert generate edit rm mv cp git help version" if [[ $COMP_CWORD -gt 1 ]]; then local lastarg="${COMP_WORDS[$COMP_CWORD-1]}" case "${COMP_WORDS[1]}" in @@ -84,7 +84,7 @@ _pass() COMPREPLY+=($(compgen -W "-n --no-symbols -c --clip -f --force" -- ${cur})) _pass_complete_entries ;; - mv|rename) + cp|copy|mv|rename) COMPREPLY+=($(compgen -W "-f --force" -- ${cur})) _pass_complete_entries ;; diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion index 2498be4..b0c44ef 100644 --- a/src/completion/pass.fish-completion +++ b/src/completion/pass.fish-completion @@ -85,6 +85,10 @@ complete -c $PROG -f -A -n '__fish_pass_needs_command' -a mv -d 'Command: rename complete -c $PROG -f -A -n '__fish_pass_uses_command mv' -s f -l force -d 'Force rename' complete -c $PROG -f -A -n '__fish_pass_uses_command mv' -a "(__fish_pass_print_entries_and_dirs)" +complete -c $PROG -f -A -n '__fish_pass_needs_command' -a cp -d 'Command: copy existing password' +complete -c $PROG -f -A -n '__fish_pass_uses_command cp' -s f -l force -d 'Force copy' +complete -c $PROG -f -A -n '__fish_pass_uses_command cp' -a "(__fish_pass_print_entries_and_dirs)" + complete -c $PROG -f -A -n '__fish_pass_needs_command' -a rm -d 'Command: remove existing password' complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -s r -l recursive -d 'Remove password groups recursively' complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -s f -l force -d 'Force removal' diff --git a/src/completion/pass.zsh-completion b/src/completion/pass.zsh-completion index b451fbf..55d9bb5 100644 --- a/src/completion/pass.zsh-completion +++ b/src/completion/pass.zsh-completion @@ -48,7 +48,7 @@ _pass () { "--clip[copy password to the clipboard]" _pass_complete_entries_with_subdirs ;; - mv|rename) + cp|copy|mv|rename) _arguments : \ "-f[force rename]" \ "--force[force rename]" \ @@ -90,6 +90,7 @@ _pass () { "generate:Generate a new password using pwgen" "edit:Edit a password with \$EDITOR" "mv:Rename the password" + "cp:Copy the password" "rm:Remove the password" "git:Call git on the password store" "version:Output version information" -- cgit v1.2.3