From 7c5ec89ddf161bc5d7f21faf986b8f30c10da026 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 19 May 2025 22:58:01 -0400 Subject: [PATCH] AutoYADM commit: 2025-05-19 22:58:01 --- .config/kak/kakrc | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 95634581..b44720f5 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -111,27 +111,15 @@ define-command -docstring "Create a scratch buffer" scratch %{ alias global s scratch # bar experimenting -declare-option str bar_buflist "" define-command bar-buflist %{ - info %sh{ + eval %sh{ list='' while read buf; do index=$(($index + 1)) # if [ "$buf" = "$kak_bufname" ]; then list="$list $index $buf" - done <<< $(printf '%s\n' "$kak_buflist" | tr ':' '\n') - echo "set-option -add global ui_options terminal_title=$list" + done <<< $(printf '%s\n' "$kak_buflist" | tr ' ' '\n') + quoted=$(printf '%q' "$list" | sed "s/\\*/\*/g") + printf "set-option -add global ui_options terminal_title=%s" "$quoted" } } -# define-command bar-refresh %exp{ -# bar-buflist -# set-option -add global ui_options terminal_title=%sh{ -# list='' -# while read buf; do -# index=$(($index + 1)) -# # if [ "$buf" = "$kak_bufname" ]; then -# list="$list $index $buf " -# done <<< $(printf '%s\n' "$kak_buflist" | tr ':' '\n') -# # echo "set-option global bar_buflist '$list'" -# } -# }