is
Source code
This file contains functions for checking types
Index
is::tty
Check if terminal is a tty
Example
Exit codes
- 0: If the terminal is a tty
- 1: If the terminal is not a tty
is::array
Check if a variable is an array
Example
Arguments
- $1 (string): variable name
Exit codes
- 0: If the variable is an array
- 1: If the variable is not an array
is::uninitialized
Check if a variable is uninitialized
Example
Arguments
- $1 (string): variable name
Exit codes
- 0: If the variable is uninitialized
- 1: If the variable is initialized
is::set
Check if a variable is set (initialized)
Example
Arguments
- $1 (string): variable name
Exit codes
- 0: If the variable is set
- 1: If the variable is not set
Was this section helpful?