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

Pdm zsh completions failure: pdm zsh: *:: :->_subcmds: command not found... #3031

Closed
Fury1 opened this issue Jul 18, 2024 · 1 comment · Fixed by #3034
Closed

Pdm zsh completions failure: pdm zsh: *:: :->_subcmds: command not found... #3031

Fury1 opened this issue Jul 18, 2024 · 1 comment · Fixed by #3034
Labels
🐛 bug Something isn't working

Comments

@Fury1
Copy link

Fury1 commented Jul 18, 2024

Steps to reproduce

PDM, version 2.17.0

Fresh install using curl as directed from installation.

Installation works as expected, completions are generated as specified for zsh. Completions also generate to file as expected .

Actual behavior

Completions fail with attempted use:

pdm zsh: *:: :->_subcmds: command not found...

Expected behavior

Zsh completions should work.

Environment Information

Fedora 40.

Zsh shell.

Fix

Upon completion definition inspection a backslash is missing from the generated completions on the output of pdm completion zsh > ~/.zfunc/_pdm

Line 54 below in _pdm.

7   _arguments -s -C -A '-*' \
  6     $arguments \
  5     {-c,--config}'[Specify another config file path\[env var: PDM_CONFIG_FILE\]]' \
  4     {-V,--version}'[Show the version and exit]' \
  3     {-I,--ignore-python}'[Ignore the Python path saved in .pdm-python]' \
  2     '--no-cache:Disable the cache for the current command. [env var: PDM_NO_CACHE]' \
  1     '--pep582:Print the command line to be eval by the shell for PEP 582:shell:(zsh bash fish tcsh csh)' \
54      {-n,--non-interactive}"[Don't show interactive prompts but use defaults. \[env var: PDM_NON_INTERACTIVE\]]"
  1     '*:: :->_subcmds' \
  2     && return 0
@Fury1 Fury1 added the 🐛 bug Something isn't working label Jul 18, 2024
@pgarrison
Copy link
Contributor

Reproduced in my environment and confirmed that adding the \ to _pdm line 54 fixes the completion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants