-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Bug: Conflict with hstr application when set sdkman_auto_env=true #1087
Comments
Hi @speedlog, I don't think this is a bug but rather an incompatibility between the two tools. Not sure if there is much we can do about this. |
I agree, but maybe warning comment "THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!" is unnecessary? |
For the vast majority of our users, this statement/comment is valid. SDKMAN rewrites the |
Thanks for explanation. I tried to figure out why SDKMAN should be in the end of file. I dig a little and found cause of this problem. hstr add I will try to propose a change to SDKMAN in a while. |
Remove double semicolon problem Without this fix there may be a message with double semicolon: bash: PROMPT_COMMAND: line 0: `history -a; history -n; ;sdkman_auto_env'
Hi@speedlog! Why do you add a space before
SDKMAN! assumes that the existing PROMPT_COMMAND ends on a I guess SDKMAN! could also strip trailing whitespace before, but I'd rather not add too much special casing for handling |
Trim PROMPT_COMMAND Without this fix there may be a message with double semicolon: bash: PROMPT_COMMAND: line 0: `history -a; history -n; ;sdkman_auto_env'
@helpermethod I have not noticed there is solution removing double semicolon. So the problem is just space at the end. |
Trim PROMPT_COMMAND Without this fix there may be a message with double semicolon: bash: PROMPT_COMMAND: line 0: `history -a; history -n; ;sdkman_auto_env'
Trim PROMPT_COMMAND Without this fix there may be a message with double semicolon: bash: PROMPT_COMMAND: line 0: `history -a; history -n; ;sdkman_auto_env'
@speedlog That is now available for testing in the beta channel. Could you please confirm that it works for you? |
@marc0der SDKMAN latest+0906561 works perfectly :-) |
@speedlog Thanks for bringing the issue up and providing a PR! |
Bug report
When i have installed hstr (https://github.com/dvorka/hstr) and sdkman with sdkman_auto_env=true
Every command i get message "bash: PROMPT_COMMAND: line X: `history -a; history -n; ;sdkman_auto_env'"
There is a resolution.
Despite of warning comment ("THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!") i need to set hstr fragment in
.bashrc
after sdkman fragment.Something like that:
To reproduce
hstr --show-configuration >> ~/.bashrc
System info
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
SDKMAN 5.15.0
hstr version "2.3.0" (2020-11-19T07:41:00)
The text was updated successfully, but these errors were encountered: