fix for Sys Vr2 vi for * and ? pathname expansion
Frank Crawford
frank at aaec.OZ
Tue Jun 18 13:38:17 AEST 1985
> Our vi (Sys Vr2) always says "Too many filenames" whenever you ask
> it (from inside the editor) to read in a pathname with any of the
> normal * or ? wild card characters in it. Does anyone have fixes
> for this?
I had the same problem here for a while. I finally tracked it down
to the having my shell prompt being added as part of the filename
expansion.
A quick test is to do an `n' rather than an `edit' and see if the
first file it tries to edit is the same as your prompt string.
If this is the case then the problem is your how you invoke your
shell. If you are using a `csh' and you have a line in your `.cshrc'
something like
set prompt="my prompt> "
then you need to replace it by
if ($?prompt == 1) set prompt="my prompt> "
This reason for this is that when `vi' (or `ex') invokes the shell
to do the expansion the prompt is left unset and this shouldn't be
changed.
If on you are using a `sh' then none of these problems should occur
as it should be invoked with a `-e' option which seems to work
differently to the one for `csh' (I think that's the right option
to blame).
Hope this helps
Frank Crawford ACSnet frank at aaec.OZ
UUCP mulga!aaec.OZ!frank
[ Domain addressing is soooooo much simplier and easier!!! ]
More information about the Comp.unix.wizards
mailing list