How can I add a new option to an existing Tcl command

Purpose: Discuss extending Tcl functionality


See stacking

Add description of concept of major and minor Tcl commands .

See also Overloading widgets.

What tools are available for extended Tcl commands - say one wanted to add some new minor commands to tcl's info command...

Are these the same as ensembles?

APN Yes, info is a ensemble. To extend with an info time command (for example)

proc info_time {} {return [clock format [clock seconds]]}
namespace ensemble configure ::info -map [dict merge [namespace ensemble configure info -map] {time info_time}]

Would you like to rename a function to add a feature?