[net.unix-wizards] fix for Sys Vr2 vi for * and ? pathname expansion

rcj@burl.UUCP (Curtis Jackson) (06/13/85)

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?

Thanks muchly in advance,
-- 

The MAD Programmer -- 919-228-3313 (Cornet 291)
alias: Curtis Jackson	...![ ihnp4 ulysses cbosgd mgnetp ]!burl!rcj
			...![ ihnp4 cbosgd akgua masscomp ]!clyde!rcj

frank@aaec.OZ (Frank Crawford) (06/18/85)

> 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@aaec.OZ
					UUCP	mulga!aaec.OZ!frank

[ Domain addressing is soooooo much simplier and easier!!! ]