From 46c37215dca84126721f67d5e96017b567de8b49 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Tue, 6 Jan 2026 12:38:34 -0500 Subject: [PATCH] Removed Secret! Moved from Avante to CodeCompanion and it's been a better experience. Updated blink and ruff to work better with python. --- zsh/.zshrc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index f96c4ad..896ec25 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -12,10 +12,36 @@ export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 # autoload -Uz compinit; compinit; _comp_options+=(globdots); +# ssh using a new window when we are in TMUX +ssh() { + if [ -n "${TMUX:-}" ]; then + # Extract the destination host from the command arguments + local dest_user_host=$( + printf "%s " "$@" | awk 'match($0, /[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+/) {print substr($0,RSTART,RLENGTH)}' + ) + + # Rename tmux window and pane if possible + ( + set +e # Continue even if rename fails + tmux display-message -p "#{pane_id}" > /dev/null && tmux rename-window "$dest_user_host" + tmux rename-pane "$dest_user_host" 2>/dev/null || true + ) &> /dev/null + + command ssh "$@" + + # Restore automatic renaming (if enabled) + tmux set-window-option automatic-rename on > /dev/null 2>&1 || true + else + command ssh "$@" + fi +} + + # User configuration export DOT="~/.dotfiles" alias vim='vim -S ~/.vimrc' alias nvim='nvim' +alias uvupdate='while read line; do [[ -n "$line" && ! "$line" =~ ^[[:space:]]*# ]] && uv pip install "$line" --upgrade; done < requirements.txt' # alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew' export CLICOLOR=1 export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd