rpms/zsh/F-13 zsh.spec,1.63,1.64 zshrc.rhs,1.12,1.13

James Antill james at fedoraproject.org
Mon Mar 22 14:09:38 UTC 2010


Author: james

Update of /cvs/pkgs/rpms/zsh/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv29668

Modified Files:
	zsh.spec zshrc.rhs 
Log Message:
* Mon Mar 22 2010 James Antill <james at fedoraproject.org> - 4.3.10-5
- Add pathmunge to our /etc/zshrc, for profile.d compat.
- Resolves: bug#548960



Index: zsh.spec
===================================================================
RCS file: /cvs/pkgs/rpms/zsh/F-13/zsh.spec,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -p -r1.63 -r1.64
--- zsh.spec	7 Aug 2009 15:45:10 -0000	1.63
+++ zsh.spec	22 Mar 2010 14:09:37 -0000	1.64
@@ -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 at 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 at fedoraproject.org> - 4.3.10-4
 - Allow --excludedocs command to work!
 - Resolves: bug#515986


Index: zshrc.rhs
===================================================================
RCS file: /cvs/pkgs/rpms/zsh/F-13/zshrc.rhs,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- zshrc.rhs	31 Jan 2008 14:38:48 -0000	1.12
+++ zshrc.rhs	22 Mar 2010 14:09:37 -0000	1.13
@@ -15,6 +15,18 @@ PROMPT='[%n@%m]%~%# '    # default promp
 # 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
 



More information about the scm-commits mailing list