From b1fd519278bf7d3bcb74a713a905991aa3275736 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 20 Jun 2025 16:55:15 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-20 16:55:15 --- .config/kak/autoload/sh.kak | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/kak/autoload/sh.kak b/.config/kak/autoload/sh.kak index baaff32a..b4740fdb 100644 --- a/.config/kak/autoload/sh.kak +++ b/.config/kak/autoload/sh.kak @@ -16,7 +16,12 @@ define-command -docstring %{ fi } } -define-command -params 1.. shell-async-command %{ +define-command -docstring %{ + shell-async-command [switches] : Run the given shell command + asynchronously. Display its output in an info modal. + Switches: + -d echo stdout to *debug* buffer as well +} -params 1.. shell-async-command %{ nop %sh{ { if [ "$1" = "-d" ]; then @@ -25,7 +30,7 @@ define-command -params 1.. shell-async-command %{ fi stdout="$(eval "$@")" cmd="$(printf 'info -title sh "%s"\n' "$stdout")" - if [ "$debug" = "true "]; then + if [ "$debug" = "true" ]; then dcmd="$(printf 'echo -debug "%s"\n' "$stdout")" cmd="$(printf '%s\n%s' "$cmd" "$dcmd")" fi