From 88855861f7ede0c818a5a77a24a0fa947e9fe34f Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com> Date: Wed, 30 Mar 2022 10:15:27 +0200 Subject: [PATCH] docs/cli: Align and fix cli documentation This changes the deprecated :show-nested: instruction to the :nested: one [1]. This also fixes warning about misindented block [2]. [1] https://sphinx-click.readthedocs.io/en/latest/usage/#directive-click [2] ``` 06:22:34 swh fs mount:1:Unexpected indentation. 06:22:34 make: *** [../../swh-docs/Makefile.sphinx:32: sphinx/html] Error 2 ``` --- docs/cli.rst | 2 +- swh/fuse/cli.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index a9420b4..925f616 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -5,4 +5,4 @@ Command-line interface .. click:: swh.fuse.cli:fuse :prog: swh fs - :show-nested: + :nested: full diff --git a/swh/fuse/cli.py b/swh/fuse/cli.py index 45487cf..62474aa 100644 --- a/swh/fuse/cli.py +++ b/swh/fuse/cli.py @@ -106,8 +106,10 @@ def fuse(ctx, config_file): "-f/-d", "--foreground/--daemon", default=False, - help="whether to run FUSE attached to the console (foreground) " - "or daemonized in the background (default: daemon)", + help=( + "whether to run FUSE attached to the console (foreground) " + "or daemonized in the background (default: daemon)" + ), ) @click.pass_context def mount(ctx, swhids, path, foreground): @@ -117,10 +119,10 @@ def mount(ctx, swhids, path, foreground): populate the virtual file system (VFS). Otherwise the VFS will be populated on-demand, when accessing its content. - \b Example: - \b + .. code-block:: bash + $ mkdir swhfs $ swh fs mount swhfs/ $ grep printf swhfs/archive/swh:1:cnt:c839dea9e8e6f0528b468214348fee8669b305b2 -- GitLab