From cb67cd9858aeacedb846507cac8a128ed510a82e Mon Sep 17 00:00:00 2001
From: ulif <uli@gnufix.de>
Date: Mon, 30 Mar 2015 14:57:19 +0200
Subject: [PATCH] Add delimiter option -d.

---
 diceware/__init__.py      | 3 +++
 tests/exp_help_output.txt | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/diceware/__init__.py b/diceware/__init__.py
index 2c15586..b81cb1e 100644
--- a/diceware/__init__.py
+++ b/diceware/__init__.py
@@ -80,6 +80,9 @@ def handle_options(args):
     parser.add_argument(
         '-s', '--specials', default=0, type=int, metavar='NUM',
         help="Insert NUM special chars into generated word.")
+    parser.add_argument(
+        '-d', '--delimiter', default='',
+        help="Separate words by DELIMITER. Empty string by default.")
     parser.add_argument(
         'infile', nargs='?', metavar='INFILE', default=None,
         type=argparse.FileType('r'),
diff --git a/tests/exp_help_output.txt b/tests/exp_help_output.txt
index 8495021..0358e47 100644
--- a/tests/exp_help_output.txt
+++ b/tests/exp_help_output.txt
@@ -1,4 +1,6 @@
-usage: diceware [-h] [-n NUM] [-c | --no-caps] [-s NUM] [--version] [INFILE]
+usage: diceware [-h] [-n NUM] [-c | --no-caps] [-s NUM] [-d DELIMITER]
+                [--version]
+                [INFILE]
 
 Create a passphrase
 
@@ -12,4 +14,6 @@ optional arguments:
   --no-caps             Turn off capitalization.
   -s NUM, --specials NUM
                         Insert NUM special chars into generated word.
+  -d DELIMITER, --delimiter DELIMITER
+                        Separate words by DELIMITER. Empty string by default.
   --version             output version information and exit.
-- 
GitLab