Subj : Re: changing the prompt to show only a few directories To : Stan Brown From : Charles Dye Date : Fri Feb 08 2002 04:44 am From: Charles.Dye@f3.n342.z1.cereal.mv.com (Charles Dye) Subject: Re: changing the prompt to show only a few directories From: raster@highfiber.com (Charles Dye) On Thu, 7 Feb 2002 21:19:33 -0500, brahms@mindspring.com (Stan Brown) wrote: >Charles Dye wrote in comp.os.msdos.4dos: >>brahms@mindspring.com (Stan Brown) wrote: >> >>> [ re: %@functions[] in the prompt ] >> >>In constructions such as internal variables and variable functions, it >>should always be a single percent sign; double percent signs will not >>work correctly. For environment variables and FOR-loop indices, you >>can use either single or double percent signs, whether you're in a >>batch file or at the prompt. >> >>My suggestion would be to always using single percent signs for >>clarity, unless compatibility with legacy shells is an issue. > >Well, the help ("HELP PROMPT") specifically says to use a double >percent sign in a batch file. Yes, I see. They're doing that to prevent the function from being evaluated at the time the variable is defined -- that is, to defer evaluation until the prompt string is displayed. I personally prefer the use of backquotes, as suggested by Steve Fabian. (For one thing, you only need to remember to quote the whole string once, instead of doubling percents in front of every variable and function you want to defer.) But whatever works for you. -- Charles Dye raster@highfiber.com -- |Fidonet: Charles Dye 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .