zshrc.d/15-completion.zrc
changeset 44 157f894ef9f7
parent 35 c6d405e0684b
equal deleted inserted replaced
43:7b48c4ff8d36 44:157f894ef9f7
    16 compctl -c which where type
    16 compctl -c which where type
    17 compctl -g '*.pdf *(-/)' evince
    17 compctl -g '*.pdf *(-/)' evince
    18 
    18 
    19 # Hosts completion
    19 # Hosts completion
    20 
    20 
    21 if [ -f ~/.ssh/config ]; then
    21 if [[ -f ~/.ssh/config ]]; then
    22   hosts=($hosts `grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v '^\*$'`)
    22   hosts=($hosts `grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v '^\*$'`)
    23 fi
    23 fi
    24 if [ "$hosts" ]; then
    24 if [[ "$hosts" ]]; then
    25   zstyle ':completion:*:hosts' hosts $hosts
    25   zstyle ':completion:*:hosts' hosts $hosts
    26 fi
    26 fi
    27 
    27 
    28 
    28 
    29 zstyle ':completion:*' completer _expand _complete _correct _approximate
    29 zstyle ':completion:*' completer _expand _complete _correct _approximate