[asterisk-dev] Wrapping CLI output at 80 columns.

Tilghman Lesher tilghman at meg.abyt.es
Wed Oct 23 13:52:58 CDT 2013


On Wed, Oct 23, 2013 at 1:41 PM, George Joseph
<george.joseph at fairview5.com> wrote:
>
> On Wed, Oct 23, 2013 at 11:27 AM, George Joseph
> <george.joseph at fairview5.com> wrote:
>>
>>
>> On Wed, Oct 23, 2013 at 10:26 AM, Paul Belanger
>> <paul.belanger at polybeacon.com> wrote:
>>>
>>> On 13-10-23 10:51 AM, Rusty Newton wrote:
>>>>
>>>> On Tue, Oct 22, 2013 at 2:23 PM, George Joseph
>>>> <george.joseph at fairview5.com> wrote:
>>>>
>>>>>
>>>>> So, thoughts on removing the 80 column wrap requirement and just
>>>>> letting the
>>>>> screen do the wrapping?
>>>>
>>>>
>>>> As I mentioned in the dev chat, I'm a +1 for this as well. I don't
>>>> feel like the 80 character limit is relevant any longer.
>>>>
>>> So, python PEP8[1] recently relaxed there guidelines, so I think we could
>>> also follow suit.  I still think 80 should be aimed for, but allowing up to
>>> 100 being the max. I still think we should have something for the upper
>>> limit.
>>>
>>> [1] http://www.python.org/dev/peps/pep-0008/#maximum-line-length
>>>
>> I'm OK with striving for a 100 character limit as a design guideline but I
>> do think people are used to more considering that sip show peers needs 140
>> to not wrap (and is quite useful).  OTOH, Rusty's mock up for pjsip show
>> endpoints needs only 95.
>>
>> I'll start with 100 and see how it looks with a bunch of real endpoints.
>>
>
> Hmmm.  Here's a real-world example with no wrapping or limits...
>
> http://pastebin.com/R1qgqxKv
>
> It's already 128 characters wide.
>
> How would you wrap or limit this?

One thing that comes to mind:  if there are active channels, isn't the
DevState _always_ INUSE?  You could conflate those columns as a
result.

Secondarily, you could try a 2-row format.  For ease of reading, I'd
suggest that you stagger the column headings, so that fields from the
first row of output DON'T line up with fields from the second row of
output.  This makes the fields more easily distinguishable.



More information about the asterisk-dev mailing list