<replaceable>mime-type</replaceable>
</arg>
<command>attachments</command>
- <arg choice="plain">?</arg>
+ <arg choice="plain">
+ <option>?</option>
+ </arg>
+ <command>unattachments</command>
+ <arg choice="plain">
+ <option>*</option>
+ </arg>
</cmdsynopsis>
<para>
<emphasis>disposition</emphasis> is the attachment's
a command will list your current settings in neomuttrc format, so that
it can be pasted elsewhere.
</para>
+
+ <para>
+ Entering the command <quote><command>unattachments</command> *</quote>
+ as a command will Clear all attachment settings.
+ </para>
</sect1>
<sect1 id="mime-lookup">
<arg choice="plain">
<replaceable>mime-type</replaceable>
</arg>
+ <command>
+ <link linkend="attachments">attachments</link>
+ </command>
+ <arg choice="plain">
+ <option>?</option>
+ </arg>
+ <command>
+ <link linkend="attachments">unattachments</link>
+ </command>
+ <arg choice="plain">
+ <option>*</option>
+ </arg>
</cmdsynopsis>
</listitem>
<listitem>
return MUTT_CMD_SUCCESS;
}
+/**
+ * mutt_free_attachmatch - Free an AttachMatch - Implements ::list_free_t
+ *
+ * @note We don't free minor because it is either a pointer into major,
+ * or a static string.
+ */
+void mutt_free_attachmatch(struct AttachMatch **am)
+{
+ if (!am || !*am)
+ return;
+
+ regfree(&(*am)->minor_regex);
+ FREE(&(*am)->major);
+ FREE(am);
+}
+
/**
* parse_unattachments - Parse the 'unattachments' command - Implements ::command_t
*/
p = buf->data;
op = *p++;
+
+ if (op == '*')
+ {
+ mutt_list_free_type(&AttachAllow, (list_free_t) mutt_free_attachmatch);
+ mutt_list_free_type(&AttachExclude, (list_free_t) mutt_free_attachmatch);
+ mutt_list_free_type(&InlineAllow, (list_free_t) mutt_free_attachmatch);
+ mutt_list_free_type(&InlineExclude, (list_free_t) mutt_free_attachmatch);
+ attachments_clean();
+ return 0;
+ }
+
if ((op != '+') && (op != '-'))
{
op = '+';
return 0;
}
-/**
- * mutt_free_attachmatch - Free an AttachMatch - Implements ::list_free_t
- *
- * @note We don't free minor because it is either a pointer into major,
- * or a static string.
- */
-void mutt_free_attachmatch(struct AttachMatch **am)
-{
- if (!am || !*am)
- return;
-
- regfree(&(*am)->minor_regex);
- FREE(&(*am)->major);
- FREE(am);
-}
-
/**
* mutt_free_opts - clean up before quitting
*/