From: Eric Wong Date: Mon, 10 Jun 2019 23:53:46 +0000 (+0000) Subject: edit: fix portability of editor invocation X-Git-Tag: v1.2.0~176 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=128dea6f0b74c8e2b97849d56e30ff993a6037e3 edit: fix portability of editor invocation The eval was unnecessary, and $0 can't be "--". Tested with /bin/sh on FreeBSD 11.2 --- diff --git a/script/public-inbox-edit b/script/public-inbox-edit index 2e2c7616..6884fd0c 100755 --- a/script/public-inbox-edit +++ b/script/public-inbox-edit @@ -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"; }