-
Notifications
You must be signed in to change notification settings - Fork 97
Description
This might fall into this kind of a situation, and I apologize in advance: https://xkcd.com/1172/
I have a habit of running :
specifically to execute preexecs. Today, I updated my version of bash-preexec, and that functionality no longer works.
-
Lines 330 to 336 in 1f77dc0
existing_prompt_command="${existing_prompt_command//$__bp_install_string/:}" # no-op existing_prompt_command="${existing_prompt_command//$'\n':$'\n'/$'\n'}" # remove known-token only existing_prompt_command="${existing_prompt_command//$'\n':;/$'\n'}" # remove known-token only __bp_sanitize_string existing_prompt_command "$existing_prompt_command" if [[ "${existing_prompt_command:-:}" == ":" ]]; then existing_prompt_command= fi When bash-preexec installs itself it replaces its install command with a no-op command
:
. It does not always manage to remove that no-op from the prompt command -
Lines 245 to 250 in 1f77dc0
if __bp_in_prompt_command "${BASH_COMMAND:-}"; then # If we're executing something inside our prompt_command then we don't # want to call preexec. Bash prior to 3.1 can't detect this at all :/ __bp_preexec_interactive_mode="" return fi bash-preexec does not execute preexec commands if it looks like it's executing something from the
$PROMPT_COMMAND
I think it should be as simple as adding another prune attempt when we're processing existing_prompt_command
. I'll put something together