Skip to content

Commit

Permalink
document .profile and .sh/profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudxain authored May 14, 2024
1 parent 4dc0dc8 commit 007f196
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 007f196

Please sign in to comment.