|Summary:||layman -L: better use of screen real estate for source URLs|
|Product:||Portage Development||Reporter:||Martin von Gagern <Martin.vGagern>|
|Component:||Tools||Assignee:||Gunnar Wrobel (RETIRED) <wrobel>|
|Package list:||Runtime testing required:||---|
|Attachments:||First version of proposed patch|
Description Martin von Gagern 2008-12-15 14:55:49 UTC
Currently a call to "layman -L" will list a lot of repositories, each with its source. The sources however are mostly truncated to common parts and thus provide little valuable information. I've written a patch to overlay.py which addresses this by 1. dropping the common string "source: " which should be clear from context and thus is only a waste of space. 2. querying actual terminal window width to use longer lines where available. Here the COLUMNS environment variable takes precedence over the value returned via the TIOCGWINSZ ioctl, with 80 as the default fallback. 3. Abbreviate the common "overlays.gentoo.org" to "o.g.o" in cases that would otherwise be truncated. I'll attach the patch and suggest it for inclusion. The idea for the TIOCGWINSZ call comes from bzr, but I adjusted the precedence, so users have a final word. YOu might of course decide to move this terminal handling code away from the overlays module and closer towards the user interface code. I leave that to you for now, unless you indicate a place where you would like to have it included.
Comment 1 Martin von Gagern 2008-12-15 14:56:48 UTC
Created attachment 175343 [details, diff] First version of proposed patch
Comment 2 Gunnar Wrobel (RETIRED) 2008-12-28 22:59:26 UTC
Thanks for the patch! Included in layman-1.2.2.