[U] fc -ln -1 to get last cmd

This commit is contained in:
chesteryue
2023-03-04 21:27:47 +08:00
parent 0141b0889a
commit 93e68a3eb7

View File

@@ -103,7 +103,7 @@ output_command_execute_after() {
fi
# cmd
local cmd="${$(fc -ln | tail -1)#* }";
local cmd="$(fc -ln -1)";
local color_cmd="";
if $1;
then