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

Do not add a space after completion if one is already there #6107

Merged

Conversation

krobelus
Copy link
Member

Example: type cd --help --help, move the cursor inside the first --help and press tab.
This used to add a redundant space.

@krobelus krobelus force-pushed the completion-dont-add-redundant-space branch from 842d7d6 to c301fa2 Compare September 12, 2019 16:45
@mqudsi
Copy link
Contributor

mqudsi commented Sep 14, 2019

This looks good to me, but I would want to wait for @ridiculousfish to weigh in because there may be confounding factors such as legacy terminals that don't blink the cursor or something, only because the existing code is rather deliberate about purposely adding the second space.

@krobelus
Copy link
Member Author

Yeah, makes sense, but the cursor is moved beyond the space here, independent of whether the space existed before completing, so the user should notice.

Example: type `cd --help --help`, move the cursor inside the first `--help` and press tab.
This used to add redundant spaces.
@krobelus krobelus force-pushed the completion-dont-add-redundant-space branch from c301fa2 to cf26a63 Compare September 14, 2019 20:55
@mqudsi mqudsi merged commit 8baea8b into fish-shell:master Sep 18, 2019
@mqudsi
Copy link
Contributor

mqudsi commented Sep 18, 2019

Fair enough. Merged with thanks.

@mqudsi mqudsi added this to the fish 3.1.0 milestone Sep 18, 2019
@floam
Copy link
Member

floam commented Sep 18, 2019

This is definitely nicer behavior, thanks.

@krobelus krobelus deleted the completion-dont-add-redundant-space branch September 21, 2019 21:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
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

3 participants