X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=be62172c40d9a54e25a461adb095108715442900;hb=e3f3b08c2e641279e80235e739c3136d8cccac49;hp=8cfb1cb24f12ee13001663c07ed3f1adf4da8d45;hpb=2b66bf6bf6bab6f118ef3e9117dfe1fce792a084;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 8cfb1cb..be62172 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -506,6 +506,7 @@ xcat() { xunfunction() { emulate -L zsh local -a funcs + local func funcs=(salias xcat xsource xunfunction zrcautoload zrcautozle) for func in $funcs ; do [[ -n ${functions[$func]} ]] \ @@ -530,6 +531,7 @@ fi for var in LANG LC_ALL LC_MESSAGES ; do [[ -n ${(P)var} ]] && export $var done +builtin unset -v var # set some variables if check_com -c vim ; then @@ -606,7 +608,7 @@ typeset -U path cdpath fpath manpath is4 && \ for mod in parameter complist deltochar mathfunc ; do zmodload -i zsh/${mod} 2>/dev/null || print "Notice: no ${mod} available :(" -done +done && builtin unset -v mod # autoload zsh modules when they are referenced if is4 ; then @@ -767,7 +769,7 @@ grmlcomp() { # host completion if is42 ; then - [[ -r ~/.ssh/config ]] && _ssh_config_hosts=(${${${(@M)${(f)"$(<$HOME/.ssh/config)"}:#Host *}#Host }:#*[*?]*}) || _ssh_config_hosts=() + [[ -r ~/.ssh/config ]] && _ssh_config_hosts=(${${(s: :)${(ps:\t:)${${(@M)${(f)"$(<$HOME/.ssh/config)"}:#Host *}#Host }}}:#*[*?]*}) || _ssh_config_hosts=() [[ -r ~/.ssh/known_hosts ]] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=() [[ -r /etc/hosts ]] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(&2 RC=$((RC+4)) @@ -3477,6 +3485,7 @@ if check_com -c hg ; then #f5# GNU like diff for mercurial hgdi() { emulate -L zsh + local i for i in $(hg status -marn "$@") ; diff -ubwd <(hg cat "$i") "$i" }