zsh-setup: applied patch from Frank Terbeck for improved
[grml-etc-core.git] / etc / zsh / zshrc
index 99642aa..131a19b 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mit Okt 25 23:44:27 CEST 2006 [mika]
+# Latest change: Son Okt 29 17:49:13 CET 2006 [mika]
 ################################################################################
 # This file is sourced only for interactive shells. It
 # should contain commands to set up aliases, functions,
     return 1
   }
 
+  if isgrml ; then
+    isgrmlsmall() {
+    [[ ${${${(f)"$(</etc/grml_version)"}%% *}##*-} == 'small' ]] && return 0 ; return 1
+  }
+  else
+    isgrmlsmall() { return 1 }
+  fi
+
 # check for user, if not running as root set $SUDO to sudo
  (( EUID != 0 )) && SUDO='sudo' || SUDO=''
 
@@ -55,7 +63,6 @@
 
 # {{{ set some variables
   export EDITOR=${EDITOR:-vim}
-  export SHELL=${SHELL:-/bin/zsh}
   export MAIL=${MAIL:-/var/mail/$USER}
   [[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less'
   [[ -x /usr/bin/dircolors ]] && eval `dircolors -b`
@@ -289,9 +296,11 @@ fi
   # run 'NOPRECMD=1 zsh' to disable the precmd + preexec commands
   is4 && ! [[ -n "$NOPRECMD" ]] && precmd () {
       if [ -n "$BATTERY" ] ; then
-        RPROMPT="%(?..:()% ${PERCENT}${SCREENTITLE}"
+        # RPROMPT="%(?..:()% ${PERCENT}${SCREENTITLE}"
+        RPROMPT="${PERCENT}${SCREENTITLE}"
       else
-        RPROMPT="%(?..:()% ${SCREENTITLE}"
+        # RPROMPT="%(?..:()% ${SCREENTITLE}"
+        RPROMPT="${SCREENTITLE}"
       fi
       # adjust title of xterm
       # see http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
@@ -691,8 +700,8 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"."
   setenv()  { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" }  # csh compatibility
   freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
   manzsh()  {  /usr/bin/man zshall |  vim -c "se ft=man| se hlsearch" +/"$1" - ; }
+#  manzsh()  { /usr/bin/man zshall |  most +/"$1" ; }
 #  manzsh()  { man zshall | $MYLESS -p $1 ; }
-#  manzsh() {  /usr/bin/man zshall |  most +/"$1" ; }
 
 # use "dchange <package-name>" to view Debian's changelog of the package:
   dchange() {