Commit 3e9c6a84 authored by Axel Beckert's avatar Axel Beckert

Support run-parts alike /etc/zsh/zshrc.d/ and friends

parent f629d4ee
......@@ -7,3 +7,15 @@
# msgs, from, etc.)
#
# Global Order: zshenv, zprofile, zshrc, zlogin
() {
setopt localoptions EXTENDED_GLOB CSH_NULL_GLOB
if [[ -d /etc/zsh/zlogin.d ]]; then
for zlogin_snipplet in /etc/zsh/zlogin.d/[0-9][0-9]-*[^~] ; do
if [[ "${zlogin_snipplet:e}" != zwc ]]; then
source $zlogin_snipplet
fi
done
fi
}
# /etc/zsh/zlogout: system-wide .zlogout file for zsh(1).
() {
setopt localoptions EXTENDED_GLOB CSH_NULL_GLOB
if [[ -d /etc/zsh/zlogout.d ]]; then
for zlogout_snipplet in /etc/zsh/zlogout.d/[0-9][0-9]-*[^~] ; do
if [[ "${zlogout_snipplet:e}" != zwc ]]; then
source $zlogout_snipplet
fi
done
fi
}
......@@ -5,3 +5,15 @@
# shells invoked with the -l flag.)
#
# Global Order: zshenv, zprofile, zshrc, zlogin
() {
setopt localoptions EXTENDED_GLOB CSH_NULL_GLOB
if [[ -d /etc/zsh/zprofile.d ]]; then
for zprofile_snipplet in /etc/zsh/zprofile.d/[0-9][0-9]-*[^~] ; do
if [[ "${zprofile_snipplet:e}" != zwc ]]; then
source $zprofile_snipplet
fi
done
fi
}
......@@ -16,3 +16,15 @@ if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
then
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi
() {
setopt localoptions EXTENDED_GLOB CSH_NULL_GLOB
if [[ -d /etc/zsh/zshenv.d ]]; then
for zshenv_snipplet in /etc/zsh/zshenv.d/[0-9][0-9]-*[^~] ; do
if [[ "${zshenv_snipplet:e}" != zwc ]]; then
source $zshenv_snipplet
fi
done
fi
}
......@@ -86,3 +86,15 @@ zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
(( ${+aliases[run-help]} )) && unalias run-help
autoload -Uz run-help
() {
setopt localoptions EXTENDED_GLOB CSH_NULL_GLOB
if [[ -d /etc/zsh/zshrc.d ]]; then
for zshrc_snipplet in /etc/zsh/zshrc.d/[0-9][0-9]-*[^~] ; do
if [[ "${zshrc_snipplet:e}" != zwc ]]; then
source $zshrc_snipplet
fi
done
fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment