【发布时间】:2012-04-28 01:08:29
【问题描述】:
当我创建一个新的 bash 进程时,提示默认为一个非常简单的提示。 我知道我可以编辑 .bashrc 等来更改它,但是有没有办法通过 bash 命令传递提示?
谢谢!
【问题讨论】:
-
你可以在你的
~/.bashrc中设置PS1 -
只是添加我对这个问题的表述,因为我很难找到它:“在 bash 启动时从命令行覆盖 PS1”;也相关executing a custom init script for bash --login -i for example to change to a custom directory from a shortcut - Stack Overflow