Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!pasteur!ucbvax!ANDREW.CMU.EDU!jj1h+ From: jj1h+@ANDREW.CMU.EDU (Joseph Jackson) Newsgroups: comp.os.vms Subject: Re: getting current dir in dcl prompt Message-ID: Date: 30 Jan 88 06:57:04 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 52 > ..but VMS will only take a string for SET PROMPTs argument > and the string must not have spaces in it. VMS complains about > "too many parameters" >:-{ Not to scream RTFM, but the problem above is a very general DCL concept: If you want to pass a parameter which contains spaces or lowercase characters, you have to put that parameter in quotes: $ SET PROMPT = "Joe's vax> " This information can be found with "$ HELP SET PROMPT PARAMETERS". To make the prompt reflect your default directory, you have to change the way you set your default, not the way you set your prompt. One simple way to accomplish this is by writing a command procedure which you call every time you want to change where you are. In addition to doing the set default command, it also sets your prompt. For example: $! Jump.com $! $ Set default 'P1' $ Set prompt = "Your at: ''F$environment("DEFAULT")'> " $ Exit Of course, some shorter extraction of the string returned by F$environment may well be more appropriate. You can learn how to use F$extract and F$locate to do this with "$ HELP LEXICAL". Another handy trick is to put ['P1'] in place of 'P1' in the above procedure so that you no longer have to enter the brackets yourself. After doing this, you only need to say "$ @JUMP .SUBDIR.SUBSUBDIR". To make the procedure more convenient to invoke, you could add a line to your LOGIN.COM similar to: "$ JUMP :== @dev:[directory]JUMP.COM " Well, this should give you a rough idea of one technique. I hope it helps! Joe. ;-) __________________________________________________________ | | | Joseph L. Jackson, Jr. | | Carnegie-Mellon University | | | | Overland: Network: | | 4705 Fifth Ave, Apt.#4M JJ1h+@andrew.cmu.edu | | Pittsburgh, PA 15213-2937 Jackson@laurel.psy.cmu.edu | | (412) 268-5540 Jackson@skidmore.bitnet | |__________________________________________________________|