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

Preload git completions #296

Merged
merged 3 commits into from
Apr 13, 2021
Merged

Conversation

jamesd
Copy link
Contributor

@jamesd jamesd commented Apr 11, 2021

Two commits:

  • Make sure git completions are loaded
  • Add EditorConfig for _vcsh_bash

Modern bash completion uses a delayed completion loader so that
completions for commands that are never used are not loaded. This
breaks vcsh git completions if no completion for git has been
performed yet.

To resolve this, use the git completion load function to get the
completion spec for git loaded if it is not already present.
Copy link
Collaborator

@alerque alerque left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I'll assume this works as intended on bash, I'm on zsh and I'm not sure my Bash installation isn't foobared with the recent experiments I was doing.

The Editor Config stuff is duplicated by #288 which both shuffled files around and adds this config, but I guess I can sort out the merge conflict there when it happens, it's perfectly reasonable to include it here while there is activity editing the file.

Copy link
Collaborator

@alerque alerque left a comment

Choose a reason for hiding this comment

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

The only caveat is if you do include the Editor Config setup it does need to pass the lint tests. In my PR I resolve this by just joining that offending line into one long line instead of splitting it and having to worry about indentation. You could either resolve this the same way or drop the editor config commit, I don't care which way it goes.

@jamesd jamesd force-pushed the preload-git-completions branch from 43d5585 to 79d8b8b Compare April 13, 2021 15:38
@jamesd jamesd force-pushed the preload-git-completions branch from 79d8b8b to 4661cc9 Compare April 13, 2021 16:39
@alerque alerque merged commit 1dcfd26 into RichiH:main Apr 13, 2021
@jamesd jamesd deleted the preload-git-completions branch April 13, 2021 21:24
@alerque alerque added this to the v2.0.0 milestone Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants