-
Notifications
You must be signed in to change notification settings - Fork 95
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
Not working on Windows using Bash in MSYS2 #149
Comments
Can you share more diagnostic details, such as the bash version you're using? Using |
I typed 2 commands: $ The output with Rafael Dominiquini@DESKTOP:~
Rafael Dominiquini@DESKTOP:~
|
As far as I see the log, preexec_functions+=(preexec_hello_world) |
Sorry, I made the wrong test, but the bug report is correct. I tested all the examples and the "PREEXEC" doesn't work, while the "PRECMD" works fine. Rafael Dominiquini@DESKTOP:~
Rafael Dominiquini@DESKTOP:~
Sorry for the mistake and thanks for the reply! |
As far as I see the above log, it is working. Could you describe 1) how you set up your preexec and precmd configurations, 2) how you test it, 3) what is the behavior you expect, and 4) what is the actual result and how it is different from the expectation? None of the above items is provided, so essentially, I can only read from the report that "something (described in terms of the unknown word "working") is happening in MSYS2". |
Without the " Sorry if I'm not clear! Thanks. |
Thank you for the explanation. So the problem goes away if you specify I tried to reproduce the problem in MSYS2 at my side, but the symptom does not appear here. One possibility might be that there is intereference with other shell configurations. Do you observe the problem with the minimal configuration of Bash? For example, if you start a Bash session with $ bash --norc # <-- start a new child Bash session without configs
$ source /path/to/bash-preexec.sh # <-- load bash-preexec. Please replace /path/to with an appropriate one
$ preexec_hello_world() { echo "You just entered $1"; } # <-- define a function
$ preexec_functions+=(preexec_hello_world) # <- register the function to preexec.
$ pwd # <- please see if the preexec message is printed
$ exit # <- after testing, you can exit the child Bash session and come back to the original Bash session |
I download and added to my .bashrc this script, but it is not working! I also tested on Ubuntu (WSL2) and it works fine on Linux!
But on Windows (MSYS2), only the 'precmd' method works! 'preexec' is not triggered by any command!
Is there any limitation about working on Windows? If not,. Is there anything I can do to help further resolve this bug?
Thanks.
The text was updated successfully, but these errors were encountered: