Skip to content

Commit b9722c8

Browse files
committed
Update cli-usage.rst
Hi, I wanted to use an env var for the token. I spend some time to figure out that I needed to escape '%' because of configparser. Therefore, I made this PR to improve the current documentation hoping others will spend much less time than me. Kind regards,
1 parent a00ec87 commit b9722c8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/cli-usage.rst

+19
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,25 @@ In `/path/to/helper.sh`:
170170
171171
#!/bin/bash
172172
pass show path/to/password | head -n 1
173+
174+
Example for an `environnement variable`:
175+
176+
.. code-block:: ini
177+
178+
[global]
179+
default = somewhere
180+
ssl_verify = true
181+
timeout = 5
182+
183+
[somewhere]
184+
url = http://somewhe.re
185+
private_token = helper: printf -- '%%s' ${GITLAB_TOKEN}
186+
timeout = 1
187+
188+
**Notice:**
189+
190+
* ``printf`` is the executable provided by coreutils package (on a debian based distribution).
191+
* ``%`` must be escaped using an other `%` (in order to allow `configparser` load configuration properly.
173192

174193
CLI
175194
===

0 commit comments

Comments
 (0)