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

Autocompletion for zsh #3159

Merged
merged 1 commit into from Apr 13, 2013
Merged

Autocompletion for zsh #3159

merged 1 commit into from Apr 13, 2013

Conversation

ngoldbaum
Copy link
Contributor

This turns on bash compatibility mode for zsh's autocompletion, allowing zsh users to use the bash completion script included with ipython.

@ngoldbaum
Copy link
Contributor Author

This is my first time submitting a patch to ipython - please let me know if I've missed something or if I'm not following the contribution guidelines somehow.

@bfroehle
Copy link
Contributor

No, it looks fine. Only nitpick would be that the body of the if statement should be indented.

I haven't seen a definitive suggestion for how to load and call bashcompinit. In particular, I've seen a lot of variation in the flags to autoload, like "-U +X", "-Uz", etc. The zshbuiltins man page wasn't very enlightening to me. Perhaps you can chime in?

Also are there any bugs in the autocomplete after enabling it?

@ngoldbaum
Copy link
Contributor Author

Thanks for the suggestion about indentation. It should be fixed now.

I'm no zsh expert and the zshbuiltins page wasn't very enlightening for me either. This bit of code was gleaned from looking at a blog post (which I can't seem to find at the moment). Comparing google results, It seems that autoload -Uz is a more standard way of invoking bashcompinit.

With this change, the completions look identical in bash and zsh.

@ellisonbg
Copy link
Member

@minrk @ivanov should we have @ngoldbaum clean up the commit log on this PR?

@minrk
Copy link
Member

minrk commented Apr 13, 2013

I don't see any reason to, merge seems fine to me.

@ngoldbaum
Copy link
Contributor Author

Commit log should be cleaned up. Thanks for the suggestion - first time using git as well, I usually stick to hg!

@ellisonbg
Copy link
Member

Looks good merging. Thanks!

ellisonbg added a commit that referenced this pull request Apr 13, 2013
@ellisonbg ellisonbg merged commit 61efa5a into ipython:master Apr 13, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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

4 participants