ajalt / clikt

Multiplatform command line interface parsing for Kotlin
https://ajalt.github.io/clikt/
Apache License 2.0
2.51k stars 121 forks source link

Option to echo "raw" String #486

Closed PinkieSwirl closed 7 months ago

PinkieSwirl commented 7 months ago

There should be an option to write unaltered Strings to the std-out.

E.g., for business logic one needs to print/echo Strings to the terminal, without any tempering. Imagine popular programs like "cat" or "grep" to alter the output (if not specified).

From the docs it is unclear to me, if this is already configurable.

ajalt commented 7 months ago

You can do this with terminal.rawPrint()

PinkieSwirl commented 7 months ago

Thanks for the quick reply, but this still converts tabs, for example.

ajalt commented 7 months ago

rawPrint passes the string unchanged to kotlin.io.println, so something else must be making the changes you're seeing?

PinkieSwirl commented 7 months ago

Sorry, it was indeed my fault, I failed to convert 2 statements to rawPrint. Sorry again.

And thanks for your support on this free and awesome project 👍