Skip to content

Commit d1f93ea

Browse files
azrdevWhyNotHugo
authored andcommitted
docs: add instructions to get pw from environment variable
tested with vdirsyncer 0.19.2 on archlinux
1 parent 82fd03b commit d1f93ea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/keyring.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,19 @@ You can also simply prompt for the password::
7878
type = "caldav"
7979
username = "myusername"
8080
password.fetch = ["prompt", "Password for CalDAV"]
81+
82+
Environment variable
83+
===============
84+
85+
To read the password from an environment variable::
86+
87+
[storage foo]
88+
type = "caldav"
89+
username = "myusername"
90+
password.fetch = ["command", "printenv", "DAV_PW"]
91+
92+
This is especially handy if you use the same password multiple times
93+
(say, for a CardDAV and a CalDAV storage).
94+
On bash, you can read and export the password without printing::
95+
96+
read -s DAV_PW "DAV Password: " && export DAV_PW

0 commit comments

Comments
 (0)