]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-edit
config: support "inboxdir" in addition to "mainrepo"
[public-inbox.git] / script / public-inbox-edit
index 2e2c761620e154da65a395f6d9c6a12a756cb14f..f2090abfe583992ab6c398213438c3a76a3775d3 100755 (executable)
@@ -65,7 +65,7 @@ sub find_mid ($) {
 
 sub show_cmd ($$) {
        my ($ibx, $smsg) = @_;
-       " GIT_DIR=$ibx->{mainrepo}/all.git \\\n    git show $smsg->{blob}\n";
+       " GIT_DIR=$ibx->{inboxdir}/all.git \\\n    git show $smsg->{blob}\n";
 }
 
 sub show_found () {
@@ -138,7 +138,7 @@ foreach my $to_edit (values %$found) {
 
        # run the editor, respecting spaces/quote
 retry_edit:
-       if (system(qw(sh -c), qq(eval "$editor" '"\$@"'), '--', $edit_fn)) {
+       if (system(qw(sh -c), $editor.' "$@"', $editor, $edit_fn)) {
                if (!(-t STDIN) && !$opt->{force}) {
                        die "E: $editor failed: $?\n";
                }