Re: Difference between 'push' and 'exec', is there any?
Hi Chris!
On Wed, 08 Aug 2007, Chris G wrote:
> On Wed, Aug 08, 2007 at 06:38:33PM +0100, Chris G wrote:
> > 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:-
> >
> > 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?
> >
> 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).
Well, you are almost there. It should work this way:
push "<enter-command>set mbox_type=mbox<enter><save-message>\
<kill-line>~/saved_message<enter><enter-command>set mbox_type=maildir<enter>"
Just source the file and you'll find the selected message in your ~.
Instead of <kill-line> a simple <enter> should work, if you'd like to
accept the name proposed by mutt.
regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.