pypa/pip

Mac zsh auto=completion error "command not found: compdef"

クローズ

#12,738 opened on 2024/05/30

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)Python (3,032 件のフォーク)batch import
C: autocompletehelp wantedstate: awaiting PRtype: bug

Repository metrics

Stars
 (8,952 個のスター)
PR merge metrics
 (平均マージ 56d 1h) (30d で 57 merged PRs)

説明

Description

Follow instructions at PIP command completion to run pip completion --zsh >> ~/.zprofile to set-up autocompletion.

When launching new shell, I get the error: /Users/*******/.zprofile:20: command not found: compdef

Expected behavior

No errors should be there when launching new shell. Autocompletion should work.

pip version

24.0

Python version

3.10.6

OS

Mac OS Sonoma 14.4.1

How to Reproduce

On Mac system with homebrew installed python, run the autocompletion set-up command as written in instruction.

Output

Shell command pip completion --zsh >> ~/.zprofile runs without error. However, autocompletion doesn't work. When launching new shell .zshrc gets executed and we get an error instead: /Users/*******/.zprofile:20: command not found: compdef

Code of Conduct

コントリビューターガイド