X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=aea6d381fbbd44deb991c403ffd41c0e6734f876;hb=refs%2Ftags%2F0.3.46;hp=cddcf7ab24feb3be676ff7b344b9e5aa72e0c71d;hpb=2eb50e905d4c556ac347c56bd804b7ae114551b5;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index cddcf7a..aea6d38 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -307,14 +307,14 @@ isgrml && checkhome() { # }}} # {{{ 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 :-/ @@ -422,6 +422,10 @@ bindkey '^Xi' insert-unicode-char # # For a broader description, see: # +# +# The code is imported from the file 'zsh/functions/accept-line' from +# , 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 @@ -1001,7 +1005,7 @@ is4 && [[ -z $NOPRECMD ]] && \ 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 @@ -1476,18 +1480,6 @@ grmlcomp() { # 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'