find(n)
π find(n) β the [incr Tcl] glow-up edition π
okay bestie, welcome to find, a little command from the itcl world (that's [incr Tcl], the Tcl extension that gives you classes and objects, very demure, very c++-but-make-it-tcl) πΈ
β¨ NAME β¨
itcl::find β go on a lil scavenger hunt for classes and objects π
π SYNOPSIS π
itcl::find option ?arg arg ...?
π¦ DESCRIPTION π¦
so like, the find command is your bestie when you need to locate classes and objects that are hanging out in the current interpreter. it's giving "where are my people at" energy π
the way it reports things: classes and objects in the active namespace come first, and then everything in all the other namespaces in the interpreter. current faves first, then the rest of the group chat, periodt β¨
the option argument is what decides which action actually goes down. the legal options are below β and yes, they can be abbreviated (short queen energy, we love that) π
π OPTIONS π
find classes ?pattern? π
returns a list of [incr Tcl] classes, no cap.
- classes in the current namespace get listed first π₯
- then classes in all other namespaces in the interpreter follow
if you pass the optional pattern, the reported names get compared using the rules of the "string match" command, and only the matching names get reported. it's giving "filtered, curated, iconic" π
now here's the naming tea β: if a class lives in the current namespace context, this command reports its simple name β no qualifiers, just the bare name, natural, effortless π«
BUT π¨ if the pattern contains :: qualifiers, or if the class lives in another context, this command reports its fully-qualified name instead. so if you want a list where every single name is fully-qualified, you can run this:
itcl::find classes ::*
slay. that's the one. π«Ά
find objects ?pattern? ?-class className? ?-isa className? π§Έ
returns a list of [incr Tcl] objects, and honestly? iconic.
- objects in the current namespace are listed first π₯
- then objects in all other namespaces in the interpreter
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. only the ones that pass the vibe check β¨
if the optional -class parameter is specified, the list gets restricted to objects whose most-specific class is className. that's the main character class right there π
if the optional -isa parameter is specified, the list gets further restricted to objects that have the given className anywhere in their heritage. like, not just who they are β who their whole family tree is π§¬
and same naming rules as above, bestie: if an object lives in the current namespace context, this command reports its simple name β no qualifiers. but if the pattern contains :: qualifiers, or if the object lives in another context, you get the fully-qualified name instead. so for a fully-qualified everything list:
itcl::find objects ::*
obsessed. truly. π
π KEYWORDS π
class, object, search, import
quick lil reminder bestie: classes and objects get reported first in the active namespace, then in all other namespaces β and if you need fully-qualified names everywhere, that::*pattern is your girl. don't forget the::qualifiers change how names get reported! π
and that's the whole page, no notes π this came out of itcl version 3.0 and it's the find(n) page β go forth and find your classes and objects, bestie, you've got this π β¨π¦πΈ
π¦ where this page comes from
- alpine 3.22: tcl-doc 8.6.16-r0 Β· TCL
- alpine 3.23: tcl-doc 8.6.17-r0 Β· TCL
- alpine 3.23: tcl9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tcl-doc 8.6.17-r1 Β· TCL
- alpine 3.24: tcl9-doc 9.0.3-r2 Β· TCL
- arch rolling: tcl 8.6.16-1 Β· TCL
- fedora 43: itcl 4.3.2-1.fc43 Β· TCL
- fedora 43: itcl 4.3.2-2.fc43 Β· TCL
- fedora 44: itcl 4.3.2-3.fc44 Β· TCL
- nixos 26.05: tcl 9.0.3
- nixpkgs unstable: incrtcl 4.2.3
- nixpkgs unstable: tcl 9.1.0
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· 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