This allows filters to automatically (or via a command line argument)
adjust to the width of the pager/index. This is even more important
with the sidebar, since the width of the pager is smaller than the
terminal width.
Thanks to Vincent Lefèvre for his helpful information and suggestions,
and to Richard Russon for the initial patches.
to display the results.
</para>
+<para>
+Mutt will set the <literal>COLUMNS</literal> environment variable to
+the width of the pager. Some programs make use of this environment
+variable automatically. Others provide a command line argument that
+can use this to set the output width:
+</para>
+
+<screen>
+text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput
+</screen>
+
<para>
Note that when using the built-in pager, <emphasis>only</emphasis>
entries with this flag will be considered a handler for a MIME type
#endif
#include "mutt.h"
+#include "mutt_curses.h"
#include <unistd.h>
#include <stdlib.h>
int fdin, int fdout, int fderr)
{
int pin[2], pout[2], perr[2], thepid;
+ char columns[11];
if (in)
{
close (fderr);
}
+ snprintf (columns, sizeof (columns), "%d", COLS - SidebarWidth);
+ setenv ("COLUMNS", columns, 1);
+
execl (EXECSHELL, "sh", "-c", cmd, NULL);
_exit (127);
}