Skip to content

Commit

Permalink
zsh: Re-add sourcing of profile.d files
Browse files Browse the repository at this point in the history
Source profile.d files again to regain default settings now that they are POSIX compliant
  • Loading branch information
Tracey Clark committed Nov 12, 2024
1 parent 750abec commit 231d736
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 48 deletions.
47 changes: 2 additions & 45 deletions packages/z/zsh/files/zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,5 @@ 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

# 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
# This should always be sourced regardless of the above files
emulate sh -c 'source /usr/share/defaults/etc/profile'
2 changes: 1 addition & 1 deletion packages/z/zsh/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : zsh
version : '5.9'
release : 34
release : 35
source :
- https://sourceforge.net/projects/zsh/files/zsh/5.9/zsh-5.9.tar.xz : 9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5
homepage : https://www.zsh.org/
Expand Down
4 changes: 2 additions & 2 deletions packages/z/zsh/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,8 @@
</Files>
</Package>
<History>
<Update release="34">
<Date>2024-11-11</Date>
<Update release="35">
<Date>2024-11-12</Date>
<Version>5.9</Version>
<Comment>Packaging update</Comment>
<Name>Tracey Clark</Name>
Expand Down

0 comments on commit 231d736

Please sign in to comment.