From 53bd2f49efea41cfc05c7481a4edcdd19fa28db4 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Tue, 24 Feb 2026 20:26:04 +0000 Subject: [PATCH] bat build and zsh widget perf --- home/.zsh/widgets.zsh | 15 ++++++++++++--- install.d/26-bat.sh | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/home/.zsh/widgets.zsh b/home/.zsh/widgets.zsh index affc615..cfc1ec1 100644 --- a/home/.zsh/widgets.zsh +++ b/home/.zsh/widgets.zsh @@ -219,7 +219,7 @@ _dots_load_keybindings() { # Ctrl+S: copilot sessions _dots_copilot_session_widget() { local session_dir="$HOME/.copilot/session-state" - [[ -d "$session_dir" ]] || { zle reset-prompt; return; } + [[ -d "$session_dir" ]] || { BUFFER="colby --continue"; zle reset-prompt; zle accept-line; return; } local session session="$(python3 -c " import os, json, glob @@ -284,10 +284,19 @@ for line in sys.stdin: print(\">\", msg) except: pass " 2>/dev/null - ' --header 'enter=colby | ctrl-r=restricted' \ - --expect=ctrl-r)" || { zle reset-prompt; return; } + ' --header 'enter=colby | ctrl-r=restricted | ctrl-s=continue latest' \ + --expect=ctrl-r,ctrl-s)" + local fzf_rc=$? + [[ $fzf_rc -ne 0 && "$session" != ctrl-s* ]] && { zle reset-prompt; return; } local key=$(echo "$session" | head -1) local line=$(echo "$session" | tail -1) + # Ctrl+S again — continue latest + if [[ "$key" == "ctrl-s" ]]; then + BUFFER="colby --continue" + zle reset-prompt + zle accept-line + return + fi local id=$(echo "$line" | cut -d'|' -f2 | tr -d ' ') if [[ "$key" == "ctrl-r" ]]; then BUFFER="gh copilot --resume $id" diff --git a/install.d/26-bat.sh b/install.d/26-bat.sh index a521fc8..77a26b4 100644 --- a/install.d/26-bat.sh +++ b/install.d/26-bat.sh @@ -25,5 +25,5 @@ fi bat --version | log_quote -bat cache --build --quiet +bat cache --build 2>/dev/null log_pass "bat theme cache built"