adds bash completion support to this pass extension

This commit is contained in:
8go 2019-04-10 10:21:52 +00:00 committed by GitHub
parent c21b7aa85d
commit bf207e049d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
PASSWORD_STORE_EXTENSION_COMMANDS+=(backup)
__password_store_extension_complete_backup() {
if [[ $COMP_CWORD -gt 2 ]]; then
case "${COMP_WORDS[2]}" in
help|--help|-h)
_pass_complete_entries
;;
version|--version|-v)
_pass_complete_entries
;;
esac
else
COMPREPLY+=($(compgen -W "help version -h --help -v --version" -- ${cur}))
_pass_complete_entries 1
fi
}