cheat path, autocomplete ssh

master
Felix Pankratz 3 weeks ago
parent f020027822
commit bf585170ac

@ -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

Loading…
Cancel
Save