Subject: Re: fix for pd-ksh globbing
To: Simon J. Gerraty <sjg@crufty.net>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-userlevel
Date: 01/25/2002 12:11:06
On Fri, 25 Jan 2002, Simon J. Gerraty wrote:

> > It still freaks out when expanding files with meta-characters
> > (double-quotes, single-quotes, parenthesis). It expands the file,
> > inserting escapes for the meta-characters, to the point where the files
> > are the same, but then when you hit tab again to see the alternatives (I
> > use set vi-tabcomplete), it gets all confused and displays a scrambled
> > filename with the first part duplicated. Can you do anything about that?
>
> No idea - can you show me a concrete example?

	set -o vi-tabcomplete
	touch quoted_\"file\"_one
	touch quoted_\"file\"_two

Now type

	ls quoted_\"file\"_<TAB>

and you see both files (in contradiction to my description, above).
Now type an `o' and <TAB>, and you see

	ls quoted_\"file\"_"file\"_o

If you hit <RETURN> now, you see

	?

because one of those double-quotes is un-matched. [In other words, it's
not only the display that's messed up.]

> > "ksh93" doesn't have a problem with the meta-characters, nor does it try
> > to escape them. I think that's the way to go. If you need to specify a
> > long file with meta-characters, you just have to place a single- or
> > double- quote at the beginning of the filename.
>
> Hmmm, I'll bounce some of this off Michael Rendell who's still the
> current pdksh maintainer.  Sort of sucked that I had to go download a
> vanila pdksk archive to confirm that.

That would be great. "bash" doesn't have a problem expanding (and
escaping) meta-characters, by the way. Emulating the "bash" behavior, in
this regard, might be even better than emulating the "ksh93" behavior.

Frederick