nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.45k stars 59 forks source link

Commands are echoed without quotation marks in the log #169

Closed dbohdan closed 1 year ago

dbohdan commented 1 year ago

When you define a command task with parts in quotes, the command shows in the log without the quotes. This makes it harder to understand the log and also prevents you from copying and pasting the command into your shell.

For example, for the task

foo = "echo 'Hello, world!'"

the output from Poe the Poet 0.23.0 is

> poe foo
Poe => echo Hello, world!
Hello, world!

But as a user, I expect output like

> poe foo
Poe => echo 'Hello, world!'
Hello, world!

I don't think the quotation marks must necessarily be those in the literal text. What I have done in similar situations is join the command with shlex.join before logging it.

nat-n commented 1 year ago

hi @dbohdan, thanks for the feedback.

I think your suggestion makes sense, I'll try get it into the next release.

nat-n commented 1 year ago

This enhancement is now available in v0.24.0 🚀

dbohdan commented 1 year ago

That was quick! Thanks.