AutoYADM commit: 2025-06-20 16:50:15

This commit is contained in:
Daniel Fichtinger 2025-06-20 16:50:15 -04:00
parent 3db2516ab1
commit 7737b9e8fd

View file

@ -19,9 +19,17 @@ define-command -docstring %{
define-command -params 1.. shell-async-command %{
nop %sh{
{
if [ "$1" = "-d" ]; then
debug="true"
shift
fi
stdout="$(eval "$@")"
cmd="$(printf 'info -title sh "%s"\n' "$stdout")"
| kak -p "$kak_session"
if [ "$debug" = "true "]; then
dcmd="$(printf 'echo -debug "%s"\n' "$stdout")"
cmd="$(printf '%s\n%s' "$cmd" "$dcmd")"
fi
printf 'evaluate-commands -try-client %s %%{ %s }' "$kak_client" "$cmd" | kak -p "$kak_session"
} >/dev/null 2>&1 </dev/null &
}
}