[148760] trunk/base/src/port/port.tcl

raimue at macports.org raimue at macports.org
Tue May 17 02:19:51 PDT 2016


Revision: 148760
          https://trac.macports.org/changeset/148760
Author:   raimue at macports.org
Date:     2016-05-17 02:19:51 -0700 (Tue, 17 May 2016)
Log Message:
-----------
port: add spaces for padding in ui_choice output

Modified Paths:
--------------
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2016-05-17 06:34:34 UTC (rev 148759)
+++ trunk/base/src/port/port.tcl	2016-05-17 09:19:51 UTC (rev 148760)
@@ -5306,10 +5306,13 @@
         # Print the main message
         puts $msg
 
+        # Find maximum number length
+        set maxlen [string length [llength $ports]]
+
         # Print portname or port list suitably
         set i 1
         foreach port $ports {
-            puts -nonewline " $i) "
+            puts -nonewline [format " %*d) " $maxlen $i]
             puts [string map {@ " @" ( " ("} $port]
             incr i
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160517/0d27768f/attachment.html>


More information about the macports-changes mailing list