tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal to add /usr/bin/shquote



On Sun, 07 Sep 2008, Robert Elz wrote:
> My only reservation might be that while shell quoting is a very common
> need, we also need quoting for other programs -

I was thinking about that when I decided to use getopt to allow for the
possibility of options in future.

But it now seems to me that "shquote" is not a good name for a program
that can also perform non-shell quoting.  Perhaps just "quote" instead
of "shquote"?  It could take a "-t type" option defaulting to "-t sh",
and the initial implementation might not support any types other than
"sh", but the infrastructure could be provided.

> the one I see most is for sed patterns - pkgsrc could really do with
> that one, when you consider the number of times that it does stuff
> like
> 
>       sed 's/PREFIX/${PREFIX}/'

Yes, I have also seen and worried about that pattern in pkgsrc.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index