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

Missing command in instructions for adding tab completions to zsh #7966

Closed
jsdodge opened this issue May 20, 2023 · 4 comments
Closed

Missing command in instructions for adding tab completions to zsh #7966

jsdodge opened this issue May 20, 2023 · 4 comments
Labels
area/docs Documentation issues/improvements status/triage This issue needs to be triaged

Comments

@jsdodge
Copy link

jsdodge commented May 20, 2023

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Following the instructions for enabling tab completions on zsh produce a zsh: no such file or directory error. The instructions returned by poetry help completions include additional commands, which execute without error:

  ZSH:
  
  ZSH completions are commonly stored in any directory listed in your `$fpath` variable. To use these completions, you must either add the generated script to one of those directories, or add your own to this list.
  
  Adding a custom directory is often the safest best if you're unsure of which directory to use. First create the directory, for this example we'll create a hidden directory inside our `$HOME` directory
  
  `mkdir ~/.zfunc`
  
  Then add the following lines to your `.zshrc` just before `compinit`
  
  `fpath+=~/.zfunc`
  
  Now you can install the completions script using the following command
  
  `poetry completions zsh > ~/.zfunc/_poetry`
  
  You must then either log out and log back in, or simply run
  
  `exec zsh`
  
  For the new completions to take affect.
  
@jsdodge jsdodge added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels May 20, 2023
@Secrus
Copy link
Member

Secrus commented May 20, 2023

This is not a Poetry issue. Your shell is misconfigured. Our instruction is generic and expects you to handle shell config yourself.

@Secrus Secrus closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2023
@jsdodge
Copy link
Author

jsdodge commented May 20, 2023

Forgive my persistence, but I do not believe that the error occurred because my shell was misconfigured. The error occurred when I followed the online instructions, which direct the user to use

poetry completions zsh > ~/.zfunc/_poetry

then add the following lines to ~/.zshrc, if they do not already exist:

fpath+=~/.zfunc
autoload -Uz compinit && compinit

When I followed these instructions, I received an error that ~/.zfunc/_poetry did not exist. The reason I think this is not due to misconfiguration of my shell is that the instructions provided by poetry help completions include the following lines, which were all I needed to avoid the error:

Adding a custom directory is often the safest best if you're unsure of which directory to use. First create the directory, for this example we'll create a hidden directory inside our $HOME directory

mkdir ~/.zfunc

I am suggesting that these command-line instructions be included in the online instructions as well.

@dimbleby
Copy link
Contributor

the best way to make docs changes happen is just to raise an MR with the change you want to see

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants