The eval was unnecessary, and $0 can't be "--".
Tested with /bin/sh on FreeBSD 11.2
# run the editor, respecting spaces/quote
retry_edit:
# 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";
}
if (!(-t STDIN) && !$opt->{force}) {
die "E: $editor failed: $?\n";
}