aboutsummaryrefslogtreecommitdiff
path: root/ag
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-02-19 20:04:35 +0100
committerAlex Legler <alex@a3li.li>2015-02-19 20:04:35 +0100
commitacc7cfb135bd45337bf48435b9bd1c057394523a (patch)
tree8b5df348dc0fcdc5c14a5828169ec9f54d5480a1 /ag
parentInitial version (diff)
downloadbackend-acc7cfb135bd45337bf48435b9bd1c057394523a.tar.gz
backend-acc7cfb135bd45337bf48435b9bd1c057394523a.tar.bz2
backend-acc7cfb135bd45337bf48435b9bd1c057394523a.zip
Do some basic mailing list name validation
Diffstat (limited to 'ag')
-rwxr-xr-xag6
1 files changed, 5 insertions, 1 deletions
diff --git a/ag b/ag
index 3e7bf55..c8371db 100755
--- a/ag
+++ b/ag
@@ -53,7 +53,11 @@ op = OptionParser.new do |opts|
end
opts.on('--list NAME', 'Name of the mailing list to work with') do |name|
- $options.name = name
+ if name =~ /^[a-zA-Z-]+$/
+ $options.name = name
+ else
+ abort 'List name can only consist of letters and hyphens.'
+ end
end
opts.on('--file', 'The argument is a file') do