From 6ae421b1c2551d6e6477abd76b463b11318500b2 Mon Sep 17 00:00:00 2001 From: Glennie Date: Sun, 29 Aug 2021 14:46:11 +0200 Subject: [PATCH] docs: improve helper example section Added an example for using envrionement variable for tokens. --- docs/cli-usage.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/cli-usage.rst b/docs/cli-usage.rst index 1a80bbc79..515b250a9 100644 --- a/docs/cli-usage.rst +++ b/docs/cli-usage.rst @@ -170,6 +170,25 @@ In `/path/to/helper.sh`: #!/bin/bash pass show path/to/password | head -n 1 + +Example for an `environnement variable`: + +.. code-block:: ini + + [global] + default = somewhere + ssl_verify = true + timeout = 5 + + [somewhere] + url = http://somewhe.re + private_token = helper: printf -- '%%s' ${GITLAB_TOKEN} + timeout = 1 + +**Notice:** + + * ``printf`` is the executable provided by coreutils package (on a debian based distribution). + * ``%`` must be escaped using an other `%` (in order to allow `configparser` load configuration properly. CLI ===