Re: [PATCH 08/16] test-lib functions: add --printf option to test_commit

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> The name "printf" has such strong association in programmer's minds
> with "%" and argument consumption that the name of this option alone
> almost begs people to take advantage of argument interpolation even
> though it's documented here as not allowing it. Taking into
> consideration that people often do not read documentation, `--printf`
> as the name of the option may be an unfortunate one. Perhaps it could
> be called `--raw` or something less likely to suggest argument
> interpolation.

The reason we want to use 'printf' instead of 'echo' is because only
some implementations of 'echo' honors '\t\n\r' etc., and 'echo' by
others show these literally.  Using printf(1) allows us to write
these backslashed special characters universally.

So, I find 'raw' equally confusing, if not more.

>> @@ -192,6 +196,7 @@ debug () {
>>
>>  test_commit () {
>>         notick= &&
>> +       echo=echo &&
>
> This could be slightly confusing. I wonder if naming this variable
> `emit` would be clearer.

Perhaps.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux