Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!hplabs!hpfcdc!hpislx!hpmtlx!kwb From: kwb@hpmtlx.HP.COM ($Keith Blackwell) Newsgroups: comp.unix.questions Subject: Re: csh prompt setting within a c-program Message-ID: <1150002@hpmtlx.HP.COM> Date: 27 Jan 89 22:30:51 GMT References: <2449@nunki.usc.edu> Organization: HP Manufacturing Test Division - Loveland, CO Lines: 18 | strcpy(ps1,"PS1=new prompt: "); | if (putenv(ps1)) | fprintf(stderr,"%s: Environment not set up correctly.\n",pgmname); | system(shell); Csh doesn't use an environment variable for the prompt, so theoretically, there's no way to do it. Of course, you could always try to find a way to use .cshrc --- but probably no luck there either for your application. Actually, I tried doing the following from sh (to see if you could use this command in your "system" call instead of just "csh -f" or whatever): (echo 'set prompt="new prompt: "' ; cat - ) | exec csh Needless to say, it didn't work. The prompt was set alright, but csh didn't think it was interactive and didn't bother printing the prompt out! Maybe someone knows a way to convince csh that it *is* interactive? It would be a shame to have to use pseuto-tty's. -- Keith Blackwell NOTE: email to most posters doesn't work from here. Anyway, its interesting...