Repository: sanders41/meilisearch-cli (language: python)

Issue:
Add a progress spinner to the docs command
A status spinner should be added to the generation of the documentation tree with the message `Getting documentation links...`

https://github.com/sanders41/meilisearch-cli/blob/f9f0d78c0eb62e6208342de83da877d323846962/meilisearch_cli/main.py#L38


Discussion / hints:

Fix patch:
diff --git a/meilisearch_cli/main.py b/meilisearch_cli/main.py
index 85bf0dc..0cb9fe3 100644
--- a/meilisearch_cli/main.py
+++ b/meilisearch_cli/main.py
@@ -38,8 +38,8 @@
 @app.command()
 def docs() -> None:
     """A tree of all documentation links. If supported by your terminal the links are clickable."""
-
-    console.print(build_docs_tree())
+    with console.status("Getting documentation links..."):
+        console.print(build_docs_tree())
 
 
 @app.command()


Test patch:
diff --git a/tests/test_main.py b/tests/test_main.py
index a022ccd..5c8454f 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -40,7 +40,7 @@ def test_docs(mock_get, test_runner):
     mock_response._content = mock_response_content
     mock_get.return_value = mock_response
 
-    expected = "Meilisearch Documentation                                                       \n├── Create                                                                      \n│   └── How To                                                                  \n│       ├── Aws                                                                 \n│       └── Digitalocean Droplet                                                \n└── Learn                                                                       \n    ├── Advanced                                                                \n    └── Contributing                                                            \n"
+    expected = "Meilisearch Documentation                                                       \n├── Create                                                                      \n│   └── How To                                                                  \n│       ├── Aws                                                                 \n│       └── Digitalocean Droplet                                                \n└── Learn                                                                       \n    ├── Advanced                                                                \n    └── Contributing                                                            \n\n"
     runner_result = test_runner.invoke(app, ["docs"])
     out = runner_result.stdout