From af4c93f8c802e68bbbb05a16735ef9afdd6ad712 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 23 Jul 2010 15:44:25 -0400 Subject: [PATCH] bucardo_ctl: allow plurals in "add object" --- bucardo_ctl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bucardo_ctl b/bucardo_ctl index 937aedcfc..6ba3ab13b 100755 --- a/bucardo_ctl +++ b/bucardo_ctl @@ -414,6 +414,9 @@ sub superhelp { ## Because usage() sometimes relies on the verb $verb = $word1; + ## Allow plurals + $word2 =~ s/s$//; + if ('add' eq $word1) { if ('customcode' eq $word2 or 'custom_code' eq $word2 or 'code' eq $word2) { warn usage('add_customcode') . "\n"; @@ -2943,6 +2946,9 @@ sub add_item { my $type = shift @nouns; $type = lc $type; + ## Allow plurals + $type =~ s/s$//; + if ($type eq 'code' or $type eq 'customcode' or $type eq 'custom_code') { add_customcode(); } -- 2.39.5