[44053] users/perry/base-select/src/port/port.tcl

perry at macports.org perry at macports.org
Fri Dec 19 22:45:05 PST 2008


Revision: 44053
          http://trac.macports.org/changeset/44053
Author:   perry at macports.org
Date:     2008-12-19 22:45:04 -0800 (Fri, 19 Dec 2008)
Log Message:
-----------
port/port.tcl - Added more logic to action_select.

Modified Paths:
--------------
    users/perry/base-select/src/port/port.tcl

Modified: users/perry/base-select/src/port/port.tcl
===================================================================
--- users/perry/base-select/src/port/port.tcl	2008-12-20 06:30:12 UTC (rev 44052)
+++ users/perry/base-select/src/port/port.tcl	2008-12-20 06:45:04 UTC (rev 44053)
@@ -1680,9 +1680,16 @@
     }
     set group [lindex $portlist 0]
 
-    # If no command (--set, --show, --list) is specified, default to the
-    # show command.
-    if {[llength $commands] < 1} {
+    # If no command (--set, --show, --list) is specified, *but* more than one
+    # argument is specified, assume the user intended to use the set command.
+    if {[llength $commands] < 1 && [llength $portlist] > 1} {
+        set command set
+        ui_debug [concat "Although no command was specified, more than " \
+                         "one argument was specified.  Defaulting to the " \
+                         "'set' command..."]
+    # If no command (--set, --show, --list) is specified *and* less than two
+    # argument are specified, fall back to the show command.
+    } elseif {[llength $commands] < 1} {
         set command show
         ui_debug [concat "No command was specified. Defaulting to the " \
                          "'show' command..."]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081219/2e5b55d7/attachment.html>


More information about the macports-changes mailing list