小编Sam*_*bib的帖子

"${debian_chroot:+($debian_chroot)} 对比 ${debian_chroot}"

在 ~/.bashrc 我有

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
Run Code Online (Sandbox Code Playgroud)

相反为什么不能

PS1='${debian_chroot}\u@\h:\w\$ '
Run Code Online (Sandbox Code Playgroud)

它会完成同样的事情。不是吗?

bash shell-script

5
推荐指数
1
解决办法
212
查看次数

标签 统计

bash ×1

shell-script ×1