- Add pathmunge to our /etc/zshrc, for profile.d compat.

- Resolves: bug#548960
This commit is contained in:
James Antill 2010-03-22 14:06:04 +00:00
parent 5d161d7dac
commit 901bc018e6
2 changed files with 18 additions and 2 deletions

View File

@ -3,7 +3,7 @@
Summary: A powerful interactive shell
Name: zsh
Version: 4.3.10
Release: 4%{?dist}
Release: 5%{?dist}
License: BSD
URL: http://zsh.sunsite.dk/
Group: System Environment/Shells
@ -175,6 +175,10 @@ fi
%doc Doc/*.html
%changelog
* Mon Mar 22 2010 James Antill <james@fedoraproject.org> - 4.3.10-5
- Add pathmunge to our /etc/zshrc, for profile.d compat.
- Resolves: bug#548960
* Fri Aug 7 2009 James Antill <james@fedoraproject.org> - 4.3.10-4
- Allow --excludedocs command to work!
- Resolves: bug#515986

View File

@ -15,6 +15,18 @@ PROMPT='[%n@%m]%~%# ' # default prompt
# bindkey -e # emacs key bindings
bindkey ' ' magic-space # also do history expansion on space
# 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
@ -34,5 +46,5 @@ _src_etc_profile_d()
}
_src_etc_profile_d
unset -f _src_etc_profile_d
unset -f pathmunge _src_etc_profile_d