zshrc: Do not set `localoptions' in `xsource()'
[grml-etc-core.git] / etc / zsh / zshrc
index da60016..c1cc68d 100644 (file)
@@ -417,14 +417,13 @@ fi
 
 # Check if we can read given files and source those we can.
 xsource() {
-    emulate -L zsh
     if (( ${#argv} < 1 )) ; then
         printf 'usage: xsource FILE(s)...\n' >&2
         return 1
     fi
 
     while (( ${#argv} > 0 )) ; do
-        [[ -r $1 ]] && source $1
+        [[ -r "$1" ]] && source "$1"
         shift
     done
     return 0
@@ -513,7 +512,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
@@ -2632,28 +2631,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 \