${(e)…}: Single word shell expansion

(e) performs single word shell expansion on the variable value.

It performs parameter expansion, command substitution, and arithmetic expansion.

Examples

Evaluate shell expansions
1
2
expression='User ${USER} has home $HOME'
echo "'$expression' is expanded into '${(e)expression}'"
Output:
1
'User ${USER} has home $HOME' is expanded into 'User username has home /home/username'
BashSupport Pro 是一款支持 e** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款