question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

instructions for enabling zsh completions for oh-my-zsh don't work

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Fedora 31
  • Poetry version: 1.0.0
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

Instructions on how to enable poetry completions for zsh with oh-my-zsh on https://python-poetry.org/docs/#enable-tab-completion-for-bash-fish-or-zsh don’t do anything. Firstly, the oh-my-zsh plugin has to be named poetry.plugin.zsh, not _poetry. Secondly, it’s better be installed into .oh-my-zsh/custom/plugins. Thirdly, when it’s enabled with plugins(poetry ...), it results in a bunch of compinit error messages on start.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

50reactions
tsiq-albertocommented, Dec 13, 2019

I found the following instructions to work on MacOS:

print -l $fpath | grep '.oh-my-zsh/completions'
mkdir ~/.oh-my-zsh/completions
poetry completions zsh  > ~/.oh-my-zsh/completions/_poetry
rm ~/.zcompdump*

source ~/.zshrc throws no errors and gives correct completions.

A similar discussion: https://github.com/gopasspw/gopass/issues/585

7reactions
pietrodncommented, Oct 18, 2021

I confirm that the Oh-My-Zsh autocompletion works by following the exact same instructions described in the documentation:

mkdir $ZSH_CUSTOM/plugins/poetry
poetry completions zsh > $ZSH_CUSTOM/plugins/poetry/_poetry

For oh-my-zsh, you must then enable poetry in your ~/.zshrc plugins

plugins(
	poetry
	...
	)

And then restart the shell. I think that this issue can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bash completion does not work in ZSH/Oh-My-ZSH because ...
I'm using ZSH 5.8 with Oh-My-ZSH. Bash completions generally seem to work in ZSH. Oh-My-ZSH sets up completions using
Read more >
A Guide to the Zsh Completion with Examples
How work the Zsh completion system and how to configure it according to your needs, without any framework or bloated library.
Read more >
Completions stopped working after upgrading zsh
Completions stopped working after upgrading zsh · Starting with removing/disabling oh-my-zsh and see if it still happens is a good first step.
Read more >
zsh auto-completion - Kubernetes
Sourcing the completion script in your shell enables kubectl autocompletion. ... kubectl autocompletion will automatically work with it.
Read more >
Oh-My-Zsh Configuration Guide for MacOs Terminal
Oh-my-Zsh configuration turned out to be not so straight-forward with instructions being scattered all over, so I decided to gather it all in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found