diff --git a/.zshrc b/.zshrc index d34bfc1..c84555e 100644 --- a/.zshrc +++ b/.zshrc @@ -65,7 +65,7 @@ if [[ "$(command -v nvim)" ]]; then export MANWIDTH=999 alias vi='nvim' alias vim='vi' -else +else export EDITOR='vim' fi @@ -74,9 +74,9 @@ function fman () { man -P "less -p \"^ +$2\"" $1 } # cheat - display text reminders function cheat() { - bat -l md -p ~/cheat/"$1" + bat -l md -p ~/cheat/cheats/"$1" --color always --theme="Dracula" | tr -d '`' } -compdef '_files -W "/home/panki/cheat"' cheat +compdef '_files -W "/home/panki/cheat/cheats"' cheat # tokens etc test -f "$HOME/.exports" && source "$HOME/.exports" @@ -98,6 +98,9 @@ ICONS=(😈 💀 🤡 👻 👽 👾 🤖 😺 💋 💥 🦥 🐣 🐧 🐸 export PURE_PROMPT_SYMBOL="$(shuf -n1 -e "${ICONS[@]}")" __wezterm_set_user_var "ICON" $PURE_PROMPT_SYMBOL +# autocomplete ssh using known_hosts +zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })' + # local specific local_conf="$HOME/.zsh/$(hostname).zsh" test -f $local_conf && source $local_conf