8000 WIP re #546. Stupid pickle. · alex-python/fabric@cea36a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit cea36a1

Browse files
committed
WIP re fabric#546. Stupid pickle.
1 parent eb2bca0 commit cea36a1

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

docs/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,25 @@ def release_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
7979
], []
8080
roles.register_local_role('release', release_role)
8181

82+
from docutils import nodes
83+
from sphinx import addnodes
84+
85+
class env(nodes.literal):
86+
pass
87+
88+
# "Inline" extension to allow use of Sphinx-specific (vs docutils/ReST)
89+
# methods.
90+
def setup(app):
91+
app.add_node(env)
92+
# 'env' object type for Fabric env var referencing
93+
# (not to be confused with Sphinx' builtin :envvar:)
94+
app.add_object_type(
95+
directivename='env',
96+
rolename='env',
97+
ref_nodeclass=env,
98+
objname='Fabric env var',
99+
)
100+
82101

83102
# If extensions (or modules to document with autodoc) are in another directory,
84103
# add these directories to sys.path here. If the directory is relative to the

docs/usage/env.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Environment as configuration
1414
============================
1515

1616
Most of Fabric's behavior is controllable by modifying env variables, such as
17-
``env.hosts`` (as seen in :ref:`the tutorial <defining-connections>`). Other
17+
:env:`hosts` (as seen in :ref:`the tutorial <defining-connections>`). Other
1818
commonly-modified env vars include:
1919

2020
* ``user``: Fabric defaults to your local username when making SSH connections,
@@ -290,16 +290,13 @@ If ``True``, enables forwarding of your local SSH agent to the remote end.
290290
Set to the hostname part of ``env.host_string`` by ``fab``. For informational
291291
purposes only.
292292

293-
.. _hosts:
293+
.. env:: hosts
294294

295-
``hosts``
296-
---------
297-
298-
**Default:** ``[]``
295+
**Default:** ``[]``
299296

300-
The global host list used when composing per-task host lists.
297+
The global host list used when composing per-task host lists.
301298

302-
.. seealso:: :doc:`execution`
299+
.. seealso:: :doc:`execution`
303300

304301
.. _keepalive:
305302

0 commit comments

Comments
 (0)
0