diff --git a/bash-preexec.sh b/bash-preexec.sh index 7774d31..74f7c22 100644 --- a/bash-preexec.sh +++ b/bash-preexec.sh @@ -251,7 +251,7 @@ __bp_preexec_invoke_exec() { local this_command this_command=$(LC_ALL=C HISTTIMEFORMAT='' builtin history 1) - this_command="${this_command# *[[:digit:]]*[* ] }" + this_command="${this_command#*[[:digit:]][* ] }" # Sanity check to make sure we have something to invoke our function with. if [[ -z "$this_command" ]]; then