From 9f5167693dd68fd16751246a39a2057f9e48c868 Mon Sep 17 00:00:00 2001 From: Nikolas Weger Date: Fri, 27 Aug 2021 10:21:55 +0200 Subject: [PATCH] Update dot_zshrc --- dot_zshrc | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/dot_zshrc b/dot_zshrc index 6519ba9..e455729 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -1,7 +1,3 @@ -# Personal Zsh configuration file. It is strongly recommended to keep all -# shell customization and configuration (including exported environment -# variables such as PATH) in this file or in files source by it. -# # Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md zstyle ':z4h:' auto-update 'no' @@ -17,8 +13,7 @@ zstyle ':z4h:bindkey' keyboard 'pc' zstyle ':z4h:autosuggestions' forward-char 'accept' zstyle ':z4h:fzf-complete' recurse-dirs 'no' -# Enable ('yes') or disable ('no') automatic teleportation of z4h over -# ssh when connecting to these hosts. +# automatic teleportation of z4h to ssh 'yes' or 'no' #zstyle ':z4h:ssh:example-hostname1' enable 'yes' zstyle ':z4h:ssh:*' enable 'no' #zstyle ':z4h:ssh-agent:' start no @@ -33,10 +28,8 @@ z4h install mroth/evalcache || return # perform network I/O must be done above. Everything else is best done below. z4h init || return -# Export environment variables. +# exports z4h source $HOME/.config/zsh/export.zsh - -# Source additional local files if they exist. z4h source $HOME/.config/local/env.zsh # Source Files @@ -54,26 +47,16 @@ z4h source $Z4H/mroth/evalcache/evalcache.plugin.zsh # zoxide _evalcache zoxide init zsh -# Aliases +# aliases z4h source $HOME/.config/zsh/aliases.zsh z4h source $HOME/.config/local/aliases.zsh -# Add flags to existing aliases. -#alias ls="${aliases[ls]:-ls} -A" - -# Define key bindings. - +# key bindings run_ranger () { echo; ranger < $TTY; zle redisplay } zle -N run_ranger bindkey '^f' run_ranger -# Autoload functions. - -# Define functions and completions. -function md() { [[ $# == 1 ]] && mkdir -p -- "$1" && cd -- "$1" } -compdef _directories md - -# Fix SSH Completions +# fix ssh completions zstyle ':completion:*:*:*:users' ignored-patterns '*' zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })' zstyle ':completion:*:(scp|ssh):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' @@ -83,7 +66,7 @@ zstyle ':completion:*:*:*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-lo zstyle ':completion:*:*:*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*localdomain*' '*.eeleater.org' '*.local' zstyle ':completion:*:*:*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' -# Define named directories: ~w <=> Windows home directory on WSL. +# Define named directories: ~wsl <=> Windows home directory on WSL. [[ -z $z4h_win_home ]] || hash -d wsl=$z4h_win_home # Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html