Skip to content

printf feature request #439

@SamuelMarks

Description

@SamuelMarks

Feature Description

It would be great to have a printf. I'm doing fancy escaping stuff where I want to evaluate a variable and quote it so PostgreSQL can execute the query correctly.

Describe The Solution You'd Like

At least basic printf syntax

Code Sample

printf '%s \'%s\' "%s"' 'foo haz' "${can}" bar

Alternatives like std::string::Concat are unfriendly:

$ duck
a = set 5
c = concat '"' ${a} '"'
echo ${c}
'"'5'"'
q = set '
e = concat ${q} ${a} ${q}
echo ${e}
'5'

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions