From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,bff10911bb6aa674 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-09-07 01:50:06 PST Path: gmdzi!unido!mcsun!uunet!munnari.oz.au!news.hawaii.edu!uhccux!jach.hawaii.edu!PND From: pnd@jach.hawaii.edu (Phil Daly, JAC, 665 Komohana St, Hilo HI 96720, USA) Newsgroups: comp.sys.dec Subject: Re: Changing the '$' prompt Message-ID: <14728@uhccux.uhcc.Hawaii.Edu> Date: 6 Sep 91 19:11:55 GMT Sender: news@uhccux.uhcc.Hawaii.Edu Reply-To: pnd@jach.hawaii.edu Organization: UK/Canada/Netherlands Joint Astronomy Centre, Hilo, HI A static prompt can be assigned using the command $ SET PROMPT="''F$ENVIRONMENT("DEFAULT")'> " A _dynamic_ prompt string requires a recursive procedure such as: $! PROMPT.COM $ X = 'F$VERIFY(0)' $PROMPT: $ READ/PROMPT="''F$ENVIRONMENT("DEFAULT")'> " SYS$COMMAND P1 $ DEFINE/NOLOG SYS$INPUT SYS$COMMAND $ 'P1' $ GOTO PROMPT $ EXIT In fact, you can put _anything_ in the command string. I wrote this procedure years ago for a friend who used to work on a MULTICS system and like having the current date and time returned as a prompt. The same effect can be achieved in the above procedure by replacing $ READ/PROMPT="''F$ENVIRONMENT("DEFAULT")'> " SYS$COMMAND P1 with $ READ/PROMPT="''F$TIME()'> " SYS$COMMAND P1 Having said that, however, I wouldn't advise using the procedure (just enjoy it!) as you're effectively working within a sub-environment and any error will abort the procedure (as will typing `EXIT'). "Anything I say should be taken at your own risk with a hefty pinch of salt" +------------------------------------------------------------------------------+ | | | | | Telephone : +1 808 969 6568 (direct) | | P N Daly | +1 808 961 3756 x268 (reception) | | Joint Astronomy Centre | Facsimile : +1 808 961 6516 | | 665 Komohana Street | Telenet DTE : 31528080905310 |