我已将最后一个命令的返回值添加到PS1我的.bashrc.
PS1
.bashrc
现在我只想在值不为零时才显示它。
Android 的外壳有它:
${| local e=$? (( e )) && REPLY+="$e|" return $e }
问题:如何将其转换为 bash?
shell bash prompt
bash ×1
prompt ×1
shell ×1