is
Source code
This file contains functions for checking types
Index
is::array
bashrust
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
bashrust
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
bashrust
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
is::tty
bashrust
Check if terminal is a tty
Example
Exit codes
- 0: If the terminal is a tty
- 1: If the terminal is not a tty
Was this section helpful?