Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9722c8

Browse filesBrowse 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
Copy full SHA for b9722c8

File tree

Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Open diff view settings
Collapse file

‎docs/cli-usage.rst‎

Copy file name to clipboardExpand all lines: docs/cli-usage.rst
+19Lines changed: 19 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.