Skip to content
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

Run preexec for commented out commands #158

Open
yedayak opened this issue Jun 17, 2024 · 1 comment
Open

Run preexec for commented out commands #158

yedayak opened this issue Jun 17, 2024 · 1 comment

Comments

@yedayak
Copy link

yedayak commented Jun 17, 2024

Currently preexec doesn't run on commented out commands, since they aren't included in $BASH_COMMAND. This means that tools like atuin don't know about them, see here.
It will be great if there was a way to run preexec in this case.
Perhaps related to #153, #143?

@akinomyoga
Copy link
Contributor

akinomyoga commented Jun 17, 2024

It will be great if there was a way to run preexec in this case.

Once Bash 5.3 comes out, #28 (comment) should work as far as I understand.

Particularly for the case of Atuin, since the number of variables that Atuin tries to modify in preexec is limited, the combination of subshell and parameter expansion, e.g. PS0=${ATUIN_HISTORY_ID:=$(...)} might also work in Bash 4.4+.

Perhaps related to #153, #143?

They are different issues.

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

No branches or pull requests

2 participants