[arch-general] Best way to customize PS1
Hi, with the last update of bash I realized that it overwrites /etc/bash.bashrc without .pacsave or .pacnew. Since I had customizations in /etc/bash.bashrc I am wondering now where to put those customizations instead. I understand that /etc/profile and /etc/profile.d/* is a good place to customize environment variables. But it is not good for setting PS1 (and aliases by the way). PS1 is also set to a default value in /etc/bash.bashrc. And since /etc/bash.bashrc is sourced after all the /etc/profile* stuff it overwrites the customization. So what is the best place to customize PS1? /etc/skel/ is no solution since it only takes effect when a new user is created. /etc/environment is no good solution since it does not support if/then conditions. And, by the way, why is the bash package not making use of.pacsave/.pacnew. A simple "backup etc/bash.bashrc" in .PKGINFO would help a lot. There is also an old issue in the tracker talking about the "/etc/bash.bashrc overwrite" topic: https://bugs.archlinux.org/task/21540 But without solution. Matthias
On 06/19/2018 02:05 AM, Matthias Bodenbinder wrote:
with the last update of bash I realized that it overwrites /etc/bash.bashrc without .pacsave or .pacnew. Since I had customizations in /etc/bash.bashrc I am wondering now where to put those customizations instead.
You're incorrect, use /etc/bash.bashrc
And, by the way, why is the bash package not making use of.pacsave/.pacnew. A simple "backup etc/bash.bashrc" in .PKGINFO would help a lot.
It is.
There is also an old issue in the tracker talking about the "/etc/bash.bashrc overwrite" topic: https://bugs.archlinux.org/task/21540 But without solution.
The bug report was correctly closed due to, at the time, there being a better solution. Since that time, bash.bashrc was marked as a backup file and the referenced bashrc.local file was removed. This was back in 2011. For the past 7.5 years, /etc/bash.bashrc has been the canonical place to make custom bash-specific modifications, due to it being *correctly* marked as a backup file. I've got no clue why you think it isn't one. -- Eli Schwartz Bug Wrangler and Trusted User
Am 19.06.2018 um 08:13 schrieb Eli Schwartz via arch-general:
On 06/19/2018 02:05 AM, Matthias Bodenbinder wrote:
with the last update of bash I realized that it overwrites /etc/bash.bashrc without .pacsave or .pacnew. Since I had customizations in /etc/bash.bashrc I am wondering now where to put those customizations instead.
You're incorrect, use /etc/bash.bashrc
And, by the way, why is the bash package not making use of.pacsave/.pacnew. A simple "backup etc/bash.bashrc" in .PKGINFO would help a lot.
It is.
Thank you very much for this info. In fact, I have to admit that I am a Manjaro user and I was under the impression that the bash package comes from the arch repo. Please except my apologise for this. I will have to find out now why the Manjaro package maintainer removed the "backup etc/bash.bashrc" line. Thanks Matthias
Op di 19 jun. 2018 10:11 schreef Matthias Bodenbinder < matthias@bodenbinder.de>:
[...]
In fact, I have to admit that I am a Manjaro user and I was under the impression that the bash package comes from the arch repo. Please except my apologise for this.
In that case, next time, please use the Manjaro channels. Arch is upstream for them and they will know the way. Also, I'm not a dev, but it took me less then a minute to lookup the Arch PKGBUILD and check the version history. You could have done the same... (don't know about Manjaro for that matter though). With apologies for any sharp undertones. ;) Mvg, Guus Snijders
Op di 19 jun. 2018 08:05 schreef Matthias Bodenbinder < matthias@bodenbinder.de>:
Hi,
with the last update of bash I realized that it overwrites /etc/bash.bashrc without .pacsave or .pacnew.
I think you (or $tool_you_used) removed the .pacsave or you hit some pacman/$tool bug; /etc/bash.bashrc is in the backupline of the PKGBUILD and has been for a long time at least. Anyway, just restore the file from your backup and/or version control system. Don't have one of those yet? Welcome to the wonderful world of system administration ;). Mvg, Guus Snijders
participants (3)
-
Eli Schwartz
-
Guus Snijders
-
Matthias Bodenbinder