summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs/lists.rst
diff options
context:
space:
mode:
authorBarry Warsaw2017-07-22 03:02:06 +0000
committerBarry Warsaw2017-07-22 03:02:06 +0000
commit02826321d0430d7ffc1f674eeff4221941689ef7 (patch)
tree1a8e56dff0eab71e58e5fc9ecc5f3c614d7edca7 /src/mailman/commands/docs/lists.rst
parentf54c045519300f6f70947d1114f46c2b8ae0d368 (diff)
parentf00b94f18e1d82d1488cbcee6053f03423bc2f49 (diff)
downloadmailman-02826321d0430d7ffc1f674eeff4221941689ef7.tar.gz
mailman-02826321d0430d7ffc1f674eeff4221941689ef7.tar.zst
mailman-02826321d0430d7ffc1f674eeff4221941689ef7.zip
Diffstat (limited to 'src/mailman/commands/docs/lists.rst')
-rw-r--r--src/mailman/commands/docs/lists.rst50
1 files changed, 15 insertions, 35 deletions
diff --git a/src/mailman/commands/docs/lists.rst b/src/mailman/commands/docs/lists.rst
index 04e0d744d..317d06930 100644
--- a/src/mailman/commands/docs/lists.rst
+++ b/src/mailman/commands/docs/lists.rst
@@ -6,16 +6,8 @@ A system administrator can display all the mailing lists via the command
line. When there are no mailing lists, a helpful message is displayed.
::
- >>> class FakeArgs:
- ... advertised = False
- ... names = False
- ... descriptions = False
- ... quiet = False
- ... domains = None
-
- >>> from mailman.commands.cli_lists import Lists
- >>> command = Lists()
- >>> command.process(FakeArgs)
+ >>> command = cli('mailman.commands.cli_lists.lists')
+ >>> command('mailman lists')
No matching mailing lists found
When there are a few mailing lists, they are shown in alphabetical order by
@@ -36,7 +28,7 @@ their fully qualified list names, with a description.
>>> mlist_3 = create_list('list-one@example.net')
>>> mlist_3.description = 'List One in Example.Net'
- >>> command.process(FakeArgs)
+ >>> command('mailman lists')
3 matching mailing lists found:
list-one@example.com
list-one@example.net
@@ -49,8 +41,7 @@ Names
You can display the mailing list names with their posting addresses, using the
``--names/-n`` switch.
- >>> FakeArgs.names = True
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --names')
3 matching mailing lists found:
list-one@example.com [List-one]
list-one@example.net [List-one]
@@ -63,8 +54,7 @@ Descriptions
You can also display the mailing list descriptions, using the
``--descriptions/-d`` option.
- >>> FakeArgs.descriptions = True
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --descriptions --names')
3 matching mailing lists found:
list-one@example.com [List-one] - List One
list-one@example.net [List-one] - List One in Example.Net
@@ -72,8 +62,7 @@ You can also display the mailing list descriptions, using the
Maybe you want the descriptions but not the names.
- >>> FakeArgs.names = False
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --descriptions --no-names')
3 matching mailing lists found:
list-one@example.com - List One
list-one@example.net - List One in Example.Net
@@ -85,9 +74,7 @@ Less verbosity
There's also a ``--quiet/-q`` switch which reduces the verbosity a bit.
- >>> FakeArgs.quiet = True
- >>> FakeArgs.descriptions = False
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --quiet')
list-one@example.com
list-one@example.net
list-two@example.com
@@ -99,24 +86,20 @@ Specific domain
You can narrow the search down to a specific domain with the --domain option.
A helpful message is displayed if no matching domains are given.
- >>> FakeArgs.quiet = False
- >>> FakeArgs.domain = ['example.org']
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --domain example.org')
No matching mailing lists found
But if a matching domain is given, only mailing lists in that domain are
shown.
- >>> FakeArgs.domain = ['example.net']
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --domain example.net')
1 matching mailing lists found:
list-one@example.net
-More than one --domain argument can be given; then all mailing lists in
+More than one ``--domain`` argument can be given; then all mailing lists in
matching domains are shown.
- >>> FakeArgs.domain = ['example.com', 'example.net']
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --domain example.com --domain example.net')
3 matching mailing lists found:
list-one@example.com
list-one@example.net
@@ -126,16 +109,13 @@ matching domains are shown.
Advertised lists
================
-Mailing lists can be 'advertised' meaning their existence is public
-knowledge. Non-advertised lists are considered private. Display through the
-command line can select on this attribute.
+Mailing lists can be "advertised" meaning their existence is public knowledge.
+Non-advertised lists are considered private. Display through the command line
+can select on this attribute.
::
- >>> FakeArgs.domain = []
- >>> FakeArgs.advertised = True
>>> mlist_1.advertised = False
-
- >>> command.process(FakeArgs)
+ >>> command('mailman lists --advertised')
2 matching mailing lists found:
list-one@example.net
list-two@example.com