tmsh::csh

Description

tmsh::csh is a Tcl string variable that can be used in the procedure script::init to determine the context in which the procedure script::init was invoked. tmsh::csh is set to one of the following:
  • QMARK - Indicates that the user typed a question mark (?) (verified version 11.6.1)
  • TABC - Indicates the user typed Tab.
  • Empty string - Indicates the script is being run.

Syntax

tmsh::csh

Examples

proc script::init {} {

    if {$tmsh::csh eq ""} {
        # script::run is going to be called next, no init required for csh,
        # setup for the script to be run
    }
    elseif {$tmsh::csh eq "TABC"} {
        # script::tabc is going to be called next,
        # setup any global state required for tab completion
    }
    else {
        # script::help is going to be called next,
        # setup any global state required to display "?" help
    }
}

Sample Code


Introduced: BIGIP-10.1

Note

For the full traffic management shell reference, see F5 TMSH Reference

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.