script::tabc

Description

A script may provide the script::tabc procedure. The procedure will be invoked when the user enters tab when they are entering the command run cli script. If the script has defined the script::init procedure it will be invoked before script::tabc. The script can add tab completion datasets by calling tmsh::add_tabc. tmsh will format the tab completion datasets and display them to the user, or, complete the current argument if possible.

Syntax

proc script::tabc {} {

}

Examples

proc script::tabc {} {
 foreach {pool} [tmsh::get_config /ltm pool] {
   tmsh::add''tabc [tmsh::get''name $pool]
 }
}

Results:
root@ltm1(Active)(tmos)# run cli script new.tcl <tab>
 p1-pool   p2-pool    p3-pool