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

Update first line on "Alt + ←" and "Alt + →" #66

Closed
andreiborisov opened this issue Apr 12, 2018 · 4 comments
Closed

Update first line on "Alt + ←" and "Alt + →" #66

andreiborisov opened this issue Apr 12, 2018 · 4 comments
Assignees
Labels
🙏 help wanted needs PR or help on decision ⭐️ idea feature request or suggestion

Comments

@andreiborisov
Copy link
Collaborator

andreiborisov commented Apr 12, 2018

related: #68


Fish allows user to go back and forth in directory history with Alt + ← and Alt + →. Pure should update first line of the prompt containing current directory after changing it using those key combinations.

Right now, the directory on the first line updates to proper value only on the next prompt. Built-in prompts seem to update directory without any issues.

Sent with GitHawk

@andreiborisov andreiborisov changed the title Update first line on Alt-right and Alt-left Update first line on Alt + ← and Alt + → Apr 12, 2018
@andreiborisov andreiborisov changed the title Update first line on Alt + ← and Alt + → Update first line on "Alt + ←" and "Alt + →" Apr 12, 2018
@rafaelrinaldi
Copy link
Collaborator

@schrodincat Thanks for your suggestion. I had no idea this was possible. We will look into supporting this feature on pure.

In the meantime feel free to submit a PR if you feel like it.

@andreiborisov
Copy link
Collaborator Author

@rafaelrinaldi I’ll do a PR, no problems👌 I’ve managed to fix this issue, but I’ve also noticed there is something fishy going on (couldn’t help myself, sorry, I’m new to fish 😅).
Is there any reason we evoking pre_prompt through event handler? Because, it seems, it isn’t called when going through directory history. It is also not called on the terminal opening (at least for me with Terminal.app on macOS) which I believe is not intended behavior.

Sent with GitHawk

@edouard-lopez edouard-lopez added ⭐️ idea feature request or suggestion 🙏 help wanted needs PR or help on decision labels Sep 13, 2018
@edouard-lopez
Copy link
Member

edouard-lopez commented Sep 13, 2018

Could you create a dedicated PR for this? Having a smaller scope help review faster and release more frequently 👍

@andreiborisov
Copy link
Collaborator Author

@edouard-lopez no, I don’t think so, the underlying issue is the same as for #68, so if you fix one, you fix other automatically...

Sent with GitHawk

edouard-lopez pushed a commit that referenced this issue Dec 11, 2018
Reimplement workaround for truncated strings (#49) using single function as currently recommended in fish-shell/fish-shell#904 (comment) instead of event handler.

Update first line of the prompt when moving through directory history with "Alt + ←" and "Alt + →" (#66).

Also resolve #62 and #67.

Refactor code into smaller functions.
edouard-lopez pushed a commit that referenced this issue Aug 21, 2023
Reimplement workaround for truncated strings (#49) using single function as currently recommended in fish-shell/fish-shell#904 (comment) instead of event handler.

Update first line of the prompt when moving through directory history with "Alt + ←" and "Alt + →" (#66).

Also resolve #62 and #67.

Refactor code into smaller functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted needs PR or help on decision ⭐️ idea feature request or suggestion
Projects
None yet
Development

No branches or pull requests

3 participants