On Thu, Apr 19, 2012 at 1:40 PM, Clark J. Wang <[email protected]> wrote:
> 2012/4/19 ольга крыжановская <[email protected]>
>>
>> Here's one of Roland's old proposals:
>>
>> RFE: Extend ksh93's printf %q to accept a modifier which defines the
>> quoting mode. Supported modes should be:
>>
>> %(kshliteral)q same as existing %q
>> %(shliteral)q quote string with '\' (including spaces) that a POSIX
>> shell (and even the old bourne shell) can accept it
>> %(xml)q convert string into an xml literal (same as %H)
>> %(egrep)q convert string into a literal accepted plainly by egrep
>> (e.g. things like '[', ']', '(', ')' etc. are quoted)
>> %(grep)q convert string into a literal accepted plainly by grep (e.g.
>> things like '[', ']', etc. are quoted)
>> %(agrep)q, %(xgrep)q convert string into a literal accepted plainly by
>> grep -X/-A (e.g. things like '[', ']', '(', ')' etc. are quoted)
>> %(urlencode)q convert string into a literal accepted plainly as URL
>> (e.g. space gets encoded as '+', '!' as '%21', '*' as '%2A' etc.)
>> The modifers scheme will allow future extensions easily.
>
>
> I like the idea. `%#q' added in 93u+ for CSV format is not very intuitive to
> me and `%(csv)q' would look better. :)

+1

I like the idea, too. Has been there a consensus with David and Glenn
about implementing this yet?

Irek

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to