Eric --

...and then Eric Smith said...
% 
% How would I set the default Fcc to the domain name of the
% recipient, omitting the tld part (.com or whatever).
% This would also be useful as a default save-hook.

You'd have to use DGC's fmtpipe patch and write a little script to handle
it.  I have

  fcc-save-hook . "$HOME/.mutt/fcc-save-pipe.sh %_%O |"

in my .mutt/muttrc file and the script, a very basic example, is
attached to get you started.


% 
% -- 
% Eric Smith


:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

#!/bin/sh
#set -x ###

# quick hack to catch addresses and see where to put the file

# leave all of the fcc-save-hook logic in muttrc and then pass this
# %O thanks to the fmtpipe patch and we'll strip from there

# someday we might get clever enough to move all of the logic in HERE
# and then handle the problem of
#   fcc-save-hook bob =Work/%O
#   fcc-save-hook sue =Play/%O
#   To: bob, sue ==> =Play/bob (ouch!)
# but let's take one thing at a time...

# how to suppress newline?
if [ "`echo -n foo`" = "-n foo" ] ; then ECHOC="\c" ; else ECHON="-n" ; fi

case $1 in
  *-dated-* )                                   # tmda dated addresses
    echo $ECHON "=$1$ECHOC" | sed "s/-dated.*//" 
    ;;
  choice-consulting )                           # my fcc-save-hooks should do this...
    echo $ECHON "=F.choice$ECHOC"
    ;;
  * )                                           # everything else
    echo $ECHON "=$*$ECHOC" | tr ' ' '_'        # debugging, but just in case
    ;;
esac

Attachment: msg29674/pgp00000.pgp
Description: PGP signature

Reply via email to