<<< Date Index >>>     <<< Thread Index >>>

Re: global case insensitivity on hooks



On Wed, Nov 14, 2007 at 11:21:52AM +0100, Eric Smith wrote:
> For example, I have the following hook,
> send-hook "~t `cat ~/recipients_list` "  'set signature=...
> 
> And I want the matching of everything in the recipients_list file
> to be case insensitive without having to specify each address in
> the file with a regex.

Save this script as ~/bin/hooks.sh:

 #!/usr/bin/env python
 for s in open('recipient_list'):
     print 'send-hook ~t "' + s.lower() + '" set signature...'

In your ~/.muttrc:

 source '~/bin/hooks.sh|'

(copied to http://wiki.mutt.org/?ConfigTricks)

me