Move MANPAGER .profile to .bashrc #46
Labels
No labels
bug
documentation
duplicate
enhancement
help wanted
invalid
maintenance
obsolete
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
yestax/setup#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
.profile (.bash_profile) is meant to be run once when logging in. To set up environment.
.bashrc is meant to be read at every new shell open.
When starting a non-login shell, MANPAGER isn't set and so can't be used.
The thing is:
2 cases:
Opening a terminal through ssh
start an interractive login shell: search for .bash_profile, .bash_login, .profile (in this order) other are ignored
Debian: only .profile and .bashrc -> .profile source .bashrc. File sourced .profile and .bashrc
Fedora: default .bash_profile and .bashrc -> .bash_profile source .bashrc. File sourced .bash_profile and .bashrc (no .profile)
Opening a terminal directly on computer
start an interactive non-login shell:
Subsequent open: start an interactive non-login shell: search for .bashrc
Debian: file sourced .bashrc
Fedora: file sourced .bashrc
So .profile is not sourced directly on computer.
.profile is meant for things that must be done only one time at login
.bashrc are things that must be enabled within the shell every-time.
MANPAGER falls in the latter category
Move MANPAGER .profile to .bashrc if possibleto Move MANPAGER .profile to .bashrc