AutoYADM commit: 2025-06-20 16:50:15
This commit is contained in:
parent
3db2516ab1
commit
7737b9e8fd
1 changed files with 9 additions and 1 deletions
|
@ -19,9 +19,17 @@ define-command -docstring %{
|
||||||
define-command -params 1.. shell-async-command %{
|
define-command -params 1.. shell-async-command %{
|
||||||
nop %sh{
|
nop %sh{
|
||||||
{
|
{
|
||||||
|
if [ "$1" = "-d" ]; then
|
||||||
|
debug="true"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
stdout="$(eval "$@")"
|
stdout="$(eval "$@")"
|
||||||
cmd="$(printf 'info -title sh "%s"\n' "$stdout")"
|
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 &
|
} >/dev/null 2>&1 </dev/null &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue