]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
add-source: don't use flags for options 14/head
authorJason Ish <ish@unx.ca>
Mon, 4 Dec 2017 22:15:01 +0000 (16:15 -0600)
committerJason Ish <ish@unx.ca>
Mon, 4 Dec 2017 22:15:01 +0000 (16:15 -0600)
Instead making name and url positional args.

We can add a flag to change the meaning of the URL
later.

doc/add-source.rst
suricata/update/commands/addsource.py

index 77677da1452ccea32fa766ec9e825d707bb0def7..0974731c77e6aab5d87168d6bec0bbf6c2a366d9 100644 (file)
@@ -7,7 +7,7 @@ Synopsis
 
 ::
 
-   suricata-update add-source [--name name] [--url <url>]
+   suricata-update add-source <name> <url>
 
 Description
 ===========
@@ -18,14 +18,4 @@ URL. It is useful to add a source that is not provided in the index.
 Options
 =======
 
-.. option:: --name <name>
-
-   The name of the source. If not provided on the command line the
-   user will be prompted.
-
-.. option:: --url <url>
-
-   The URL of the source. If not provided on the command line the user
-   will be prompted.
-
 .. include:: ./common-options.rst
index cdff4d1615801314e372cf962ccc2a9a6bed9395..e53db371b097c81d46eda3eb00181a17371816e3 100644 (file)
@@ -23,8 +23,8 @@ from suricata.update import sources
 logger = logging.getLogger()
 
 def register(parser):
-    parser.add_argument("--name", metavar="<name>", help="Name of source")
-    parser.add_argument("--url", metavar="<url>", help="Source URL")
+    parser.add_argument("name", metavar="<name>", help="Name of source")
+    parser.add_argument("url", metavar="<url>", help="Source URL")
     parser.set_defaults(func=add_source)
 
 def add_source(config):