From 007f1962d3caf8f5a6e010577379c05569d7daef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Fern=C3=A1ndez=20Serrata?= <76864299+Rudxain@users.noreply.github.com> Date: Tue, 14 May 2024 19:34:20 -0400 Subject: [PATCH] document `.profile` and `.sh/profile` --- .profile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.profile b/.profile index 782cc02b5ff..7c1593c1648 100644 --- a/.profile +++ b/.profile @@ -6,5 +6,17 @@ if [ -n "$BASH_VERSION" ]; then [ -f "$HOME/.bashrc" ] && \ . "$HOME/.bashrc" else + # If I were to unconditionally source `.sh/profile`, + # I would have to un-source it from `.bash_profile`, + # and rename all Bash startup-files + # to force Bash to source `.profile` instead. + # The problem is, users (including myself) + # would have to rm all Bash startup-files too. . "$HOME/.sh/profile" + # A possible solution to the previous problem, + # is to inline `.sh/profile` into `.profile` and + # make `.bash_profile` source that instead. + # This doesn't seem to have any cons, only pros, + # such as making `.profile` fully POSIX-compliant + # and (mostly) shell-agnostic fi