Skip to content

Conversation

@JeffFaer
Copy link

@JeffFaer JeffFaer commented Feb 18, 2024

In particular: bash-preexec installs itself by appending __bp_install_string to $PROMPT_COMMAND. That means that there's a pretty good change that __bp_install_string will be the last thing in $PROMPT_COMMAND when __bp_install is invoked.

If that happens, the $existing_prompt_command logic in __bp_install will result in the pre-existing prompt command followed by : and no trailing newline. That situation is not cleaned up by the two existing special cases.

Fix #153

In particular: bash-preexec installs itself by appending
__bp_install_string to $PROMPT_COMMAND. That means that there's a pretty
good change that __bp_install_string will be the last thing in
$PROMPT_COMMAND when __bp_install is invoked.

If that happens, the $existing_prompt_command logic in __bp_install will
result in the pre-existing prompt command followed by `:` and no
trailing newline. That situation is not cleaned up by the two existing
special cases.

Fix rcaloras#153
@akinomyoga
Copy link
Contributor

This is a part of #143. In particular, fe5aedb is the commit for colon reduction with other refactoring and also contains the unit tests for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

preexec doesn't work for no-op command :

2 participants