Special Variables¶
A number of special variables exist for using within tackle files to gain access to common things.
Directories and Files¶
cwd
- Current working directoryhome_dir
- Home directorycalling_directory
- The directory tackle was called fromcalling_file
- The path to the tackle file that was first calledcurrent_directory
- The directory of the file being parsedcurrent_file
- The path to the current file being parsedtackle_dir
- Directory where tackle config is, defaults to~/.config/tackle
providers_dir
- Directory where tackle providers are, defaults to~/.config/tackle/providers
xdg_config_dirs
- XDG config dirs- ie ~/.config on linux - the base of the tackle dirxdg_cache_home
- XDG cache dirxdg_config_home
- XDG config homexdg_data_dirs
- XDG data dirsxdg_data_home
- XDG data dirxdg_runtime_dir
- XDG runtime dirxdg_state_home
- XDG state home
System Properties¶
system
- OS (ieDarwin
,Linux
,Windows
). Same as python'splatform.system()
platform
- OS with kernel, ieLinux-5.8.0-45-generic-x86_64-with-glibc2.29
version
- Kernel's release, ie#51~20.04.1-Ubuntu SMP Tue Feb 23 13:46:31 UTC 2021
processor
- Processor architecture, iex86_64
. Same asplatform.processor()
architecture
- Further architecture info, ie('64bit', 'ELF')
lsb_release
- Same as linux's lsb_release, ieUbuntu 20.04.4 LTS (Focal Fossa)
Tackle Internals¶
See memory management docs for more details on the differences between contexts.
this
- The public context from normal keys and hooks called with->
public_context
- The public context from normal keys and hooks called with->
private_context
- The private context from hooks called with_>
existing_context
- The existing context passed into blockstemporary_context
- The temporary context when parsing blockskey_path
- A list of keys to identify position in documentkey_path_block
- Same as key path but normalized for being within a block