diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 93a8363..9356d83 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -4,6 +4,8 @@ if [[ -o interactive ]]; then fi fi +bindkey -e + source $ZDOTDIR/setup-history.zsh source $ZDOTDIR/prompts/simple-two-line.zsh source $ZDOTDIR/functions.zsh diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh index 4291235..54cc0d4 100644 --- a/.config/zsh/functions.zsh +++ b/.config/zsh/functions.zsh @@ -36,9 +36,18 @@ alias nvim_update='nvim --headless "+Lazy! sync" +qa' alias ..="cd .." -function cd() -{ +function cd(){ builtin cd "$@" && ls; } alias bb="brew bundle --file=~/Brewfile" + +function ssh(){ + if [ -n "$TMUX" ]; then + tmux rename-window "$(echo "$@" | awk '{print $NF}' | sed 's/.*@//')" + command ssh "$@" + tmux set-window-option automatic-rename on >/dev/null + else + command ssh "$@" + fi +}