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