# }}}
# {{{ set some variables
-#v#
if check_com -c vim ; then
+#v#
export EDITOR=${EDITOR:-vim}
else
export EDITOR=${EDITOR:-vi}
fi
-#v#
+#v#
export MAIL=${MAIL:-/var/mail/$USER}
# if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/
#
# For a broader description, see:
# <http://bewatermyfriend.org/posts/2007/12-26.11-50-38-tooltime.html>
+#
+# The code is imported from the file 'zsh/functions/accept-line' from
+# <http://ft.bewatermyfriend.org/comp/zsh/zsh-dotfiles.tar.bz2>, which
+# distributed under the same terms as zsh itself.
# A newly added command will may not be found or will cause false
# correction attempts, if you got auto-correction set. By setting the
fi
chpwd() {
- builtin dirs -pl >! ~/.zdirs
+ builtin print -l ${(u)dirstack} >! ~/.zdirs
}
# }}}
preexec () {
[[ -n $NOPRECMD ]] && return 0
# set hostname if not running on host with name 'grml'
- if [[ "$HOSTNAME" != $(hostname) ]] ; then
+ if [[ -n "$HOSTNAME" ]] && [[ "$HOSTNAME" != $(hostname) ]] ; then
NAME="@$HOSTNAME"
fi
# get the name of the program currently running and hostname of local machine
# zstyle ':completion:*' completer _complete _correct _approximate
# zstyle ':completion:*' expand prefix suffix
- # automatic rehash? Credits go to Frank Terbeck
- # TODO: keep this at all? And if so, move it, it has nothing to do with completion
- # my_accept() {
- # local buf
- # [[ -z ${BUFFER} ]] && zle accept-line && return
- # buf=( ${(z)BUFFER} )
- # [[ -z ${commands[${buf[1]}]} ]] && rehash
- # zle accept-line
- # }
- # zle -N my_accept
- # bindkey "^M" my_accept
-
# command for process lists, the local web server details and host completion
zstyle ':completion:*:urls' local 'www' '/var/www/' 'public_html'