Open JeffFaer opened 6 months ago
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.
:
https://github.com/rcaloras/bash-preexec/blob/1f77dc09356b58b5e2877c1e87158c48c4c377bc/bash-preexec.sh#L330-L336
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
https://github.com/rcaloras/bash-preexec/blob/1f77dc09356b58b5e2877c1e87158c48c4c377bc/bash-preexec.sh#L245-L250
bash-preexec does not execute preexec commands if it looks like it's executing something from the $PROMPT_COMMAND
$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
existing_prompt_command
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.https://github.com/rcaloras/bash-preexec/blob/1f77dc09356b58b5e2877c1e87158c48c4c377bc/bash-preexec.sh#L330-L336
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 commandhttps://github.com/rcaloras/bash-preexec/blob/1f77dc09356b58b5e2877c1e87158c48c4c377bc/bash-preexec.sh#L245-L250
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