variable

BASH_ALIASES

Associative view of Bash alias definitions. Adding entries changes the alias list; unsetting the special variable removes its special properties. Prefer alias and unalias to manage aliases.

Formal Syntax & Structure

bash syntaxbash
${BASH_ALIASES[name]}

Return Value

alias value

Associative view of Bash alias definitions. Adding entries changes the alias list; unsetting the special variable removes its special properties. Prefer alias and unalias to manage aliases.

Working Example

Example Snippetbash
alias bm_probe='printf ready'printf '%s\n' "${BASH_ALIASES[bm_probe]}"unalias bm_probe[[ ! -v 'BASH_ALIASES[bm_probe]' ]] && printf 'removed\n'
Bash Reference