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

Re: Difference between 'push' and 'exec', is there any?



=- Chris G wrote on Wed  8.Aug'07 at 18:48:20 +0100 -=

> On Wed, Aug 08, 2007 at 06:38:33PM +0100, Chris G wrote:
> > Is there any actual difference between the 'push' and 'exec'
> > commands?

Yes, see wiki -> guide -> /Syntax
(or RTFM ;)

> > Would a sourced file containing a series of 'push' commands
> > execute them in the order expected (i.e. sort of backwards). For
> > example if I source the following:-

AFAIK mutt doesn't work like a stack (FILO), but serves as it comes
(FOFI).

> >     push ":set mbox_type=mbox"
> >     push save-message
> >     push ":set mbox_type=maildir"
> > 
> > Will it switch to maildir, save a message and then switch back
> > to mbox?

You could have tested that _before_ posting. ;)

> No it won't, pity! It takes the ":set mbox_type=mbox" as the name
> of the file to save to. (Of course the above needs ^M in the set
> commands but still).

You're missing the small but relevant difference. ;)
Plus, "push" + "macro" don't stop for user input, they keep reading
or waiting for stuff "push/ macro"ed where it left off last time.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.