Remove startx and xinit functions
[grml-etc-core.git] / etc / zsh / zshrc
index ad5357c..068e10c 100644 (file)
 # Global Order: zshenv, zprofile, zshrc, zlogin
 ################################################################################
 
+# USAGE
+# If you are using this file as your ~/.zshrc file, please use ~/.zshrc.pre
+# and ~/.zshrc.local for your own customisations. The former file is read
+# before ~/.zshrc, the latter is read after it. Also, consider reading the
+# refcard and the reference manual for this setup, both available from:
+#     <http://grml.org/zsh/>
+
 # Contributing:
 # If you want to help to improve grml's zsh setup, clone the grml-etc-core
 # repository from git.grml.org:
@@ -506,7 +513,7 @@ fi
 isdarwin && xsource /sw/bin/init.sh
 
 # load our function and completion directories
-for fdir in /usr/share/grml/zsh/completion /usr/share/grml/functions; do
+for fdir in /usr/share/grml/zsh/completion /usr/share/grml/zsh/functions; do
     fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} )
     if [[ ${fpath} == '/usr/share/grml/zsh/functions' ]] ; then
         for func in ${fdir}/**/[^_]*[^~](N.) ; do
@@ -1988,6 +1995,10 @@ else
     zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "%b${RED}:${YELLOW}%r"
 fi
 
+if [[ -o restricted ]]; then
+    zstyle ':vcs_info:*' enable false
+fi
+
 # }}}
 
 # command not found handling {{{
@@ -2621,28 +2632,6 @@ grmlcomp() {
 # {{{ grmlstuff
 grmlstuff() {
 # people should use 'grml-x'!
-    startx() {
-        if [[ -e /etc/X11/xorg.conf ]] ; then
-            [[ -x /usr/bin/startx ]] && /usr/bin/startx "$@" || /usr/X11R6/bin/startx "$@"
-        else
-            echo "Please use the script \"grml-x\" for starting the X Window System
-because there does not exist /etc/X11/xorg.conf yet.
-If you want to use startx anyway please call \"/usr/bin/startx\"."
-            return -1
-        fi
-    }
-
-    xinit() {
-        if [[ -e /etc/X11/xorg.conf ]] ; then
-            [[ -x /usr/bin/xinit ]] && /usr/bin/xinit || /usr/X11R6/bin/xinit
-        else
-            echo "Please use the script \"grml-x\" for starting the X Window System.
-because there does not exist /etc/X11/xorg.conf yet.
-If you want to use xinit anyway please call \"/usr/bin/xinit\"."
-            return -1
-        fi
-    }
-
     if check_com -c 915resolution; then
         855resolution() {
             echo "Please use 915resolution as resolution modifying tool for Intel \
@@ -3132,6 +3121,7 @@ if (( GRML_ALWAYS_LOAD_ALL == 0 )) && (( $EUID == 0 )) ; then
     return 0
 fi
 
+zrcautoload lookupinit && lookupinit
 
 # variables {{{
 
@@ -3369,7 +3359,7 @@ bk() {
 #f5# Copied diff
 cdiff() {
     emulate -L zsh
-    diff -crd "$*" | egrep -v "^Only in |^Binary files "
+    diff -crd "$@" | egrep -v "^Only in |^Binary files "
 }
 #f5# cd to directoy and list files
 cl() {