[Freeipa-devel] [PATCH] Add wrapping when printing multi-value attributes that don't fit on one line.

Pavel Zůna pzuna at redhat.com
Wed Aug 5 08:16:54 UTC 2009


Nathan Kinder wrote:
> On 08/04/2009 09:32 AM, Pavel Zuna wrote:
>> This is how it looks like in practice:
>>
>> ./ipa user-show pzuna --all --raw
>> ----------
>> user-show:
>> ----------
>>   ...
>>   memberof: cn=ipausers,cn=groups,cn=accounts,dc=pzuna,
>>             cn=dráčci,cn=groups,cn=accounts,dc=pzuna
> For an attribute that uses the Distinguished Name syntax, such as 
> memberOf, it may be difficult to read if the values are separated by 
> commas and on the same line.  This would especially be the case if the 
> value has a space in it, which your example above doesn't illustrate.
True, I'm thinking about making the raw option use the good ol' 
multi-line output. Without --raw there's no DNs displayed and I think 
it's more practical to have several values on one line. Let's say we 
have a group with (only) 100 members => 100 lines just to print them.

>>   objectclass: top, person, organizationalPerson, inetOrgPerson,
>>                inetUser, posixAccount, krbPrincipalAux,
>>                radiusprofile
>>
>> The wrapping works the same way as textui.print_paragraph does - it 
>> depends on terminal settings. When priting to file, the line is 
>> considered infinite. (Although redirecting output to file doesn't work 
>> when there are unicode characters present - an issue I'm currently 
>> looking into.)
>>
>> I'm also posting this to Jenny, because this patch changes the output 
>> of most ipa plugins. I hope it won't make testing much harder. Anyway 
>> if there's a problem I can add an option that would bring back the 
>> multi-line output...

Pavel




More information about the Freeipa-devel mailing list