docs: add instructions to get pw from environment variable

tested with vdirsyncer 0.19.2 on archlinux
This commit is contained in:
azrdev 2023-11-24 22:12:52 +01:00 committed by Hugo
parent 82fd03be64
commit d1f93ea0be

View file

@ -78,3 +78,19 @@ You can also simply prompt for the password::
type = "caldav"
username = "myusername"
password.fetch = ["prompt", "Password for CalDAV"]
Environment variable
===============
To read the password from an environment variable::
[storage foo]
type = "caldav"
username = "myusername"
password.fetch = ["command", "printenv", "DAV_PW"]
This is especially handy if you use the same password multiple times
(say, for a CardDAV and a CalDAV storage).
On bash, you can read and export the password without printing::
read -s DAV_PW "DAV Password: " && export DAV_PW