[neomutt-devel] A Release is Coming!
Lucian Langa
lucilanga at 7pot.org
Tue Oct 3 14:22:45 CEST 2023
Hi flatcap,
recent commands history 'spills' into pipe and shell history.
This is because of the recent history factorisations, more specifically
commit dd1a71d:
@@ -430,7 +432,7 @@ void mutt_pipe_message(struct Mailbox *m, struct EmailArray *ea)
struct Buffer *buf = buf_pool_get();
if (mw_get_field(_("Pipe to command: "), buf, MUTT_COMP_FILE_SIMPLE,
- &CompleteFileOps, NULL) != 0)
+ HC_COMMAND, &CompleteFileOps, NULL) != 0)
{
goto cleanup;
}
@@ -599,7 +601,7 @@ bool mutt_shell_escape(void)
bool rc = false;
struct Buffer *buf = buf_pool_get();
- if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_FILE_SIMPLE,
+ if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_FILE_SIMPLE, HC_COMMAND,
&CompleteFileOps, NULL) != 0)
{
goto done;
we should use HC_FILE for both pipe and shell operations, I believe this
is merely a typo than anything else.
Steps to reproduce:
fire neomutt
type anything on command line (eg. :set or :version will do)
call pipe (|) or shell (!) and do a OP_EDITOR_HISTORY_UP (<up>) to see history
from the previous command.
Changes against latest main:
diff --git a/attach/recvattach.c b/attach/recvattach.c
index f3c9a1b74..14349c4da 100644
--- a/attach/recvattach.c
+++ b/attach/recvattach.c
@@ -732,7 +732,7 @@ void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
state.flags = STATE_CHARCONV;
if (mw_get_field((filter ? _("Filter through: ") : _("Pipe to: ")), buf,
- MUTT_COMP_NO_FLAGS, HC_COMMAND, &CompleteFileOps, NULL) != 0)
+ MUTT_COMP_NO_FLAGS, HC_FILE, &CompleteFileOps, NULL) != 0)
{
goto cleanup;
}
diff --git a/external.c b/external.c
index 912478373..ba503ecff 100644
--- a/external.c
+++ b/external.c
@@ -413,7 +413,7 @@ void mutt_pipe_message(struct Mailbox *m, struct EmailArray *ea)
struct Buffer *buf = buf_pool_get();
- if (mw_get_field(_("Pipe to command: "), buf, MUTT_COMP_NO_FLAGS, HC_COMMAND,
+ if (mw_get_field(_("Pipe to command: "), buf, MUTT_COMP_NO_FLAGS, HC_FILE,
&CompleteFileOps, NULL) != 0)
{
goto cleanup;
@@ -583,7 +583,7 @@ bool mutt_shell_escape(void)
bool rc = false;
struct Buffer *buf = buf_pool_get();
- if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_NO_FLAGS, HC_COMMAND,
+ if (mw_get_field(_("Shell command: "), buf, MUTT_COMP_NO_FLAGS, HC_FILE,
&CompleteFileOps, NULL) != 0)
{
goto done;
--
Cheers,
--lucian
More information about the neomutt-devel
mailing list