[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: too many mutts

On 2008-02-04 22:52:02 +0000, Steve Kemp wrote:
>   Close but not as good as you could do - your script essentially
>   says "If mutt is running exit".  A better approach would be to
>   use GNU Screen to allow the user to re-attach to a running mutt:
>    alias mutt='screen -D -R -S mutt mutt'
>    This means create a secreen session with name mutt (-S) running
>   wth command mutt - if one is already running with that name detach
>   it first.

This is more or less what I do, but this is a bit more complex
since it has to handle the current display (as I also use Mutt
via SSH). See <http://www.vinc17.org/mutt/#smutt>.

>   The only drawback is this will get fiddly if you're running
>  nested screen sessions...

I think that my smutt script handles that in some way:

if [ "$TERM" = screen-bce ]; then
  exec screen -t mutt "$0" -- ${@+"$@"}

Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

Reply to: