[Swift-commit] r3532 - usertools/swift/swiftconfig/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Fri Aug 13 14:12:45 CDT 2010


Author: davidk
Date: 2010-08-13 14:12:45 -0500 (Fri, 13 Aug 2010)
New Revision: 3532

Modified:
   usertools/swift/swiftconfig/bin/swiftconfig
Log:
Display all options when editing a field with limited choices


Modified: usertools/swift/swiftconfig/bin/swiftconfig
===================================================================
--- usertools/swift/swiftconfig/bin/swiftconfig	2010-08-13 18:46:31 UTC (rev 3531)
+++ usertools/swift/swiftconfig/bin/swiftconfig	2010-08-13 19:12:45 UTC (rev 3532)
@@ -84,12 +84,27 @@
         return $entry_value;
     }
     
-    print "$entry_description [$entry_value]: ";
+    if(!@allowable_values) {
+        print "$entry_description [$entry_value]: ";
+    }
+    else {
+        print "$entry_description [";
+        foreach my $allowable(@allowable_values) {
+            if($allowable eq $entry_value) {
+                print "*$allowable ";
+            }
+            else {
+                print "$allowable ";
+           }
+        }
+        print "]: ";
+   }
     my $new_value = <STDIN>;
     chomp($new_value);
     if ($new_value) {
         $entry_value = $new_value;
     }
+    
 
     # Check if value entered is valid (if valid values were passed)
     my $is_valid = 0;




More information about the Swift-commit mailing list