diff --git a/zsh/.zshrc b/zsh/.zshrc index c453310..405f719 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -2,6 +2,7 @@ if [[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" fi + source $ZDOTDIR/exports.zsh source $ZDOTDIR/dircolor.zsh diff --git a/zsh/libs/completion.zsh b/zsh/libs/completion.zsh index 61537ae..54c9a80 100644 --- a/zsh/libs/completion.zsh +++ b/zsh/libs/completion.zsh @@ -36,12 +36,20 @@ fi zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR +zstyle ':completion::complete:*' cache-path "$HOME/.cache/zsh/compcache/" -zstyle ':completion:*:*:*:users' ignored-patterns adm amanda apache at avahi avahi-autoipd backup beaglidx bin cacti canna clamav ceph daemon dbus distcache dnsmasq dovecot eeleater fax ftp games gdm gkrellmd gluster gopher gnats hacluster haldaemon halt hsqldb ident irc junkbust kdm ldap list lp mail mailman mailnull man messagebus mldonkey mysql nagios named netdata netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn operator pcap polkitd postfix postgres privoxy proxy pulse pvm quagga radvd rpc rpcuser rpm rtkit root scard shutdown squid sshd statd svn sync sys systemd-coredump systemd-network systemd-resolve systemd-timesync tftp usbmux uucp uuidd vcsa wwwrun www-data xfs '_*' +zstyle ':completion:*:*:*:users' ignored-patterns adm amanda apache at avahi avahi-autoipd backup beaglidx bin bitwarden_rs cacti canna clamav ceph colord consul daemon dbus distcache dnsdist dnsmasq dovecot eeleater elasticsearch fax flaskdemo ftp games gdm git gitea gkrellmd gluster gopher gophernicus gnats hacluster haldaemon halt hsqldb http ident irc junkbust kdm kibana ldap list logstash lp lxd mail mailman mailnull man mattermost messagebus mldonkey mongodb mxisd mysql nagios named netdata netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn operator pcap polkitd postfix postgres powerdns privoxy proxy pulse prosody puppet pvm quagga radvd redis rpc rpcuser rpm rtkit root scard shutdown squid sshd statd svn synapse sync sys systemd-coredump systemd-journal-remote systemd-network systemd-resolve systemd-timesync teamspeak tftp turnserver usbmux unbound uucp uuidd vault vcsa webvirtmgr wildfly wwwrun www-data xfs youtrack zabbix-agent zabbix-server '_*' zstyle '*' single-ignored show +zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost megumi _gateway +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' git.eeleater.org mail.eeleater.org megumi.eeleater.org +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' + if [[ $COMPLETION_WAITING_DOTS = true ]]; then expand-or-complete-with-dots() { [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam