find(3itcl)
π NAME π
itcl::find β bestie's lil search party for classes and objects πβ¨
π¦ SYNOPSIS π¦
itcl::find option ?arg arg ...?
β¨ DESCRIPTION β¨
Okay so, the find command is literally your group-chat search bar but for classes and objects that are chilling in the current interpreter. Classes and objects get reported first in the active namespace, and then in all the other namespaces in the interpreter. So it's giving "locals first, then everyone else" energy. π
The option argument is what decides which action actually goes down. The legal options are below, and yes bestie, they may be abbreviated β shorthand is valid, we love efficiency. π
πΈ find classes ?pattern?
Returns a list of [incr Tcl] classes. Classes in the current namespace get listed first, followed by classes in all other namespaces in the interpreter. π
If you pass the optional pattern, then the reported names get compared using the rules of the "string match" command, and only the matching names get reported. No stragglers. Periodt.
Now here's the tea on naming, because it's lowkey important: if a class resides in the current namespace context, this command reports its simple name β no qualifiers, just the bare name, fresh-faced and unbothered. β¨ BUT if the pattern contains :: qualifiers, or if the class lives in another context, then this command reports its fully-qualified name. So basically, to get yourself a list where every single name is fully-qualified, you run:
itcl::find classes ::*
Iconic. Saved you the guesswork. π«Ά
π find objects ?pattern? ?-class className? ?-isa className?
Returns a list of [incr Tcl] objects. Objects in the current namespace get listed first, followed by objects in all other namespaces in the interpreter. Same vibe as above, but for objects this time. π¦
- If the optional pattern is specified, the reported names get compared using the rules of the
"string match"command, and only matching names get reported. β - If the optional
-classparameter is specified, this list gets restricted to objects whose most-specific class is className. π― - If the optional
-isaparameter is specified, this list gets further restricted to objects having the given className anywhere in their heritage. Like, anywhere in the family tree, we don't gatekeep ancestry. π³
And the same name rules apply, fr fr: if an object resides in the current namespace context, this command reports its simple name β without any qualifiers. However, if the pattern contains :: qualifiers, or if the object resides in another context, this command reports its fully-qualified name. So for a list where all the names are fully-qualified, hit it with:
itcl::find objects ::*
Main character command behavior, honestly. π
π KEYWORDS π
class, object, search, import
Bestie reminder: this is the itcl::find page from itcl 3.0, dated back in the day β so if you're citing it, that's the source and version, mwah. π
okay that's the whole page, you're fully caught up, go find some classes and slay π β¨ππ¦
π¦ where this page comes from
- debian bookworm: tcl-itcl4-doc 4.2.3-1 Β· BSD-Tcl
- debian trixie: tcl-itcl4-doc 4.3.2-3 Β· BSD-Tcl
- ubuntu jammy: tcl-itcl4-doc 4.2.2-1 Β· BSD-Tcl
- ubuntu noble: tcl-itcl4-doc 4.2.4-1 Β· BSD-Tcl
- ubuntu questing: tcl-itcl4-doc 4.3.2-3
- ubuntu resolute: tcl-itcl4-doc 4.3.5-1 Β· BSD-Tcl
- ubuntu stonking: tcl-itcl4-doc 4.3.8-1 Β· BSD-Tcl
- Copyright (c) 1993-1998 Lucent Technologies, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms