diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/importers/fpm2pass.pl (renamed from contrib/fpm2pass.pl) | 0 | ||||
-rwxr-xr-x | contrib/importers/gorilla2pass.rb (renamed from contrib/gorilla2pass.rb) | 0 | ||||
-rwxr-xr-x | contrib/importers/kedpm2pass.py (renamed from contrib/kedpm2pass.py) | 0 | ||||
-rwxr-xr-x | contrib/importers/keepass2pass.py (renamed from contrib/keepass2pass.py) | 0 | ||||
-rwxr-xr-x | contrib/importers/keepassx2pass.py (renamed from contrib/keepassx2pass.py) | 0 | ||||
-rwxr-xr-x | contrib/importers/lastpass2pass.rb (renamed from contrib/lastpass2pass.rb) | 0 | ||||
-rwxr-xr-x | contrib/importers/pwsafe2pass.sh (renamed from contrib/pwsafe2pass.sh) | 0 | ||||
-rwxr-xr-x | contrib/importers/revelation2pass.py (renamed from contrib/revelation2pass.py) | 0 | ||||
-rw-r--r-- | contrib/pass.bash-completion | 87 | ||||
-rw-r--r-- | contrib/pass.fish-completion | 104 | ||||
-rw-r--r-- | contrib/pass.zsh-completion | 116 |
11 files changed, 0 insertions, 307 deletions
diff --git a/contrib/fpm2pass.pl b/contrib/importers/fpm2pass.pl index d1a0908..d1a0908 100755 --- a/contrib/fpm2pass.pl +++ b/contrib/importers/fpm2pass.pl diff --git a/contrib/gorilla2pass.rb b/contrib/importers/gorilla2pass.rb index bf168a7..bf168a7 100755 --- a/contrib/gorilla2pass.rb +++ b/contrib/importers/gorilla2pass.rb diff --git a/contrib/kedpm2pass.py b/contrib/importers/kedpm2pass.py index b79cc8b..b79cc8b 100755 --- a/contrib/kedpm2pass.py +++ b/contrib/importers/kedpm2pass.py diff --git a/contrib/keepass2pass.py b/contrib/importers/keepass2pass.py index 80a2ad9..80a2ad9 100755 --- a/contrib/keepass2pass.py +++ b/contrib/importers/keepass2pass.py diff --git a/contrib/keepassx2pass.py b/contrib/importers/keepassx2pass.py index dc4b1e5..dc4b1e5 100755 --- a/contrib/keepassx2pass.py +++ b/contrib/importers/keepassx2pass.py diff --git a/contrib/lastpass2pass.rb b/contrib/importers/lastpass2pass.rb index 41a2a29..41a2a29 100755 --- a/contrib/lastpass2pass.rb +++ b/contrib/importers/lastpass2pass.rb diff --git a/contrib/pwsafe2pass.sh b/contrib/importers/pwsafe2pass.sh index c29bb3f..c29bb3f 100755 --- a/contrib/pwsafe2pass.sh +++ b/contrib/importers/pwsafe2pass.sh diff --git a/contrib/revelation2pass.py b/contrib/importers/revelation2pass.py index f04c1a8..f04c1a8 100755 --- a/contrib/revelation2pass.py +++ b/contrib/importers/revelation2pass.py diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion deleted file mode 100644 index d0ef012..0000000 --- a/contrib/pass.bash-completion +++ /dev/null @@ -1,87 +0,0 @@ -# completion file for bash - -# Copyright (C) 2012 Jason A. Donenfeld <Jason@zx2c4.com> and -# Brian Mattern <rephorm@rephorm.com>. All Rights Reserved. -# This file is licensed under the GPLv2+. Please see COPYING for more information. - -_pass_complete_entries () { - prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store/}" - suffix=".gpg" - autoexpand=${1:-0} - - local IFS=$'\n' - local items=($(compgen -f $prefix$cur)) - for item in ${items[@]}; do - if [[ $item == $prefix.* ]]; then - continue - fi - - # if there is a unique match, and it is a directory with one entry - # autocomplete the subentry as well (recursively) - if [[ ${#items[@]} -eq 1 && $autoexpand -eq 1 ]]; then - while [[ -d $item ]]; do - local subitems=($(compgen -f "$item/")) - if [[ ${#subitems[@]} -eq 1 ]]; then - item="${subitems[0]}" - else - break - fi - done - fi - - # append / to directories - [[ -d $item ]] && item="$item/" - - item="${item%$suffix}" - COMPREPLY+=("${item#$prefix}") - done -} - -_pass_complete_keys () { - local IFS=$'\n' - # Extract names and email addresses from gpg --list-keys - local keys="$(gpg2 --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d')" - COMPREPLY+=($(compgen -W "${keys}" -- ${cur})) -} - -_pass() -{ - COMPREPLY=() - local cur="${COMP_WORDS[COMP_CWORD]}" - local commands="init ls show insert generate edit rm git help version" - if [[ $COMP_CWORD -gt 1 ]]; then - case "${COMP_WORDS[1]}" in - init) - COMPREPLY+=($(compgen -W "-e --reencrypt" -- ${cur})) - _pass_complete_keys - ;; - ls|list|edit) - _pass_complete_entries - ;; - show|-*) - COMPREPLY+=($(compgen -W "-c --clip" -- ${cur})) - _pass_complete_entries 1 - ;; - insert) - COMPREPLY+=($(compgen -W "-e --echo -m --multiline -f --force" -- ${cur})) - _pass_complete_entries - ;; - generate) - COMPREPLY+=($(compgen -W "-n --no-symbols -c --clip -f --force" -- ${cur})) - _pass_complete_entries - ;; - rm|remove|delete) - COMPREPLY+=($(compgen -W "-r --recursive -f --force" -- ${cur})) - _pass_complete_entries - ;; - git) - COMPREPLY+=($(compgen -W "init push pull config log reflog" -- ${cur})) - ;; - esac - else - COMPREPLY+=($(compgen -W "${commands}" -- ${cur})) - _pass_complete_entries 1 - fi -} - -complete -o filenames -o nospace -F _pass pass diff --git a/contrib/pass.fish-completion b/contrib/pass.fish-completion deleted file mode 100644 index 9130d1f..0000000 --- a/contrib/pass.fish-completion +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env fish - -# Copyright (C) 2012 Dmitry Medvinsky <dmedvinsky@gmail.com>. All Rights Reserved. -# This file is licensed under the GPLv2+. Please see COPYING for more information. - -set PROG 'pass' - -function __fish_pass_get_prefix - set -l prefix "$PASSWORD_STORE_DIR" - if [ -z "$prefix" ] - set prefix "$HOME/.password-store" - end - echo "$prefix" -end - -function __fish_pass_needs_command - set -l cmd (commandline -opc) - if [ (count $cmd) -eq 1 -a $cmd[1] = $PROG ] - return 0 - end - return 1 -end -function __fish_pass_uses_command - set cmd (commandline -opc) - if [ (count $cmd) -gt 1 ] - if [ $argv[1] = $cmd[2] ] - return 0 - end - end - return 1 -end - -function __fish_pass_print_gpg_keys - gpg2 --list-keys | grep uid | sed 's/.*<\(.*\)>/\1/' -end -function __fish_pass_print_entry_dirs - set -l prefix (__fish_pass_get_prefix) - set -l dirs - eval "set dirs "$prefix"/**/" - for dir in $dirs - set entry (echo "$dir" | sed "s#$prefix/\(.*\)#\1#") - echo "$entry" - end -end -function __fish_pass_print_entries - set -l prefix (__fish_pass_get_prefix) - set -l files - eval "set files "$prefix"/**.gpg" - for file in $files - set file (echo "$file" | sed "s#$prefix/\(.*\)\.gpg#\1#") - echo "$file" - end -end -function __fish_pass_print_entries_and_dirs - __fish_pass_print_entry_dirs - __fish_pass_print_entries -end - - -complete -c $PROG -e -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a help -d 'Command: show usage help' -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a version -d 'Command: show program version' - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a init -d 'Command: initialize new password storage' -complete -c $PROG -f -A -n '__fish_pass_uses_command init' -s e -l reencrypt -d 'Reencrypt existing passwords using new gpg-id' -complete -c $PROG -f -A -n '__fish_contains_opt -s e reencrypt' -a '(__fish_pass_print_gpg_keys)' - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a ls -d 'Command: list passwords' -complete -c $PROG -f -A -n '__fish_pass_uses_command ls' -a "(__fish_pass_print_entry_dirs)" - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a insert -d 'Command: insert new password' -complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s e -l echo -d 'Echo the password on console' -complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s m -l multiline -d 'Provide multiline password entry' -complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s f -l force -d 'Do not prompt before overwritting' -complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -a "(__fish_pass_print_entry_dirs)" - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a generate -d 'Command: generate new password' -complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s n -l no-symbols -d 'Do not use special symbols' -complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s c -l clip -d 'Put the password in clipboard' -complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s f -l force -d 'Do not prompt before overwritting' -complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -a "(__fish_pass_print_entry_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' -complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -a "(__fish_pass_print_entries_and_dirs)" - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a edit -d 'Command: edit password using text editor' -complete -c $PROG -f -A -n '__fish_pass_uses_command edit' -a "(__fish_pass_print_entries)" - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a show -d 'Command: show existing password' -complete -c $PROG -f -A -n '__fish_pass_uses_command show' -s c -l clip -d 'Put password in clipboard' -complete -c $PROG -f -A -n '__fish_pass_uses_command show' -a "(__fish_pass_print_entries)" -# When no command is given, `show` is defaulted. -complete -c $PROG -f -A -n '__fish_pass_needs_command' -s c -l clip -d 'Put password in clipboard' -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a "(__fish_pass_print_entries)" -complete -c $PROG -f -A -n '__fish_pass_uses_command -c' -a "(__fish_pass_print_entries)" -complete -c $PROG -f -A -n '__fish_pass_uses_command --clip' -a "(__fish_pass_print_entries)" - -complete -c $PROG -f -A -n '__fish_pass_needs_command' -a git -d 'Command: execute a git command' -complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'init' -d 'Initialize git repository' -complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'push' -d 'Push changes to remote repo' -complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'pull' -d 'Pull changes from remote repo' -complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'log' -d 'View changelog' diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion deleted file mode 100644 index 0bb14de..0000000 --- a/contrib/pass.zsh-completion +++ /dev/null @@ -1,116 +0,0 @@ -#compdef pass - -# 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 () { - local cmd - if (( CURRENT > 2)); then - cmd=${words[2]} - # Set the context for the subcommand. - curcontext="${curcontext%:*:*}:pass-$cmd" - # Narrow the range of words we are looking at to exclude `pass' - (( CURRENT-- )) - shift words - # Run the completion for the subcommand - case "${cmd}" in - init) - _arguments : \ - "-r[re-encrypt existing passwords]" \ - "--reencrypt[re-encrypt existing passwords]" - _pass_complete_keys - ;; - ls|list|edit) - _pass_complete_entries_with_subdirs - ;; - insert) - _arguments : \ - "-e[echo password to console]" \ - "--echo[echo password to console]" \ - "-m[multiline]" \ - "--multiline[multiline]" - _pass_complete_entries_with_subdirs - ;; - generate) - _arguments : \ - "-n[don't include symbols in password]" \ - "--no-symbols[don't include symbols in password]" \ - "-c[copy password to the clipboard]" \ - "--clip[copy password to the clipboard]" - _pass_complete_entries_with_subdirs - ;; - rm) - _arguments : \ - "-f[force deletion]" \ - "--force[force deletion]" \ - "-r[recursively delete]" \ - "--recursive[recursively delete]" - _pass_complete_entries_with_subdirs - ;; - git) - 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 - 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]" - _pass_cmd_show - fi -} - -_pass_cmd_show () { - _arguments : \ - "-c[put it on the clipboard]" \ - "--clip[put it on the clipboard]" - _pass_complete_entries -} -_pass_complete_entries_helper () { - local IFS=$'\n' - 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) -} - -_pass_complete_entries_with_subdirs () { - _pass_complete_entries_helper -} - -_pass_complete_entries () { - _pass_complete_entries_helper -type f -} - -_pass_complete_keys () { - local IFS=$'\n' - # Extract names and email addresses from gpg --list-keys - _values 'gpg keys' $(gpg2 --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d') -} |