zshrc: Set options a lot earlier and include no_sh_wordsplit
authorFrank Terbeck <ft@bewatermyfriend.org>
Sun, 7 Jun 2009 19:11:40 +0000 (21:11 +0200)
committerFrank Terbeck <ft@bewatermyfriend.org>
Wed, 8 Jul 2009 11:24:24 +0000 (13:24 +0200)
We do need the version-checking functions and we also want .zshrc.pre to
be sourced.

We are also setting no_sh_wordsplit now. Doing that gives us a
reasonable set of options for our zshrc to be sourced.

debian/changelog
etc/zsh/zshrc

index ad2ebe3..85c0a80 100644 (file)
@@ -9,12 +9,13 @@ grml-etc-core (0.3.73) UNRELEASED; urgency=low
   * zshrc: Get rid of whence, once and for all.
   * zshrc: Insert a condition for loading /etc/default/locale
     [Closes: issue706]
+  * zshrc: Set options a lot earlier and include noshwordsplit explicitly.
 
   [ Michael Prokop ]
   * zshrc: add deborphan, pal and hnb to compdef _gnu_generic. Thanks for
     the suggestion to Carsten Hey.
 
- -- Frank Terbeck <ft@grml.org>  Wed, 08 Jul 2009 13:15:23 +0200
+ -- Frank Terbeck <ft@grml.org>  Wed, 08 Jul 2009 13:23:14 +0200
 
 grml-etc-core (0.3.72) unstable; urgency=low
 
index d7fb9be..12a6100 100644 (file)
@@ -242,6 +242,42 @@ zrcautoload is-at-least || is-at-least() { return 1 }
 
 # }}}
 
+# {{{ set some important options (as early as possible)
+# Please update these tags, if you change the umask settings below.
+#o# r_umask     002
+#o# r_umaskstr  rwxrwxr-x
+#o# umask       022
+#o# umaskstr    rwxr-xr-x
+(( EUID != 0 )) && umask 002 || umask 022
+
+setopt append_history       # append history list to the history file (important for multiple parallel zsh sessions!)
+is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
+setopt extended_history     # save each command's beginning timestamp and the duration to the history file
+is4 && setopt histignorealldups # If  a  new  command  line being added to the history
+                            # list duplicates an older one, the older command is removed from the list
+setopt histignorespace      # remove command lines from the history list when
+                            # the first character on the line is a space
+setopt auto_cd              # if a command is issued that can't be executed as a normal command,
+                            # and the command is the name of a directory, perform the cd command to that directory
+setopt extended_glob        # in order to use #, ~ and ^ for filename generation
+                            # grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
+                            # -> searches for word not in compressed files
+                            # don't forget to quote '^', '~' and '#'!
+setopt longlistjobs         # display PID when suspending processes as well
+setopt notify               # report the status of backgrounds jobs immediately
+setopt hash_list_all        # Whenever a command completion is attempted, make sure \
+                            # the entire command path is hashed first.
+setopt completeinword       # not just at the end
+setopt nohup                # and don't kill them, either
+setopt auto_pushd           # make cd push the old directory onto the directory stack.
+setopt nonomatch            # try to avoid the 'zsh: no matches found...'
+setopt nobeep               # avoid "beep"ing
+setopt pushd_ignore_dups    # don't push the same dir twice.
+setopt noglobdots           # * shouldn't match dotfiles. ever.
+setopt noshwordsplit        # use zsh style word splitting
+
+# }}}
+
 # setting some default values {{{
 
 NOCOR=${NOCOR:-0}
@@ -1002,42 +1038,6 @@ bindkey '^x1' jump_after_first_word
 
 # }}}
 
-# {{{ set some important options
-# Please update these tags, if you change the umask settings below.
-#o# r_umask     002
-#o# r_umaskstr  rwxrwxr-x
-#o# umask       022
-#o# umaskstr    rwxr-xr-x
-(( EUID != 0 )) && umask 002 || umask 022
-
-# history:
-setopt append_history       # append history list to the history file (important for multiple parallel zsh sessions!)
-is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
-setopt extended_history     # save each command's beginning timestamp and the duration to the history file
-is4 && setopt histignorealldups # If  a  new  command  line being added to the history
-                            # list duplicates an older one, the older command is removed from the list
-setopt histignorespace      # remove command lines from the history list when
-                            # the first character on the line is a space
-setopt auto_cd              # if a command is issued that can't be executed as a normal command,
-                            # and the command is the name of a directory, perform the cd command to that directory
-setopt extended_glob        # in order to use #, ~ and ^ for filename generation
-                            # grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z) ->
-                            # -> searches for word not in compressed files
-                            # don't forget to quote '^', '~' and '#'!
-setopt longlistjobs         # display PID when suspending processes as well
-setopt notify               # report the status of backgrounds jobs immediately
-setopt hash_list_all        # Whenever a command completion is attempted, make sure \
-                            # the entire command path is hashed first.
-setopt completeinword       # not just at the end
-setopt nohup                # and don't kill them, either
-setopt auto_pushd           # make cd push the old directory onto the directory stack.
-setopt nonomatch            # try to avoid the 'zsh: no matches found...'
-setopt nobeep               # avoid "beep"ing
-setopt pushd_ignore_dups    # don't push the same dir twice.
-setopt noglobdots           # * shouldn't match dotfiles. ever.
-
-# }}}
-
 # {{{ history
 
 ZSHDIR=$HOME/.zsh