Skip to content

Use a function substitution in $PS0 for preexec in Bash >= 5.3 #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

akinomyoga
Copy link
Contributor

This implements the approach to preexec using a function substitution in PS0 mentioned in #28 (comment). This should solve the issues #164 (subshells), #6 (function definitions), #158 (comments), #147 (custom HISTIGNORE/HISTCONTROL) in Bash 5.3 (which is now under the beta testing). It should be noted that this doesn't change the situation in Bash <= 5.2.

@akinomyoga akinomyoga changed the title Use $PS0 and function substitution in Bash >= 5.3 Use a function substitution in $PS0 for preexec in Bash >= 5.3 Jan 9, 2025
* Do not prefix local varnames with underscores
* Make "__bp_invoke_pre{cmd,exec}_functions" return the last non-zero exit status
* Test "__bp_invoke_pre{cmd,exec}_functions"                  |
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.

1 participant