source completion for pass only, if it exists

This commit is contained in:
Jakobus Schürz 2023-02-21 02:20:44 +01:00
parent 8af95ac676
commit 77446d1ab8

View file

@ -1,4 +1,7 @@
#!/bin/bash #/usr/share/bash-completion/completions/pass!/bin/bash
loginfo "does pass exist? $(whereis pass)"
if [ -e /usr/share/bash-completion/completions/pass ]
then
source /usr/share/bash-completion/completions/pass source /usr/share/bash-completion/completions/pass
function _passbmi(){ function _passbmi(){
@ -10,3 +13,4 @@ function _passebcont(){
PASSWORD_STORE_DIR=~/.password-store/ebcont/ _pass PASSWORD_STORE_DIR=~/.password-store/ebcont/ _pass
} }
complete -o filenames -o nospace -F _passebcont passebcont complete -o filenames -o nospace -F _passebcont passebcont
fi