gopass edit <something> fails with: $ gopass edit foo vi: illegal option -- i usage: ex [-eFRrSsv] [-c command] [-t tag] [-w size] [file ...] usage: vi [-eFlRrSv] [-c command] [-t tag] [-w size] [file ...] Error: failed to invoke editor: failed to run vi with /tmp/gopass-edit3702329236/secret file: exit status 1 This happens because nvi (default EDITOR) does not have an option -i. Suboptimal workaround: - install VIM - EDITOR=vim gopass edit foo A better way would be to patch internal/editor/editor.go so that -i is only used when EDITOR is vim. This is probably best handled upstream.
Upstream issue: https://github.com/gopasspw/gopass/issues/2412
(In reply to Emanuel Haupt from comment #0) I'm following issue, thanks for report.
(In reply to Emanuel Haupt from comment #1) I've tested https://github.com/gopasspw/gopass/commit/ce3c52182a198e35cb504835e8e7800a04a95a96 but it only works if EDITOR=nvi and it continue to fail with default EDITOR=vi. Any clues on how to explain it better to upstream? Thanks
(In reply to Nuno Teixeira from comment #3) Thank you for testing. I've just sent a follow up to the issue, I saw you did the same.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=aa64f966def246264659e2d36507ab8e6f9f1813 commit aa64f966def246264659e2d36507ab8e6f9f1813 Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2022-11-22 13:56:58 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2022-11-22 13:59:17 +0000 security/gopass: Fix handle vi variants https://github.com/gopasspw/gopass/issues/2412 PR: 267689 security/gopass/Makefile | 6 ++++++ security/gopass/distinfo | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-)
(In reply to Emanuel Haupt from comment #4) Hello Emanuel, It works ok with latest upstream fix: --- `gopass edit foo` Found exact match in "websites/foo.com/foo" Secret does not exist "foo". Found possible match in "websites/foo.com/foo". Edit existing entry? [Y/n/q]: -c option, 1: The - command is unknown Press Enter to continue: --- and changes can be made. The only warning I receive is "-c option, 1: The - command is unknown" and I don't know from where it comes, maybe gpg? Please update you ports tree and reinstall portrevision 1 and let me know your results. Thanks
It works as you've described including the missing -c option error. I'll create an upstream issue for this and follow up with the new issue.
https://github.com/gopasspw/gopass/issues/2424
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c8de01ffe80facefe938f773e8addcc9cb98e9c8 commit c8de01ffe80facefe938f773e8addcc9cb98e9c8 Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2022-12-08 08:22:22 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2022-12-08 08:24:59 +0000 security/gopass: Update to 1.15.0 Apply upstream patch to finally fix handle vi/nvi editors. PR: 267689 security/gopass/Makefile | 8 +++----- security/gopass/distinfo | 20 +++++++++----------- security/gopass/pkg-plist | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-)
Tested ok with vi/nvi with upstream latest patch.
> Tested ok with vi/nvi with upstream latest patch. Confirmed. Thanks for your patience and the quick handling. I think we can finally close this issue.
Closing as fixed. Cheers.