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

Fix autocomplete script errors in zsh #425

Merged
merged 2 commits into from
Jul 31, 2018
Merged

Conversation

anthonykeenan
Copy link

@anthonykeenan anthonykeenan commented Jul 31, 2018

I've been testing the autocomplete script in zsh, and I came accross a few errors.

  • shopt isn't available in zsh
  • compopt doesn't seem to be understood in zsh even when using bashcompinit, complete with the same options works, I've added an alias when using zsh for compopt->complete
  • added setopt COMPLETE_ALIASES when using zsh or the alias doesn't work properly when autocompleting

I've attempted to fix them by adding a check for the shell the script is being run under. I've tested the changes using Ubuntu Server 18.04 LTS and zsh 5.4.2, and Mac OS and zsh 5.5.1.

@codecov-io
Copy link

Codecov Report

Merging #425 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #425   +/-   ##
=========================================
  Coverage     89.37%   89.37%           
  Complexity      255      255           
=========================================
  Files             4        4           
  Lines          3482     3482           
  Branches        831      831           
=========================================
  Hits           3112     3112           
  Misses          178      178           
  Partials        192      192
Impacted Files Coverage Δ Complexity Δ
src/main/java/picocli/AutoComplete.java 86.51% <ø> (ø) 80 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e994d6c...76edb4e. Read the comment docs.

@remkop remkop merged commit 1e55a15 into remkop:master Jul 31, 2018
remkop added a commit that referenced this pull request Jul 31, 2018
@remkop
Copy link
Owner

remkop commented Jul 31, 2018

Merged and added credits in the release notes.
Thanks for the contribution!

@remkop remkop added this to the 3.4 milestone Aug 1, 2018
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.

3 participants