-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zsh: Re-add sourcing of profile.d files
Source profile.d files again to regain default settings now that they are POSIX compliant
- Loading branch information
Showing
4 changed files
with
24 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
source /usr/share/defaults/etc/zsh/zprofile | ||
|
||
# User specific zsh scripts and functions | ||
if [ -d ~/.zshrc.d ]; then | ||
for rc in ~/.zshrc.d/*; do | ||
if [ -f "$rc" ]; then | ||
. "$rc" | ||
fi | ||
done | ||
unset rc | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,17 @@ | ||
## DO NOT edit this file. Your changes will be overridden on package updates. | ||
# Instead add your changes to a new profile script under /etc/profile.d/ (create this directory if it does not exist) for system wide use or | ||
# ~/.zshrc.d for an individual user | ||
|
||
# Begin /usr/share/defaults/etc/zprofile | ||
|
||
if [ -f /etc/zprofile ]; then | ||
source /etc/zprofile | ||
elif [ -f /etc/zsh/zprofile ]; then | ||
source /etc/zsh/zprofile | ||
fi | ||
|
||
# Source paths that may not be included by systemctl | ||
if [ -f /usr/share/defaults/etc/profile.d/10-path.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/10-path.sh' | ||
fi | ||
|
||
# Source paths not included by systemctl necessary for XDG_DATA_DIRS | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/10-xdg.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/10-xdg.sh' | ||
fi | ||
|
||
# Source paths not included by systemctl necessary for flatpaks to be found in the app menu and run | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/70-flatpak.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/70-flatpak.sh' | ||
fi | ||
|
||
# Source paths not included by systemctl necessary for snaps to be found in the app menu and run | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/70-snapd.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/70-snapd.sh' | ||
fi | ||
|
||
# Source gtk modules variable for menus | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/appmenu-gtk2-module.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/appmenu-gtk2-module.sh' | ||
fi | ||
|
||
# Paths for gawk | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/gawk.sh ]; then | ||
emulate sh -c 'source /usr/share/defaults/etc/profile.d/gawk.sh' | ||
fi | ||
|
||
# Environment for vte, zsh compatible | ||
|
||
if [ -f /usr/share/defaults/etc/profile.d/vte.sh ]; then | ||
source /usr/share/defaults/etc/profile.d/vte.sh | ||
fi | ||
# This should always be sourced regardless of the above files | ||
# Warning: Do not remove the line below, otherwise it will break the integrity of other packages which provide some scripts in /etc/profile.d/. | ||
emulate sh -c 'source /usr/share/defaults/etc/profile' | ||
|
||
# Do not source /etc/profile as Arch does | ||
# This will source all other bash scripts in /etc/profile.d, some of which may not load properly. | ||
# Some may also conflict with zsh frameworks or have other unintended consequences | ||
# Additionally, Solus sources ~/.bashrc.d from /etc/profile which is not obvious to the user or expected in zsh | ||
# End /usr/share/defaults/etc/zprofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters