A pass extension that copies a stored password using copyq with a certain timeout. After timeout, the clipboard is either restored to its previous state or cleared.
pass copyq pass-name
pass copyq email/gmail
- First you have to enable
pass
extensions by settingPASSWORD_STORE_ENABLE_EXTENSIONS=true
environment variable. - Add the
copyq.bash
file to~/.password-store/.extensions
with executable rights.
pass copyq
has (almost) identical shell auto-completion semantics with
pass show
. Hence you just need to find the relevant auto-completion
file of the shell of your preference and add copyq
option next to
show
command.
For instance, in Ubuntu GNU/Linux 16.04.4 LTS, open
/usr/share/bash-completion/completions/pass
with a text
editor and edit the below given part
show|-*)
COMPREPLY+=($(compgen -W "-c --clip" -- ${cur}))
_pass_complete_entries 1
;;
as follows:
copyq|show|-*)
COMPREPLY+=($(compgen -W "-c --clip" -- ${cur}))
_pass_complete_entries 1
;;
fish
mkdir $__fish_config_dir/completions
cp ./completions/pass.fish $__fish_config_dir/completions
Copyright © 2018 Volkan Yazıcı
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.