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

g function autocomplete not working #13

Closed
opdavies opened this issue Jun 19, 2020 · 3 comments
Closed

g function autocomplete not working #13

opdavies opened this issue Jun 19, 2020 · 3 comments
Labels

Comments

@opdavies
Copy link
Owner

opdavies commented Jun 19, 2020

Tab completion not working for the g function. For example when trying to checkout a branch:

~/Code/dransible main * $ g checkout
README.md      ansible.cfg    composer.lock  docs/          vendor/
Vagrantfile    composer.json  config/        tools/         web/

~/Code/dransible main * $ git checkout
HEAD            main            origin/HEAD     origin/main
d9              master          origin/d9       origin/master
@opdavies opdavies added the zsh label Jun 19, 2020
@opdavies
Copy link
Owner Author

opdavies commented Jun 19, 2020

Running compdef manually fixes the problem for that session:

~/Code/dransible main * $ compdef g=git

~/Code/dransible main * $ g checkout
HEAD            main            origin/HEAD     origin/main
d9              master          origin/d9       origin/master

@opdavies
Copy link
Owner Author

I've noticed that my completion.zsh isn't loading from the post directory

Changing the following in .zshrc fixes it, though I want to investigate further and understand the cause rather than blindly committing it:

- for config in "$_dir"/post/**/*~*.zwc(N-.); do
+ for config in "$_dir"/post/**/*.zsh; do

@opdavies
Copy link
Owner Author

Possibly related to thoughtbot/dotfiles#634 and thoughtbot/dotfiles#648, as I'm not not including setopt extendedglob elsewhere.

opdavies added a commit that referenced this issue Jun 20, 2020
Enable the extendedglob option, which is needed for the scripts in the
`configs/post` directory to load correctly.

This includes the completion script that is needed to fix #12 and #13.
opdavies added a commit that referenced this issue Jun 20, 2020
Enable the extendedglob option, which is needed for the scripts in the
`configs/post` directory to load correctly.

This includes the completion script that is needed to fix #12 and #13.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant