modules/cmdline/cmdline.tcl |   15 +++++++++++++--
 1 ......... 13 .(+)... 2 .(-)
diff --git a/modules/cmdline/cmdline.tcl b/modules/cmdline/cmdline.tcl
index e191b52..4803950 100644
--- a/modules/cmdline/cmdline.tcl
+++ b/modules/cmdline/cmdline.tcl
@@ -120,8 +120,17 @@ proc ::cmdline::getKnownOpt {argvVar optstring optVar valVar} {
                set argsList [lrange $argsList 1 end]
            }
 
-           "-*" {
+           "-*" -
+           "--*" {
                set option [string range $arg 1 end]
+               if [string equal [string range $option 0 0] "-"] {set option [string range $arg 2 end]}
+
+               # support for format: [-]-option=value
+               set idx [string first "=" $option 1]
+               if {$idx != -1} {
+                       set _val [string range $option [expr $idx+1] end]
+                       set option [string range $option 0 [expr $idx-1]]
+               }
 
                if {[lsearch -exact $optstring $option] != -1} {
                    # Booleans are set to 1 when present
@@ -131,7 +140,9 @@ proc ::cmdline::getKnownOpt {argvVar optstring optVar valVar} {
                } elseif {[lsearch -exact $optstring "$option.arg"] != -1} {
                    set result 1
                    set argsList [lrange $argsList 1 end]
-                   if {[llength $argsList] != 0} {
+                   if {[info exists _val]} {
+                       set value $_val
+                   } elseif {[llength $argsList] != 0} {
                        set value [lindex $argsList 0]
                        set argsList [lrange $argsList 1 end]
                    } else {

