vi bug(feature?)
Robert Viduya
robert at gitpyr.UUCP
Sat Jul 27 23:09:29 AEST 1985
In article <144 at peregrine.UUCP>, mike at peregrine.UUCP (Mike Wexler) writes:
> My standard shell is the /bin/csh. When I try doing a any command
> with a name that needs to be shell expanded the editor calls the shell,
> but gets confused by the shell prompt and includes that in the file list.
The problem isn't in vi, but in csh. Whenever csh starts up as a non-
interactive shell, it unsets the prompt variable. An unset prompt var-
iable will never get mixed up in other program output. If your .cshrc
file goes ahead and sets the prompt then it will print out the prompt
when it thinks it's supposed to. The solution, in your .cshrc, is to
check if the prompt is already set to something ('% ') and, if it is
then set it to what you want it to be, otherwise leave it alone. The
following is similar to what I have in my .cshrc:
if ${?prompt} then # don't set prompt if not set (only with -c/-t flag)
set prompt="Prompt> "
endif
Hope this helps....
robert
--
Robert Viduya 01111000
Georgia Institute of Technology
...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert
...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list