-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix corrected command not being saved into fish history #1028
Conversation
Changes look good for me, but it seems like it breaks e2e tests - https://travis-ci.org/nvbn/thefuck/jobs/630646284#L3756 |
Yes, I need to get round to fixing those. Having trouble running the end to end tests locally atm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That missing \n
is the reason those integration tests are failing.
As far as the issue is concerned, I am not entirely sure yet whether this is the best way to solve it. It does not go very well with some usage scenarios such as post_match rules and a new edit command feature I've been working on.
@scorphus happy for you to suggest further changes; or reject this entirely if it doesn't fit with your future changes. This is what I'm currently using at work, since the currently implemented method for updating the fish history simply doesn't work, and it's a bit frustrating, so thought I'd share! |
Let me have a look at this again. |
So, there are two reasons I think we should avoid changing the shell function. The main one is backward compatibility. A considerable number of users have the function hardcoded either in their Another reason is that it does not support a new feature I'm bringing together, which is the “edit command.” For that, I'd like to avoid having the That said, I think the Sounds good? |
Sounds good to me! 👍 |
Hey, @davidhart82! I went ahead – as we usually squash commits by the same author that represent one single, “atomic” change – and squashed the two commits you had. So, authorship is preserved. I'm looking forward to reading your thoughts on my proposed changes. Thanks! |
Hey @scorphus, changes look good to me! Much neater given I had no idea folk hardcode the function directly in I'll give it a test and let you know how I get on... |
This only appears to have failed since the coverage has dropped by 0.01%... Though, having tested this, although it works, it still stores the call to 'fuck' in the history. I wonder whether we want to search and delete those too? |
Looking good! I'll have time to review it over the weekend. Super! |
Sorry to be the thread necromancer. Wondering if there is a reason 3.31 was never released? |
Thanks for the reminder, @tonytamps! There're a few more issues/PRs that need to be solved/merged. All of the issues are already WIP. We're getting there! |
All good. Thank you. |
BTW, I'm not entirely happy with how we managed to solve this issue, I guess I'll try some other approach(es). |
Is there anything that can be done to push this forward? The issue is still present. I've read the diff but I am not sure what the exact problem was. |
I am not sure since when this issue exists but it also occured to me that fish complaints because the |
@septatrix: that issue (#1215) is fixed and released in 3.32. This PR addresses another issue. |
This should fix #1027