On Sat, Jul 2, 2016 at 8:44 PM, Will Yardley <mutt-us...@veggiechinese.net> wrote: > On Sat, Jul 02, 2016 at 08:13:55PM -0400, Xu Wang wrote: >> On Thu, Jun 30, 2016 at 9:10 PM, Will Yardley >> <mutt-us...@veggiechinese.net> wrote: >> > On Thu, Jun 30, 2016 at 08:02:38PM -0400, Xu Wang wrote: > >> >> I have read the environment variables section in 'man mutt' and there >> >> does not seem to be a MUTTRC environment variable. One can set using >> >> -F option but sometime environment variable is nice. >> > >> > What kind of uses did you have in mind? >> > >> > You can use environment variables in config files, so you can always >> > work around this for most of the use cases I can think of by having >> > >> > source ~/.muttrc-$FOO >> > in ~/.muttrc, and then define $FOO. > >> For me it is not ideal because when I execute >> source ~/.muttrc-$FOO >> then the rest of the .muttrc is still processed. I would like to >> process only ~/.muttrc-$FOO. >> I hope that has sense. > > I get what you're saying. But if I'm understanding what you're trying to > do, you should be able to have .muttrc *only* contain: > > source ~/.muttrc-$FOO > > that is, it would be a meta-muttrc. You can still source other files > from .muttrc-$FOO. > > w >
Thank you very much for the replies, Will and Cameron. Yes, these workarounds work fine for my personal setup. However, I am working on scripts that I would like to release for other users to use. I do not want to require other users to refactor their .muttrcs just to use the scripts. Creating user-friendsly scripts is what motivates me. Kind regards, Xu