Repository: rochacbruno/dynaconf (python)

Issue:
[RFC] dynaconf list command should not show internal variables
**Is your feature request related to a problem? Please describe.**

When I run `dynaconf list` command line it shows all the variables I defined on my `settings.toml` file but it also shows dynaconf internal variables like `ENV_FOR_DYNACONF`, `RENAMED_VARS`, `ENVVAR_PREFIX` etc...

**Describe the solution you'd like**
I would like it by default to show only user defined settings when I run `dynaconf list` and the internal variables will show only if I pass `--all|-a` as in `dynaconf list -a`




Pull request description:
Fix #179 - dynaconf list command shows only user defined vars

Patch:
diff --git a/dynaconf/cli.py b/dynaconf/cli.py
index e91e71a..b62d87e 100644
--- a/dynaconf/cli.py
+++ b/dynaconf/cli.py
@@ -364,8 +364,18 @@ def init(fileformat, path, env, _vars, _secrets, wg, y, django):
     default=None,
     help="a loader identifier to filter e.g: toml|yaml",
 )
-def _list(env, key, more, loader):
-    """Lists all defined config values"""
+@click.option(
+    "--all",
+    "_all",
+    "-a",
+    default=False,
+    is_flag=True,
+    help="show dynaconf internal settings?",
+)
+def _list(env, key, more, loader, _all=False):
+    """Lists all user defined config values
+    and if `--all` is passed it also shows dynaconf internal variables.
+    """
     if env:
         env = env.strip()
     if key:
@@ -397,6 +407,11 @@ def _list(env, key, more, loader):
     # remove to avoid displaying twice
     data.pop("SETTINGS_MODULE", None)
 
+    # if not --all remove internal settings
+    if not _all:
+        for name in dir(default_settings):
+            data.pop(name, None)
+
     def color(_k):
         if _k in dir(default_settings):
             return "blue"


Test patch:
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 10f5d78..41dd10c 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -83,9 +83,18 @@ def test_init_with_path(fileformat, tmpdir):
 
 
 def test_list(testdir):
+    """Test list command shows only user defined vars"""
 
     result = run(["list"], env={"ROOT_PATH_FOR_DYNACONF": testdir})
     assert "DOTENV_STR: 'hello'" in result
+    assert "GLOBAL_ENV_FOR_DYNACONF: 'DYNACONF'" not in result
+
+
+def test_list_with_all(testdir):
+    """Test list command with --all includes interval vars"""
+    result = run(["list", "-a"], env={"ROOT_PATH_FOR_DYNACONF": testdir})
+    assert "DOTENV_STR: 'hello'" in result
+    assert "GLOBAL_ENV_FOR_DYNACONF: 'DYNACONF'" in result
 
 
 @pytest.mark.parametrize("loader", WRITERS)