Allow specifying further arguments in actions

This commit is contained in:
ItsDrike 2022-08-21 17:13:40 +02:00
parent 219f8ebe4e
commit 52a00e9d29
No known key found for this signature in database
GPG key ID: B014E761034AF742

View file

@ -188,9 +188,11 @@ while read -r cmd <&5; do
output="$(echo $cmd | cut -d " " -f2-)" output="$(echo $cmd | cut -d " " -f2-)"
if [[ "$prefix" == "cmd" ]]; then if [[ "$prefix" == "cmd" ]]; then
cmd="${CMDS[$output]}" key="$(echo $output | cut -d " " -f1)"
>&2 echo "CMD: $output ($cmd)" args="$(echo $output | cut -d " " -f2-)"
eval $cmd run_str="${CMDS[$key]} $args"
>&2 echo "CMD: $run_str ($key)"
eval $run_str
continue continue
fi fi