Mike A. Oligny <[EMAIL PROTECTED]> said something to this effect on 11/26/2001:
> Is there any way to have Mutt warn me if I am opening a second
> session?  I find sometimes flags don't get updated because I've
> had two or three copies of the client running unintentionally...
> (I know--don't do it then, stupid!) 

Write a shell function wrapper around mutt.  In your (e.g.) .bashrc:

  mutt() {
    if test -e $HOME/.mutt-`hostname`; then
      echo "mutt already running!"
    else
      touch $HOME/.mutt-`hostname`
      mutt $*
      rm $HOME/.mutt-`hostname`
    fi
  }

Invoke as normal:

  bash$ mutt -f =listname
  bash$ mutt -y

etc.

That will do it.  You can add signal trapping in there to clean
up /tmp/mutt-$USER in the case of an abnormal end to the shell
script.

(darren)

-- 
He who has never configured `sendmail.cf' has no courage. He who has
configured it more than once has no brain.

Reply via email to