]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
nmbug: allow empty prefix
authorDavid Bremner <bremner@debian.org>
Wed, 20 Feb 2013 22:24:37 +0000 (18:24 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 2 Mar 2013 14:42:45 +0000 (10:42 -0400)
Current code does not distinguish between an empty string in the
NMBPREFIX environment variable and the variable being undefined. This
makes it impossible to define an empty prefix, if, e.g. somebody wants
to dump all of their tags with nmbug.

devel/nmbug/nmbug

index b9c70e4b205d168ce72ac3273e032c45b6e77de7..90d98b63cc30faa82e6cae364cbbf4fe97c6f7ee 100755 (executable)
@@ -13,7 +13,7 @@ my $NMBGIT = $ENV{NMBGIT} || $ENV{HOME}.'/.nmbug';
 
 $NMBGIT .= '/.git' if (-d $NMBGIT.'/.git');
 
-my $TAGPREFIX = $ENV{NMBPREFIX} || 'notmuch::';
+my $TAGPREFIX = defined($ENV{NMBPREFIX}) ? $ENV{NMBPREFIX} : 'notmuch::';
 
 # for encoding