[comp.mail.mush] mush folders

szoltek@gmuvax2.gmu.edu (S.M. Zoltek) (03/17/90)

     Due to line noise and my own typos, the last message has some
mistakes. 

     What I wanted to ask was is there a way to have mush always place
my folders in my folder directory without starting mush from my Mail
directory or changing to that directory before saving a file?  (If
there is is there a reason for not doing this?)
-- 
          =========================================================
         | S.M. Zoltek       Internet      szoltek@gmuvax2.gmu.edu |
         |                   BITNET        SZOLTEK@GMUVAX          |
          =========================================================

schaefer@ogicse.ogi.edu (Barton E. Schaefer) (03/18/90)

In article <1007@gmuvax2.gmu.edu> szoltek@gmuvax2.gmu.edu (S.M. Zoltek) writes:
} 
} I have put in my .mushrc file the line 
} 
}      set folder = "~/Mail"

In article <1008@gmuvax2.gmu.edu> szoltek@gmuvax2.gmu.edu (S.M. Zoltek) writes:
} 
}      What I wanted to ask was is there a way to have mush always place
} my folders in my folder directory without starting mush from my Mail
} directory or changing to that directory before saving a file?  (If
} there is is there a reason for not doing this?)

There is no way to force mush to always put folders in a particular
directory.  The purpose of the "+" file metachar is to make it very
easy to put files in your folder directory; that is, you use

	save +file

instead of "save file", and the file will be created in your folder
directory.

There are two ways you can affect this behavior, both of which involve
changing your .mushrc.  The first is to simply cause mush to always
change directories to your folder directory on startup, by adding

	cd $folder

(after you've set folder, of course).  The second way is to change the
behavior of the "save" command by using a cmd abbreviation

	cmd save 'save +\!:$'

This particular cmd doesn't work for saving a list of messages, because
it drops the list and uses only the file name.  To save a list of messages,
you would need

	cmd save 'save \!:1- +\!:$'

but this does the wrong thing when you don't give a list.  So there isn't
any perfect way to do this, unless you are willing to rewrite the syntax
of "save" a little:

	set nonobang
	cmd save 'save \!:2-$ +\!:1'

Here, you'd use

	save filename [options] [message-list]

instead of the usual syntax "save [options] [message-list] [filename]".
The cmd will insert the "+" and rearrange the arguments to match the
"real" syntax of the save command.  The "set nonobang" stops it from
complaining when you give only one argument.
-- 
Bart Schaefer          "EARTH: Surrender IMMEDIATELY or we PICKLE DAN QUAYLE"

                                                                    "THPPFT!"
schaefer@cse.ogi.edu (used to be cse.ogc.edu)