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

improve fish shell integration in vi mode #158127

Merged
merged 1 commit into from Aug 15, 2022
Merged

improve fish shell integration in vi mode #158127

merged 1 commit into from Aug 15, 2022

Conversation

zgracem
Copy link
Contributor

@zgracem zgracem commented Aug 14, 2022

Part of #139400. Follow-up to #157291.

fish has an additional left-side prompt, which is used in "vi mode" to indicate editor status: if fish_mode_prompt is a defined function that produces any output, that output is printed before fish_prompt.

This PR is based on iTerm2's fish integration, and moves the start-of-prompt escape sequence to prefix fish_mode_prompt, if that function is defined and not empty. (The officially documented way to disable the editor status display is to define function fish_mode_prompt; end in your own config.) Otherwise it only modifies fish_prompt as before.

If `fish_mode_prompt` is a defined function that produces any output,
that output is printed before `fish_prompt`.
See <https://fishshell.com/docs/current/cmds/fish_mode_prompt.html>
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zgracem!

@Tyriar Tyriar added this to the August 2022 milestone Aug 15, 2022
@Tyriar Tyriar merged commit f250d3f into microsoft:main Aug 15, 2022
@zgracem zgracem deleted the improve-fish-integration branch August 15, 2022 14:27
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants