* /etc/zsh/zshrc: added isgrmlsmall() and set $EDITOR
authorMichael Prokop <mika@grml.org>
Sat, 28 Oct 2006 14:22:08 +0000 (16:22 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 28 Oct 2006 14:22:08 +0000 (16:22 +0200)
    according to grml flavour, thanks - Frank Terbeck!

debian/changelog
etc/zsh/zshrc

index a219fcc..2e6bec2 100644 (file)
@@ -1,3 +1,10 @@
+grml-etc-core (0.1-29) unstable; urgency=low
+
+  * /etc/zsh/zshrc: added isgrmlsmall() and set $EDITOR
+    according to grml flavour, thanks - Frank Terbeck!
+
+ -- Michael Prokop <mika@grml.org>  Sat, 28 Oct 2006 16:21:34 +0200
+
 grml-etc-core (0.1-28) unstable; urgency=low
 
   * /etc/skel/.zshrc: always set 'setopt local_options' if
index df82488..70783ba 100644 (file)
     return 1
   }
 
+  isgrmlsmall() {
+    [[ ${${${(f)"$(</etc/grml_version)"}%% *}##*-} == 'small' ]] && return 0 ; return 1
+  }
+
 # check for user, if not running as root set $SUDO to sudo
  (( EUID != 0 )) && SUDO='sudo' || SUDO=''
 
@@ -54,8 +58,7 @@
 # }}}
 
 # {{{ set some variables
-  export EDITOR=${EDITOR:-vim}
-#  export SHELL=${SHELL:-/bin/zsh}
+  isgrmlsmall && export EDITOR=${EDITOR:-vi} || export EDITOR=${EDITOR:-vim}
   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`