From ba2d9ad2e886ef4ef21b6886ff21347d2ec44a19 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 8 May 2026 10:36:01 -0700 Subject: [PATCH 1/2] Source OpenClaw completion if present --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index b82db72..1d4141f 100644 --- a/.zshrc +++ b/.zshrc @@ -129,6 +129,9 @@ which helm 1> /dev/null && source <(helm completion zsh) # doctl completion which doctl 1> /dev/null && source <(doctl completion zsh) +# OpenClaw Completion +[ -f "${HOME}/.openclaw/completions/openclaw.zsh" ] && source "${HOME}/.openclaw/completions/openclaw.zsh" + # Ensure zinit is installed ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" [ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" From d241365b88ec34b459aa1a4390aebdd3af33f12f Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 8 May 2026 10:36:22 -0700 Subject: [PATCH 2/2] Handle shell history per-pane when TMUX is active --- .zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.zshrc b/.zshrc index 1d4141f..a5a62c9 100644 --- a/.zshrc +++ b/.zshrc @@ -104,6 +104,14 @@ if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" tmux new -A -s local_tmux fi +# Use a history file per-pane in tmux +if [ -n "$TMUX_PANE" ]; then + hist_dir="${XDG_STATE_HOME:-${HOME}/.local/state}/zsh" + [ -d "$hist_dir" ] || mkdir -p "$hist_dir" + export HISTFILE="${hist_dir}/histfile.$TMUX_PANE" + setopt inc_append_history +fi + # Define a function to use autossh with a custom bashrc function assh() { remote_file=$(mktemp)