Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!mcnc!ncsu!uvacs!iedl02!ebk From: ebk@iedl02.UUCP Newsgroups: net.unix-wizards Subject: Re: vi and "set prompt" question Message-ID: <1742@iedl02.UUCP> Date: Thu, 26-Apr-84 03:23:32 EST Article-I.D.: iedl02.1742 Posted: Thu Apr 26 03:23:32 1984 Date-Received: Sat, 28-Apr-84 10:26:31 EST References: sri-arpa.12443 Lines: 16 > Why does set prompt in .cshrc instead of .login screw up vi. When a shell is not interactive, such as those forked by vi with input and output as pipes, it doesn't print prompts (obviously). Not so obvious is the kludgy way the prompt is prevented: instead of checking a flag before printing the prompt, the prompt string is set to null at startup. If you then set prompt=something, the something will be output as well as the filename that vi is looking for. (Also try :!ls - your prompt will appear twice as well as the output.) It doesn't hurt anything in .login, since .login isn't read by secondary shells. The correct way to set the prompt is in the .cshrc, but in an if: if {$?prompt} set prompt=myprompt John Owens