newest version of dotfiles

This commit is contained in:
Nikolas Weger 2023-12-19 13:31:14 +01:00
parent 4e44332045
commit 1f9d47b42c
11 changed files with 87 additions and 62 deletions

View file

@ -0,0 +1,5 @@
setopt NO_CLOBBER
setopt INTERACTIVE_COMMENTS
setopt HASH_EXECUTABLES_ONLY
setopt NUMERIC_GLOB_SORT
unsetopt FLOW_CONTROL

View file

@ -9,20 +9,16 @@ zstyle ':completion:*:(ssh|mosh):*' group-order users hosts-domain hosts-host us
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:users' ignored-patterns '*'
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback localhost broadcasthost 'ip6-*' 'hbz*'
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*.eeleater.org' '*.hbz-nrw.de'
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.*' '255.255.255.255' '::1' 'fe80::*' 'ff02::*'
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.*' '255.255.255.255' '::1' 'fe80::*' 'ff02::*'
[ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=()
[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _global_ssh_hosts=()
[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
[ -r /etc/hosts_network ] && : ${(A)_etc_hosts_network:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts_network)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts_network=()
hosts=(
# "$_ssh_config[@]"
# "$_global_ssh_hosts[@]"
# "$_ssh_hosts[@]"
# "$_etc_hosts[@]"
"$_global_ssh_hosts[@]"
"$_ssh_hosts[@]"
"$_etc_hosts[@]"
)
[ -r /etc/hosts_network ] && hosts+=("$_etc_hosts_network[@]")
zstyle ':completion:*:hosts' hosts $hosts