Changeset 5234:c15eeb44f139

Show
Ignore:
Timestamp:
2007-10-11 03:10:49 (15 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Document format string pipes.
This is roughly the commit message only. Add a line to UPDATING (mark
it as a change rather than a new feature as it may break setups).

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5232 r5234  
     12007-10-11 11:18 +0200  Rocco Rutte  <pdmef@gmx.net>  (efcd349fc9e0) 
     2 
     3        * init.h: Document that $indent_string actually is a format string. 
     4 
     52007-10-11 11:03 +0200  Rocco Rutte  <pdmef@gmx.net>  (40f2c0f4c597) 
     6 
     7        * ChangeLog, muttlib.c: Do not consider empty pipes for filtering in 
     8        format strings. This fixes a crash with $indent_string="|" and 
     9        $text_flowed unset. 
     10 
    1112007-09-28 11:06 +0200  Rocco Rutte  <pdmef@gmx.net>  (709db707bcdf) 
    212 
  • UPDATING

    r5149 r5234  
    1818  + $smtp_url (ESMTP relay support) 
    1919  + $crypt_use_pka (use GPGME PKA signature verification) 
     20  ! format pipe support: format strings ending in | are filtered 
    2021 
    21221.5.13 (2006-08-14): 
  • doc/manual.xml.head

    r5207 r5234  
    32783278<title>Format Strings</title> 
    32793279 
     3280<sect2> 
     3281<title>Basic usage</title> 
     3282 
    32803283<para> 
    32813284Format strings are a general concept you'll find in several locations 
     
    33383341replace all decimal points with underlines. 
    33393342</para> 
     3343 
     3344</sect2> 
     3345 
     3346<sect2> 
     3347<title>Filters</title> 
     3348 
     3349<para> 
     3350Any format string ending in a vertical bar (``&verbar;'') will be 
     3351expanded and piped through the first word in the string, using spaces 
     3352as separator. The string returned will be used for display. 
     3353If the returned string ends in &percnt;, it will be passed through 
     3354the formatter a second time. This allows the filter to generate a 
     3355replacement format string including &percnt; expandos. 
     3356</para> 
     3357 
     3358<para> 
     3359All &percnt; expandos in a format string are expanded before the script 
     3360is called so that: 
     3361</para> 
     3362 
     3363<screen> 
     3364set status_format="script.sh '%r %f (%L)'|" 
     3365</screen> 
     3366 
     3367<para> 
     3368will make mutt expand <literal>&percnt;r</literal>, 
     3369<literal>&percnt;f</literal> and <literal>&percnt;L</literal> 
     3370before calling the script. The example also shows that arguments can be 
     3371quoted: the script will receive the expanded string between the single quotes 
     3372as the only argument. 
     3373</para> 
     3374 
     3375<para> 
     3376A practical example is the <literal>mutt&lowbar;xtitle</literal> 
     3377script installed in the <literal>samples</literal> 
     3378subdirectory of the mutt documentation: it can be used as filter for 
     3379<literal>&dollar;status&lowbar;format</literal> to set the current 
     3380terminal's title, if supported. 
     3381</para> 
     3382 
     3383</sect2> 
    33403384 
    33413385</sect1>