X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=4ad12c6b117843180aa2140b189d779af11db080;hb=1049e383c183bce753a1f11fdc05ddd0a3f1942e;hp=09ebfc7c4aa82f11492926ce27b00a47c937943e;hpb=a66d7b87366e0ac4054f03b3b7a0a94024885fee;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 09ebfc7..4ad12c6 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -764,14 +764,17 @@ grmlcomp() { # host completion if is42 ; then + [[ -r ~/.ssh/config ]] && _ssh_config_hosts=(${${${(@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)~~"$( 0 )); then while (( $# > 0 )); do - if islinux || isfreebsd; then + if islinux || isfreebsd; then cp $verbose -a "${1%/}" "${1%/}_$current_date" - else; + else cp $verbose -pR "${1%/}" "${1%/}_$current_date" fi (( result += $? ))