🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7175

Can I intercept changes to the system prompt?

#7175
From: sorrow
Date: Thu, 20 Jun 1991 12:23
33 lines
1905 bytes
I am currently writing a slew of utilities to make my DOS system look like
UNIX.  And before you say "Use 4DOS!!!!" -- I tried.  4DOS won't work with
BOOTCON.SYS.  Besides, I like sticking to a standard command interpreter,
purist that I am. :-)

Anyway, so far I have obtained an RM, DOSEDIT, am writing CHMOD, just finished
writing LS, will eventually port AWK, rewrite GREP based on Turbo-GREP, and
am using SWITCHAR as found in the UnDocumented DOS book (GOOD book).

Now that I can use the '-' character as a command line switch for DOS, and 
now that I can use the '/' to change directories, I would like to know if 
there is a way for me to change the prompt so that instead of:

C> SET PROMPT $P$G
C:\UTIL\EUNUCHS>

I can get the following:

C:/util/eunuchs>

I don't believe that I can use normal DOS calls, since the prompt is controlled
by the current command interpreter, in my case COMMAND.COM (DOS 3.30).  Any
suggestions?

Brian
/*
Brian Hook -- MS-DOS Programmer for Contract
-----------------------------------------------------------------
"Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN
inches....better save the women and children first...but this one goes to 11!
..anymore of that plutonium nyborg?....there can be only ONE!....like a 
finger pointing to the moon....ease the seat back...one day closer to death
*/
Technical Details
Message-ID: <0094A660.7B670F40@MAPLE.CIRCA.UFL.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU
From: sorrow@oak.circa.ufl.edu
Newsgroups: comp.os.msdos.programmer
Subject: Can I intercept changes to the system prompt?
Message-ID: <0094A660.7B670F40@MAPLE.CIRCA.UFL.EDU>
Date: 20 Jun 91 12:23:07 GMT
Sender: news@uflorida.cis.ufl.EDU
Reply-To: sorrow@oak.circa.ufl.edu
Organization: University of Florida CIRCA VAX Cluster
Lines: 33