On Thu, May 04, 2000 at 09:25:06PM -0400, Michael B Golden wrote:
>         A few friends and I were just playing around and decided we would try
> and make bash look like DOS. No flames please. Of course, after a few
> simple aliases, the most noticable thing is the prompt. "C:/etc>" does
> not look like "C:\etc" like we want it to, so after a bit of studying I
> came up with the sed script "sed -e 's/\//\\/g'" to replace the slashes
> with the DOS way, but I cannot find out how to make this affect the
> prompt. I assume it goes somewhere in setting PS1, but I cannot get it to
> alter the prompt, but only to display the script as part of the prompt.
> Anyone know how to do this?
Try:
$ export PS1="C:\\`pwd|sed -e 's/\\//\\\/g'`> "
the ` (backticks) put the output of the command into the prompt,
and the \\/ \\\ is needed to escape the / and \ twice...once to put it
in, and the second time when it is expanded.
now that you know HOW to do it...WHY?
--
-- michael d. ivey, chief thinker --- ">ivey@gweezlebur.com> -----------
------ gweezle bur poetry manufacturing http://gweezlebur.com> -------
------------------------------------------------------------------------
"In this house, we obey the laws of thermodynamics!" -- Homer Simpson
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.