Update dot_zshrc
This commit is contained in:
parent
bc838a571d
commit
9f5167693d
1 changed files with 6 additions and 23 deletions
29
dot_zshrc
29
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
|
# Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md
|
||||||
|
|
||||||
zstyle ':z4h:' auto-update 'no'
|
zstyle ':z4h:' auto-update 'no'
|
||||||
|
@ -17,8 +13,7 @@ zstyle ':z4h:bindkey' keyboard 'pc'
|
||||||
zstyle ':z4h:autosuggestions' forward-char 'accept'
|
zstyle ':z4h:autosuggestions' forward-char 'accept'
|
||||||
zstyle ':z4h:fzf-complete' recurse-dirs 'no'
|
zstyle ':z4h:fzf-complete' recurse-dirs 'no'
|
||||||
|
|
||||||
# Enable ('yes') or disable ('no') automatic teleportation of z4h over
|
# automatic teleportation of z4h to ssh 'yes' or 'no'
|
||||||
# ssh when connecting to these hosts.
|
|
||||||
#zstyle ':z4h:ssh:example-hostname1' enable 'yes'
|
#zstyle ':z4h:ssh:example-hostname1' enable 'yes'
|
||||||
zstyle ':z4h:ssh:*' enable 'no'
|
zstyle ':z4h:ssh:*' enable 'no'
|
||||||
#zstyle ':z4h:ssh-agent:' start 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.
|
# perform network I/O must be done above. Everything else is best done below.
|
||||||
z4h init || return
|
z4h init || return
|
||||||
|
|
||||||
# Export environment variables.
|
# exports
|
||||||
z4h source $HOME/.config/zsh/export.zsh
|
z4h source $HOME/.config/zsh/export.zsh
|
||||||
|
|
||||||
# Source additional local files if they exist.
|
|
||||||
z4h source $HOME/.config/local/env.zsh
|
z4h source $HOME/.config/local/env.zsh
|
||||||
|
|
||||||
# Source Files
|
# Source Files
|
||||||
|
@ -54,26 +47,16 @@ z4h source $Z4H/mroth/evalcache/evalcache.plugin.zsh
|
||||||
# zoxide
|
# zoxide
|
||||||
_evalcache zoxide init zsh
|
_evalcache zoxide init zsh
|
||||||
|
|
||||||
# Aliases
|
# aliases
|
||||||
z4h source $HOME/.config/zsh/aliases.zsh
|
z4h source $HOME/.config/zsh/aliases.zsh
|
||||||
z4h source $HOME/.config/local/aliases.zsh
|
z4h source $HOME/.config/local/aliases.zsh
|
||||||
|
|
||||||
# Add flags to existing aliases.
|
# key bindings
|
||||||
#alias ls="${aliases[ls]:-ls} -A"
|
|
||||||
|
|
||||||
# Define key bindings.
|
|
||||||
|
|
||||||
run_ranger () { echo; ranger < $TTY; zle redisplay }
|
run_ranger () { echo; ranger < $TTY; zle redisplay }
|
||||||
zle -N run_ranger
|
zle -N run_ranger
|
||||||
bindkey '^f' run_ranger
|
bindkey '^f' run_ranger
|
||||||
|
|
||||||
# Autoload functions.
|
# fix ssh completions
|
||||||
|
|
||||||
# Define functions and completions.
|
|
||||||
function md() { [[ $# == 1 ]] && mkdir -p -- "$1" && cd -- "$1" }
|
|
||||||
compdef _directories md
|
|
||||||
|
|
||||||
# Fix SSH Completions
|
|
||||||
zstyle ':completion:*:*:*:users' ignored-patterns '*'
|
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 -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 *'
|
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-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::*'
|
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
|
[[ -z $z4h_win_home ]] || hash -d wsl=$z4h_win_home
|
||||||
|
|
||||||
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html
|
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html
|
||||||
|
|
Loading…
Add table
Reference in a new issue