platform::shell(3tcl)
π platform::shell β the vibe check for other Tcl shells π
okay so bestie, this page lives in the Tcl Bundled Packages corner of the manual, section 3tcl, and the whole package is literally called platform::shell. It's the "System identification support code and utilities" situation, and no cap it's kinda iconic for what it does.
β¨ SYNOPSIS β¨
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
πΈ DESCRIPTION πΈ
The platform::shell package hands you several utility commands that are very useful for figuring out the architecture of one specific Tcl shell. Like, not the shell you're in β a whole other one. π¦
Here's the tea: this package lets you identify the architecture of a Tcl shell that is different from the shell currently running the package. The only requirement (the bare minimum, the absolute lowest bar) is that the other shell β the one you point at by its path β is actually executable on the machine you're on right now. That's it. That's the whole ask. π
And yeah, on most platforms the architecture of the shell you're interrogating turns out to be identical to the architecture of the shell you're running in. But bestie, that is not generally true, and I need you to sit with that for a sec. π
The counter example (the classic one, the one everyone brings up): platforms that have both 32 and 64 bit variants, where a 64bit system is perfectly capable of running 32bit code. In those cases the running shell and the interrogated shell can have different 32/64 bit settings, and therefore totally different identifiers. Not the same vibe at all. π
Why do we even care? For applications like a code repository, it's genuinely important to identify the architecture of the shell that will actually run the installed packages, versus the architecture of the shell that's out here running the repository software. Two different jobs, two different shells, and you need to know which is which. π₯
π COMMANDS π
platform::shell::identifyshell β Does the same identification asplatform::identify, except it does it for the specified Tcl shell instead of the running shell. Same energy, different target. β¨platform::shell::genericshell β Does the same identification asplatform::generic, but again, for the specified Tcl shell rather than the running shell. πplatform::shell::platformshell β Returns the contents oftcl_platform(platform)for the specified Tcl shell. That's it, that's the whole function, and it ate. β
π KEYWORDS π
operating system, cpu architecture, platform, architecture
k bye bestie, this was platform::shell version 1.1.4, from the Tcl Bundled Packages manual, page platform::shell(3tcl) β mwah, go identify some shells ππ«Ά
π¦ where this page comes from
- debian trixie: tcl9.0-doc 9.0.1+dfsg-2
- ubuntu questing: tcl9.0-doc 9.0.2+dfsg-1
- ubuntu resolute: tcl9.0-doc 9.0.3+dfsg-1
- ubuntu stonking: tcl9.0-doc 9.0.4+dfsg-1
- Copyright (c) 2006-2008 ActiveState Software Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms