mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Merge 40cafea102 into 397c085a19
This commit is contained in:
commit
cd796c97d2
1 changed files with 34 additions and 0 deletions
|
|
@ -36,4 +36,38 @@ plugins=(git)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# Provide pathmunge for /etc/profile.d scripts
|
||||||
|
pathmunge()
|
||||||
|
{
|
||||||
|
if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then
|
||||||
|
if [ "$2" = "after" ] ; then
|
||||||
|
PATH=$PATH:$1
|
||||||
|
else
|
||||||
|
PATH=$1:$PATH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_src_etc_profile_d()
|
||||||
|
{
|
||||||
|
# Make the *.sh things happier, and have possible ~/.zshenv options like
|
||||||
|
# NOMATCH ignored.
|
||||||
|
emulate -L ksh
|
||||||
|
|
||||||
|
|
||||||
|
# from bashrc, with zsh fixes
|
||||||
|
if [[ ! -o login ]]; then # We're not a login shell
|
||||||
|
for i in /etc/profile.d/*.sh; do
|
||||||
|
if [ -r "$i" ]; then
|
||||||
|
. $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
unset i
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
_src_etc_profile_d
|
||||||
|
|
||||||
|
unset -f pathmunge _src_etc_profile_d
|
||||||
|
|
||||||
# Customize to your needs...
|
# Customize to your needs...
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue