about summary refs log tree commit homepage
path: root/script/public-inbox-edit
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-15 21:35:59 +0000
committerEric Wong <e@80x24.org>2021-09-15 23:14:55 +0000
commitadd90b9504f4217af5e35b3be7e326b8c6419647 (patch)
treea324dd2f4f36d849dff752fcadd2ba82e93e7297 /script/public-inbox-edit
parent5a5d2496f139e45823dbee3361ab790b2db4d31f (diff)
downloadpublic-inbox-add90b9504f4217af5e35b3be7e326b8c6419647.tar.gz
Because make(1), git(1), tar(1) all support -C in this form, as
do our newer commands such as lei, public-inbox-{clone,fetch}.
Diffstat (limited to 'script/public-inbox-edit')
-rwxr-xr-xscript/public-inbox-edit3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/public-inbox-edit b/script/public-inbox-edit
index 9498038b..1fbaf5a7 100755
--- a/script/public-inbox-edit
+++ b/script/public-inbox-edit
@@ -33,9 +33,10 @@ See public-inbox-edit(1) man page for full documentation.
 EOF
 
 my $opt = { verbose => 1, all => 0, -min_inbox_version => 2, raw => 0 };
-my @opt = qw(mid|m=s file|F=s raw);
+my @opt = qw(mid|m=s file|F=s raw C=s@);
 GetOptions($opt, @PublicInbox::AdminEdit::OPT, @opt) or die $help;
 if ($opt->{help}) { print $help; exit 0 };
+PublicInbox::Admin::do_chdir(delete $opt->{C});
 
 my $cfg = PublicInbox::Config->new;
 my $editor = $ENV{MAIL_EDITOR}; # e.g. "mutt -f"