kislyuk/argcomplete

ZSH Global Completion Issues on Ubuntu 22.04

flu0r1ne opened this issue · 2 comments

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.

Fix: #433.

Merged!