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 The following is a command procedure that replaces the 'SET DEFAULT' command. There have been many versions of such command procedures, including the one that appeared in the Feb. 1987 issue of DEC Professional which this one is based on. The primary feature of my version is that it sets your prompt to the complete default directory name. Best of all, unlike the VMS 'SET DEFAULT' command, my command procedure prints an error message if you try to set your default directory to a non-existent directory. 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 exit $ if (p1 .eqs. "") then p1 = f$trnlog("sys$login") $ old_dir = f$environment("DEFAULT") $ set def 'p1' $ dir = f$environment("DEFAULT") $ if f$parse("''dir'") .eqs. "" then goto no_such $ prompt = dir $ set prompt = "''prompt' " $ exit $ no_such: $ write sys$output "No such directory as ''dir'" $ set def 'old_dir'