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 zsh completion #16

Merged
merged 1 commit into from Nov 25, 2016

Conversation

itiut
Copy link
Contributor

@itiut itiut commented Nov 22, 2016

This includes 3 improvements for zsh completion.

  • Enable function autoloading.

    When gibo-completions.zsh is copied as _gibo into the directory contained in $fpath, running source path/to/gibo-completion.zsh becomes unnecessary.

  • Improve performance of listing boilerplate files by replacing find command with globbing.

    find command with -exec basename argument takes several hundreds of milliseconds but globbing doesn't take so much time.

     $/usr/bin/time find ~/.gitignore-boilerplates -name "*.gitignore" -exec basename \{\} .gitignore \; > /dev/null
         0.47 real         0.15 user         0.20 sys
     
     $/usr/bin/time echo ~/.gitignore-boilerplates/**/*.gitignore(:r:t) > /dev/null
         0.00 real         0.00 user         0.00 sys
    
  • Complete options, too.

     $ gibo -[press TAB]
     --help     -h  -- Display this help text
     --list     -l  -- List available boilerplates
     --upgrade  -u  -- Upgrade list of available boilerplates
     --version  -v  -- Display current script version
    

- enable function autoloading
- make `local_repo` a local variable
- improve performance of listing boilerplate files
- complete options too
@simonwhitaker simonwhitaker merged commit 57558e6 into simonwhitaker:master Nov 25, 2016
@simonwhitaker
Copy link
Owner

Cooooool! Thanks!

@itiut itiut deleted the improve-zsh-completion branch November 26, 2016 02:12
@itiut
Copy link
Contributor Author

itiut commented Nov 26, 2016

Thanks! Would you bump up the version to 1.0.5 for installation with Homebrew?

@simonwhitaker
Copy link
Owner

Done

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.

None yet

2 participants