From: Michael Prokop Date: Sat, 17 May 2008 20:53:46 +0000 (+0200) Subject: Add support for ${HOME}/.zshenv; set $PATH on Solaris/SunOS X-Git-Tag: 0.3.51~7^2~4 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=fc0aa71a93f54482517a96e01c200ffbdad825e5 Add support for ${HOME}/.zshenv; set $PATH on Solaris/SunOS --- diff --git a/debian/changelog b/debian/changelog index 7f0972c..83e751b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,13 @@ grml-etc-core (0.3.51) unstable; urgency=low + [ Frank Terbeck ] * zshrc: Add persistent dirstack support for shells older than 4.2.0 - -- Frank Terbeck Wed, 26 Mar 2008 13:57:12 +0100 + [ Michael Prokop ] + * zshrc: Add support for ${HOME}/.zshenv. + * zshenv: set $PATH on Solaris/SunOS. + + -- Michael Prokop Sat, 17 May 2008 22:53:04 +0200 grml-etc-core (0.3.50) unstable; urgency=low diff --git a/etc/zsh/zshenv b/etc/zsh/zshenv index 4285f4f..ab5c0fd 100644 --- a/etc/zsh/zshenv +++ b/etc/zsh/zshenv @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Sat Mar 22 00:37:25 CET 2008 [mika] +# Latest change: Sam Mai 17 22:52:27 CEST 2008 [mika] ################################################################################ # This file is sourced on all invocations of the shell. # It is the 1st file zsh reads; it's read for every shell, @@ -21,6 +21,11 @@ # Global Order: zshenv, zprofile, zshrc, zlogin ################################################################################ +# support ${HOME}/.zshenv: +if [[ -z "$ALREADY_SOURCED_ZSHENV" ]] ; then + export ALREADY_SOURCED_ZSHENV=1 +fi + # language settings (read in /etc/environment before /etc/default/locale as # the latter one is the default on Debian nowadays) # no xsource() here because it's only created in zshrc! (which is good) @@ -70,13 +75,13 @@ else fi fi -# Solaris -# case $(uname 2>/dev/null) in -# SunOS) -# PATH="/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/bin:/usr/local/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ucb:/usr/proc/bin:~/bin" -# # LD_LIBRARY_PATH="/opt/csw/lib:/opt/sfw/lib:/usr/lib:/usr/local/lib:/usr/ccs/lib:/usr/openwin/lib:/usr/ucb/lib" -# # MANPATH="$MANPATH:/opt/csw/man:/usr/man:/usr/share/man:/usr/local/man:/opt/sfw/man" -#esac +# Solaris +case $(uname 2>/dev/null) in + SunOS) + PATH="/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/sfw/bin:/usr/gnu/bin:/usr/openwin/bin:/opt/csw/bin:/opt/swf/bin:/sbin:/usr/sbin:~/bin" + # LD_LIBRARY_PATH="/opt/csw/lib:/opt/sfw/lib:/usr/lib:/usr/local/lib:/usr/ccs/lib:/usr/openwin/lib:/usr/ucb/lib" + # MANPATH="$MANPATH:/opt/csw/man:/usr/man:/usr/share/man:/usr/local/man:/opt/sfw/man" +esac # less (:=pager) options: # export LESS=C diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 9a2a6c8..d50f72c 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Feb 11 18:00:55 CET 2008 [mika] +# Latest change: Sam Mai 17 22:52:34 CEST 2008 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -352,7 +352,7 @@ zrcautoload is-at-least || is-at-least() { return 1 } # locale setup {{{ if [[ -z "$LANG" ]] ; then - xsource "/etc/default/locale" + xsource "/etc/default/locale" fi export LANG=${LANG:-en_US.iso885915} @@ -2019,6 +2019,7 @@ for color in BLUE RED GREEN CYAN WHITE ; unset $color # source another config file if present {{{ xsource "/etc/zsh/zshrc.local" +xsource "${HOME}/.zshenv" # }}} # "persistent history" {{{