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 () {
# 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";
}
chomp(my $op = <STDIN> || '');
$op = lc($op);
goto retry_edit if $op eq 'r';
- exit $? if $op eq 'q';
+ if ($op eq 'q') {
+ # n.b. we'll lose the exit signal, here,
+ # oh well; "q" is user-specified anyways.
+ exit($? >> 8);
+ }
last if $op eq 'c'; # continuing
print STDERR "\`$op' not recognized\n";
}