[pacman-dev] [PATCH] Add missing newline in paclog-pkglist help output

Alastair Hughes hobbitalastair at yandex.com
Sat Sep 24 18:33:33 UTC 2016


> On Sat, 24 Sep 2016 19:16:24 +1200
> Alastair Hughes <hobbitalastair at gmail.com> wrote:
> 
>> Add missing newline in paclog-pkglist help output
>>
>> Signed-off-by: Alastair Hughes <hobbitalastair at gmail.com>
>> ---
>> contrib/paclog-pkglist.sh.in | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/contrib/paclog-pkglist.sh.in b/contrib/paclog-pkglist.sh.in
>> index 5d6f4be..847b389 100644
>> --- a/contrib/paclog-pkglist.sh.in
>> +++ b/contrib/paclog-pkglist.sh.in
>> @@ -33,7 +33,7 @@ usage() {
>> echo
>> printf "Example: %s @localstatedir@/log/pacman.log\n" "${myname}"
>> echo
>> - printf 'Defaults to: @localstatedir@/log/pacman.log'
>> + echo 'Defaults to: @localstatedir@/log/pacman.log'
>> }
>>
>> version() {
> 
> Why would you change to echo instead of simply adding the newline?

Consistency.
There is a mix of echo and printf used in that function; printf seemed to be used with at least one extra argument, while echo was used if there wasn't an extra argument. I'm unaware of any technical reason to prefer one over the other in this case; please enlighten me if I am wrong :)


More information about the pacman-dev mailing list