SHTK_IMPORT(3)
π NAME π
shtk_import β Loads an shtk module, bestie. Yep, this is the SHTK_IMPORT(3) page and we're making it adorable. π«Ά
π LIBRARY π
Built-in function; automatically loaded. No cap, it's already here for you. β¨
πΈ SYNOPSIS πΈ
shtk_import module
π§ DESCRIPTION π§
Okay so shtk_import imports the shtk module specified by module into the currently-running script. Requests to import a module are idempotent, so it's totally acceptable to import the same module multiple times. (Idempotent = doing it again doesn't break the vibe. π
)
Modules are first searched for in the collection of directories provided by the user in the colon-separated environment variable SHTK_MODULESPATH. If this variable is not defined, or if the module is not found in any of the specified directories, then the built-in directory /nix/store/risfks95a9rh0wddw5yr65c7xzcabf8j-shtk-1.7/share/shtk is used. π
Because shell scripts have no namespaces, an import of a module makes the module available script-wide regardless of where the import happens. Therefore, it is possible for an import of a module to import other modules, and for those indirectly-imported modules to be visible in your script. Good programming practice dictates that you should not rely on these implicit imports and always explicitly declare all the modules you use. (Like, be a main character who explicitly declares every module they use. π)
π¨ ERRORS π¨
The requested module must exist, so shtk_import aborts execution if the module is not present. No module, no service, bestie. π
π ENVIRONMENT π
SHTK_MODULESDIRβ Overrides the built-in location of the modules. Defaults to/nix/store/risfks95a9rh0wddw5yr65c7xzcabf8j-shtk-1.7/share/shtk. πSHTK_MODULESPATHβ Colon-separated list of directories in which to look for modules.SHTK_MODULESDIRis always implied at the end of the path. The user can define this variable to point to other directories. This is especially handy in packages that install custom modules and want to use such modules before installing them. π¦
π FILES π
/nix/store/risfks95a9rh0wddw5yr65c7xzcabf8j-shtk-1.7/share/shtk/β Location of the built-inshtk_importmodules. π
π SEE ALSO π
π°οΈ HISTORY π°οΈ
shtk_import first appeared in shtk 1.0. β
π That's the whole page, bestie! This SHTK_IMPORT(3) manpage comes from Debian, dated November 4, 2014, and the built-in path above is shtk 1.7. Byeee! π
β¨
π¦ where this page comes from
- nixos 26.05: shtk 1.7
- Copyright 2014 Google Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms