Using a percent sign in the PROMPT

Aug 28, 2008
93
3
#1
Today seems to be my day for questions. I would like to display the current memory load as a percent in my PROMPT. I can show the memory load easily enough, but I can find no way to force the display of a literal percent sign. Using any number of percent signs produces nothing visible, and I can find no way to escape one or show it otherwise. Help?
 

rconn

Administrator
Staff member
May 14, 2008
10,504
94
#2
Phileosophos wrote:

> Today seems to be my day for questions. I would like to display the current memory load as a percent in my PROMPT. I can show the memory load easily enough, but I can find no way to force the display of a literal percent sign. Using any number of percent signs produces nothing visible, and I can find no way to escape one or show it otherwise. Help?
Use ^%^% (assuming that you're using the default escape character ^).

Rex Conn
JP Software
 
#3
On Wed, 11 Mar 2009 18:06:32 -0500, Phileosophos <> wrote:

|Today seems to be my day for questions. I would like to display the current memory load as a percent in my PROMPT. I can show the memory load easily enough, but I can find no way to force the display of a literal percent sign. Using any number of percent signs produces nothing visible, and I can find no way to escape one or show it otherwise. Help?
|

Try this:

prompt `%%`
--
- Vince