mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-02-17 23:30:47 +01:00
15 lines
458 B
Bash
15 lines
458 B
Bash
|
|
|
|
# Enable auto-completion
|
|
autoload -Uz compinit
|
|
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
|
|
if [ $(date +'%j') != $updated_at ]; then
|
|
compinit -i
|
|
else
|
|
compinit -C -i
|
|
fi
|
|
|
|
# Make zsh know about hosts already accessed by SSH
|
|
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' \
|
|
hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
|