Enable (default) or disable ANSI colour support at runtime. Returns the previous state.
Example:
# Example for ansi ansi(false) # disable ANSI
CLI argument count.
Example:
# Example for argc println argc() # e.g., 1
CLI arguments as an array.
Example:
# Example for argv println argv() # e.g., ["file.za","arg1","arg2"]
Set colour scheme for array depth formatting and return previous colours.
Enable/disable pretty array formatting. Default: false, enabled in interactive mode.
Return tokenised phrase representation.
Example:
# Example for ast
println ast("myfunction")
Checks for async completion.
Example:
# Example for await
var h={"job": 1}
println await(h) # list of results
Returns the major version number of the Bash co-process.
Example:
# Example for bash_versinfo println bash_versinfo()
Returns the full release string of the Bash co-process.
Example:
# Example for bash_version println bash_version()
Select if | and =| commands should capture output.
Example:
# Example for capture_shell capture_shell(true)
Clear to the end of the line, starting at row,col in the current pane.
Example:
# Example for clear_line clear_line(10,0)
Get clock ticks from aux file.
Example:
# Example for clktck println clktck() # e.g., 100
Select if | and =| commands should execute in the coprocess (true) or the current Za process (false).
Example:
# Example for coproc coproc(true)
Disables cursor display.
Example:
# Example for cursoroff cursoroff()
Enables cursor display.
Example:
# Example for cursoron cursoron()
Moves cursor to horizontal position n.
Example:
# Example for cursorx cursorx(10)
checks if a constant, variable, or map key is defined in the current scope or USE chain
Displays in-scope variable list.
returns a duplicate copy of argument 1.
Enable or disable local echo. Optionally, set the mask character to be used during input.
[#SOL]Current visibility state is returned when no arguments are provided.
Example:
# Example for echo println echo(false) # disables local echo
returns the values associated with enumeration enum
Example:
# Example for enum_all enum e(ok=0,one,two,three) println enum_all(e) # [0,1,2,3]
returns the name labels associated with enumeration enum
Example:
# Example for enum_names println enum_names(e) # ["ok","one","two","three"]
evaluate expression in string.
Example:
# Example for eval
println eval("1+1") # 2
execute code in string.
Returns the initial working directory.
Example:
# Example for execpath println execpath()
returns true if the arguments satisfy the type list.
a variant is an argument count followed by a list of type_strings.
Register a new exception type in the ex enum with severity level. Returns true if successful, false if exception already exists. Severity levels: emerg, alert, crit, err, warn, notice, info, debug. Used to override default LOG level during exception handling.
formats a stack trace array into a readable string with numbered frames.
Returns a list of standard library functions.
Returns a list of standard library function descriptions.
Returns a list of standard library function inputs.
Example:
# Example for func_inputs println func_inputs() # list of function input names
Returns a list of standard library function outputs.
Find a function handle.
Returns a list of standard library functions.
reads the column position of console text cursor.
Example:
# Example for get_col println get_col()
Returns the CPU core count.
Example:
# Example for get_cores println get_cores() # e.g., 4
Returns the current heap allocated memory and total system memory usage in MB.
[#SOL]Structure fields are .alloc and .system for allocated space and total system space respectively.
Example:
# Example for get_mem println get_mem().alloc # allocated memory in MB
reads the row position of console text cursor.
Example:
# Example for get_row println get_row() # e.g., 0
Check if tty supports at least 16 colours.
Example:
# Example for has_colour println has_colour() # true/false
Check if a child co-process has been launched.
Example:
# Example for has_shell println has_shell() # true
Check if executing with a tty.
Example:
# Example for has_term println has_term() # true
Returns the home directory of the user that launched Za as reported by the coprocess.
Example:
# Example for home println home() # e.g., "/home/user"
Returns the current hostname.
Example:
# Example for hostname println hostname() # e.g., "myhost"
Returns a list of import errors for an AUTO module. Each error message describes a struct/union that was skipped due to unresolvable fields. Returns empty list if no errors.
Returns true if an AUTO module import had any errors (structs skipped). Useful for quick checks before using optional structs.
Enable (default) or disable string interpolation at runtime.
[#SOL]This is useful for ensuring that braced phrases remain unmolested. Returns the previous state.
Does key key_name exist in associative array ary_name?
Example:
# Example for key
var m={"a":1}
println key(m,"a") # true
Returns an integer corresponding with a keypress.
[#SOL]Internally, the minimum timeout value is currently 1 decisecond.
[#SOL]See the termios(3) man page for reasoning about VMIN/VTIME.
Example:
# Example for keypress println keypress(1000) # (waits for keypress, returns code)
Returns the locale name used within the coprocess.
Example:
# Example for lang println lang() # e.g., en_GB.UTF-8
Returns the last received error code from a co-process command.
Returns the last received error text from the co-process.
Returns length of string or list.
Example:
# Example for len
println len("abcd") # 4
Return this local variable's value.
Returns logging queue status: .used: current queue usage, .total: queue size, .running: worker status, .percentage: usage percentage
Returns comprehensive logging statistics: .queue_used: current queue usage, .queue_total: queue size, .queue_running: worker status, .main_processed: main log requests processed, .web_processed: web access log requests processed
Displays global variable list.
Returns the kernel version name as reported by the coprocess.
Example:
# Example for os println os() # e.g., "Linux 5.4.0-42-generic"
Returns the current pane start column.
Example:
# Example for pane_c println pane_c() # 0
Returns the current pane height.
Example:
# Example for pane_h println pane_h()
Returns the current pane start row.
Example:
# Example for pane_r println pane_r() # 0
Returns the current pane width.
Example:
# Example for pane_w println pane_w() # 80
Calls Go's built-in panic() with the specified message. This tests the panic-to-exception conversion system when error_style() is set to 'exception' or 'mixed'.
Set a run-time behaviour... uninit: should stop for uninitialised variables / dupmod: ignore duplicate imports
[#SOL]exitquiet: shorter error message / shell: permit shell commands / eval: permit eval() calls
[#SOL]interpol: permit string interpolation / cmdfallback: shell call on eval failure (interactive)
[#SOL]permit: enable/disable permit() / exception_strictness: enable/disable exception_strictness call
[#SOL]macro: enable/disable macro statement / sanitisation: enable/disable the sanitisation_enable() call
Example:
# Example for permit
println permit("shell",false)
Return the pid of the current process.
Example:
# Example for pid println pid()
Return the pid of parent process.
Example:
# Example for ppid println ppid() # parent PID
Returns the /etc derived release name.
Example:
# Example for release_id println release_id()
Returns the OS release name as reported by the coprocess.
Example:
# Example for release_name println release_name() # e.g., "Ubuntu"
Returns the OS version number.
Example:
# Example for release_version println release_version()
Returns length of string in runes.
Sets the maximum directory recurse depth in interactive help mode.
Get process ID of the launched child co-process.
Example:
# Example for shell_pid println shell_pid()
returns the size of an object.
Executes command string and returns a command structure (bool==false) or displays (bool==true) the output.
Example:
# Example for system
println system("echo hello",true)
Returns the value of a system variable.
Returns the OS reported terminal type.
Returns the current terminal height.
Example:
# Example for term_h println term_h() # e.g., 24
Returns the current terminal width.
Example:
# Example for term_w println term_w() # e.g., 80
Find this function's name.
Find this function's handle.
Returns a structure containing a list of tokens (.tokens) in a string and a list (.types) of token types.
Example:
# Example for tokens
var t=tokens("a=1")
println t.tokens # ["a","=","1"]
set a responding function for a given trap type.
Currently supported trap types: int, error
Remove a map key. Returns true on successful removal.
Example:
# Example for unmap
var m=map{"a":1,"b":2}
unmap("m","a")
println m # {"b":2}
Returns the parent user of the Bash co-process.
Example:
# Example for user println user() # e.g., "daniel"
Is the current language utf-8 compliant? This only works if the environmental variable LANG is available.
returns the name binding uint for a variable.
Example:
# Example for varbind
println varbind("a") # 1
Is this a WSL terminal?
internal info: .version: semantic version number, .name: language name, .build: build type
Returns the zsh version string if present.
Example:
# Example for zsh_version println zsh_version() # e.g., 5.8