c From:	HENRY::IN%"blia.UUCP!forrest%cgl.ucsf.edu%sri-kl.ARPA%relay.cs.net@rca.com" 14-FEB-1987 09:43  To:	info-vax@sri-kl.arpa( Subj:	A Useful 'SET DEFAULT' Replacement    6 The following is a command procedure that replaces the4 'SET DEFAULT' command. There have been many versions2 of such command procedures, including the one that9 appeared in the Feb. 1987 issue of DEC Professional which B this one is based on. The primary feature of my version is that it8 sets your prompt to the complete default directory name.5 Best of all, unlike the VMS 'SET DEFAULT' command, my 4 command procedure prints an error message if you try: to set your default directory to a non-existent directory.8 Finally, if you don't give it any arguments, it will set/ your default directory to your login directory.   ; I use the name 'cd' to run to this procedure. Since I spend : my days logged in to both Unix and VMS, this makes my life- much easier. I hope it makes your easier too.    Jon Forrest  ucbvax!mtxinu!blia!forrest     $ on error then exit2 $ if (p1 .eqs. "") then p1 = f$trnlog("sys$login")$ $ old_dir = f$environment("DEFAULT") $ set def 'p1'  $ dir = f$environment("DEFAULT")1 $ if f$parse("''dir'") .eqs. "" then goto no_such  $ prompt = dir $ set prompt = "''prompt' "  $ exit
 $ no_such:0 $ write sys$output "No such directory as ''dir'" $ set def 'old_dir' 