-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fuck can't configure itself automatically on bash #662
Comments
Filed pull request #663 with a fix. It's not optimal, unfortunately - we would have to call "history -a" in the context of the Bash process that called "fuck", and we can only do so in a subshell, which doesn't have the intended effect. |
@Googulator sorry for so huge delay. I've tried a bit simpler approach, now it configures alias if the previous |
#662: Autoconfigure when `fuck` was called < 60 seconds ago from the same shell
Fixed in 3.20 |
…the same shell
nvbn#662: Autoconfigure when `fuck` was called < 60 seconds ago from the same shell
Executing "fuck" twice on a system with no alias configured simply displays the configuration message twice, rather than auto-configuring on the second run.
The problem appears to be that _is_second_run() always returns False due to shell.get_history() not getting the complete (recent) history. This is because Bash keeps the history from its current session in memory, and only writes it to .bash_history either when it quits or when "history -a" is called.
The obvious fix would be to call "history -a" in the __init__() of class Bash, but I'm not sure if that's enough.
The text was updated successfully, but these errors were encountered: