On 05/10/04 18.37, Kyle Wheeler wrote:
> On Tue, Oct 05, 2004 at 11:31:10AM +0200, Michelle Konzack quoth:
> > It is goog and useful, that the $USER can select where he/she like to
> > have it. But if I use for example a Directory like
> >
> > set header_cache=/tmp/mutt-michelle/
> >
> > I must create every time the Directory by my self...
> > I think, it is not a great deal, to do it within mutt automaticly.
>
> Ahh, but you must be unaware of one of mutt's coolest features. Within a
> muttrc, any string can be replaced with SHELL COMMANDS that output the
> string you want. I'll give you an example in just a moment.
>
> > On the otherside if I have a global muttrc, because I have an Internet
> > Cafee where the $HOME is on NFS too, it can not be used anymore,
> > because it try to put all cachefiles in the same directory.
> >
> > Or what is, if I have two or more $USER, which try to use the same name,
> > for example
> >
> > set header_cache=/tmp/hcache
>
> So, include the user name. Using the shell in your muttrc, you could do
> it something like this:
>
> set header_cache=/tmp/hcache-`whoami`
>
> or
> set header_cache=/tmp/hcache-`echo $USER`
You could even do
set header_cache=/tmp/hcache-`mkdir -p /tmp/hcache-$USER; echo $USER`
That way the directory is always available (unless someone creates a
file with that name, but that would be a problem for all auto-create
directory solutions).
/dossen
--
Common sense is the collection of prejudices acquired by age eighteen.
-- Albert Einstein
Attachment:
pgpOM9d6T0PuM.pgp
Description: PGP signature