kislyuk / argcomplete

Python and tab completion, better together.
https://kislyuk.github.io/argcomplete/
Apache License 2.0
1.39k stars 129 forks source link

ZSH Global Completion Issues on Ubuntu 22.04 #432

Closed flu0r1ne closed 1 year ago

flu0r1ne commented 1 year ago

I've identified an issue with ZSH auto-completion on Ubuntu 22.04, primarily stemming from various complications in the global auto-completion script. The key points included an incorrect usage of COMP_WORDS for matching modules and interpreter arguments in ZSH, a defective read command in the __python_argcomplete_scan_head function, and discrepancies in indexing methods. In response, I introduced base-1 indexing, a secondary read command, enabled regex matches in BASH_REMATCH, and made adjustments to the __python_argcomplete_run function. Additionally, we expanded the path to a Python script using tilde notation to facilitate auto-completion. The corrections have been tested on GNU bash 5.1.16(1)-release, zsh 5.8.1, and Linux ubuntu-22-04-2-desktop 5.19.0-42-generic.

flu0r1ne commented 1 year ago

Fix: #433.

flu0r1ne commented 1 year ago

Merged!