From fa6c74a9b1909ff70fe8d5105df4397a1ca17bf2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 15 Jan 2022 11:49:02 +0530 Subject: [PATCH] ... --- shell-integration/bash/kitty.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index ecf305b2e..3746aeef4 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -72,7 +72,7 @@ _ksi_main() { fi _ksi_get_current_command() { local last_cmd=$(HISTTIMEFORMAT= builtin history 1) - last_cmd="${last_cmd#*[0-9]*[[:space:]]}" # remove leading history number + last_cmd="${last_cmd#*[[:digit:]]*[[:space:]]}" # remove leading history number last_cmd="${last_cmd#"${last_cmd%%[![:space:]]*}"}" # remove remaining leading whitespace builtin printf "\e]2;%s\a" "${last_cmd}" }