TABLE OF CONTENTS


::pwtk::normalizeSOpt

SYNOPSIS

proc ::pwtk::normalizeSOpt {optval} {

PURPOSE

Tranform short option -oVALUE to -o VALUE (SOpt stands for short option).

ARGUMENT

SOURCE

    if { ! [regexp -- ^-- $optval] && [regexp -- ^- $optval] } {
        if { [string length $optval] > 2 } {
            # -oVALUE to -o VALUE
            set optval "[string range $optval 0 1] [string range $optval 2 end]"
        }
    }
    return $optval
}