How do I start a bash subprocess with a changed prompt. Using env does not work:
env PS1="change >" bash --login
does not work. The result should be the same as using export after the process is started:
$ export PS1="change >"
change >
~/.bashrc
has to be evaluated as usual.
Another solution would be:
bash --rcfile <(cat ~/.bashrc; echo 'PS1="change > "')
This keeps the aliases and co by executing and "extended" version of the users startupfile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With