[Pkg-zsh-devel] Bug#1101675: Bug#1101675: Bug#1101675: zsh: completion suddenly broken

Colin Watson cjwatson at debian.org
Tue Apr 1 11:28:57 BST 2025


On Mon, Mar 31, 2025 at 02:30:17AM +0200, Vincent Lefevre wrote:
>Control: reassign -1 python3-argcomplete 3.6.1-1
>Control: retitle -1 python3-argcomplete: breaks zsh completions
>Control: severity -1 critical
>Control: tags -1 - moreinfo unreproducible
>
>The issue comes from
>
>lrwxrwxrwx 1 root root 84 2025-03-25 19:05:01 /usr/share/zsh/vendor-completions/_python-argcomplete -> ../../../lib/python3/dist-packages/argcomplete/bash_completion.d/_python-argcomplete
>
>This is a regression.
>
>To reproduce:
>
>rm -f ~/.zcompdump; mkdir -p testdir; touch $_/FOO; autoload -U compinit; $_ -D; zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'; print -z : testdir/f
>
>then type the <tab> key 1 or 2 times.

I'm not a zsh user, but I did make the apparently-offending 
python-argcomplete upload, so I tried to reproduce this, unsuccessfully.  
Here's a complete transcript of what I did:

   <cjwatson at camorr ~>$ incus delete --force rich-lamb
   <cjwatson at camorr ~>$ incus launch images:debian/trixie
   Launching the instance
   Instance name is: sacred-mosquito
   <cjwatson at camorr ~>$ incus shell sacred-mosquito
   root at sacred-mosquito:~# apt -qy install zsh python3-argcomplete
   Reading package lists...
   Building dependency tree...
   Reading state information...
   Installing:
     python3-argcomplete  zsh

   Installing dependencies:
     ca-certificates        libpython3.13-stdlib  openssl          python3.13-minimal
     libgdbm6t64            libreadline8t64       python3          readline-common
     libpython3-stdlib      libsqlite3-0          python3-minimal  zsh-common
     libpython3.13-minimal  media-types           python3.13

   Suggested packages:
     gdbm-l10n    python3-tk    python3.13-venv  binutils        readline-doc
     python3-doc  python3-venv  python3.13-doc   binfmt-support  zsh-doc

   Summary:
     Upgrading: 0, Installing: 17, Removing: 0, Not Upgrading: 0
     Download size: 13.8 MB
     Space needed: 47.7 MB / 72.7 GB available

   Get:1 http://deb.debian.org/debian trixie/main amd64 libpython3.13-minimal amd64 3.13.2-2 [859 kB]
   Get:2 http://deb.debian.org/debian trixie/main amd64 python3.13-minimal amd64 3.13.2-2 [2,210 kB]
   Get:3 http://deb.debian.org/debian trixie/main amd64 python3-minimal amd64 3.13.2-2 [27.1 kB]
   Get:4 http://deb.debian.org/debian trixie/main amd64 media-types all 13.0.0 [29.3 kB]
   Get:5 http://deb.debian.org/debian trixie/main amd64 readline-common all 8.2-6 [69.4 kB]
   Get:6 http://deb.debian.org/debian trixie/main amd64 libreadline8t64 amd64 8.2-6 [169 kB]
   Get:7 http://deb.debian.org/debian trixie/main amd64 libsqlite3-0 amd64 3.46.1-2 [913 kB]
   Get:8 http://deb.debian.org/debian trixie/main amd64 libpython3.13-stdlib amd64 3.13.2-2 [1,952 kB]
   Get:9 http://deb.debian.org/debian trixie/main amd64 python3.13 amd64 3.13.2-2 [746 kB]
   Get:10 http://deb.debian.org/debian trixie/main amd64 libpython3-stdlib amd64 3.13.2-2 [10.1 kB]
   Get:11 http://deb.debian.org/debian trixie/main amd64 python3 amd64 3.13.2-2 [28.1 kB]
   Get:12 http://deb.debian.org/debian trixie/main amd64 openssl amd64 3.4.1-1 [1,427 kB]
   Get:13 http://deb.debian.org/debian trixie/main amd64 ca-certificates all 20241223 [164 kB]
   Get:14 http://deb.debian.org/debian trixie/main amd64 libgdbm6t64 amd64 1.24-2 [75.2 kB]
   Get:15 http://deb.debian.org/debian trixie/main amd64 python3-argcomplete all 3.6.1-1 [40.9 kB]
   Get:16 http://deb.debian.org/debian trixie/main amd64 zsh-common all 5.9-8 [4,146 kB]
   Get:17 http://deb.debian.org/debian trixie/main amd64 zsh amd64 5.9-8+b7 [915 kB]
   Fetched 13.8 MB in 2s (7,783 kB/s)
   Preconfiguring packages ...
   Selecting previously unselected package libpython3.13-minimal:amd64.
   (Reading database ... 11417 files and directories currently installed.)
   Preparing to unpack .../libpython3.13-minimal_3.13.2-2_amd64.deb ...
   Unpacking libpython3.13-minimal:amd64 (3.13.2-2) ...
   Selecting previously unselected package python3.13-minimal.
   Preparing to unpack .../python3.13-minimal_3.13.2-2_amd64.deb ...
   Unpacking python3.13-minimal (3.13.2-2) ...
   Setting up libpython3.13-minimal:amd64 (3.13.2-2) ...
   Setting up python3.13-minimal (3.13.2-2) ...
   Selecting previously unselected package python3-minimal.
   (Reading database ... 11741 files and directories currently installed.)
   Preparing to unpack .../0-python3-minimal_3.13.2-2_amd64.deb ...
   Unpacking python3-minimal (3.13.2-2) ...
   Selecting previously unselected package media-types.
   Preparing to unpack .../1-media-types_13.0.0_all.deb ...
   Unpacking media-types (13.0.0) ...
   Selecting previously unselected package readline-common.
   Preparing to unpack .../2-readline-common_8.2-6_all.deb ...
   Unpacking readline-common (8.2-6) ...
   Selecting previously unselected package libreadline8t64:amd64.
   Preparing to unpack .../3-libreadline8t64_8.2-6_amd64.deb ...
   Adding 'diversion of /lib/x86_64-linux-gnu/libhistory.so.8 to /lib/x86_64-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64'
   Adding 'diversion of /lib/x86_64-linux-gnu/libhistory.so.8.2 to /lib/x86_64-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64'
   Adding 'diversion of /lib/x86_64-linux-gnu/libreadline.so.8 to /lib/x86_64-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64'
   Adding 'diversion of /lib/x86_64-linux-gnu/libreadline.so.8.2 to /lib/x86_64-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64'
   Unpacking libreadline8t64:amd64 (8.2-6) ...
   Selecting previously unselected package libsqlite3-0:amd64.
   Preparing to unpack .../4-libsqlite3-0_3.46.1-2_amd64.deb ...
   Unpacking libsqlite3-0:amd64 (3.46.1-2) ...
   Selecting previously unselected package libpython3.13-stdlib:amd64.
   Preparing to unpack .../5-libpython3.13-stdlib_3.13.2-2_amd64.deb ...
   Unpacking libpython3.13-stdlib:amd64 (3.13.2-2) ...
   Selecting previously unselected package python3.13.
   Preparing to unpack .../6-python3.13_3.13.2-2_amd64.deb ...
   Unpacking python3.13 (3.13.2-2) ...
   Selecting previously unselected package libpython3-stdlib:amd64.
   Preparing to unpack .../7-libpython3-stdlib_3.13.2-2_amd64.deb ...
   Unpacking libpython3-stdlib:amd64 (3.13.2-2) ...
   Setting up python3-minimal (3.13.2-2) ...
   Selecting previously unselected package python3.
   (Reading database ... 12230 files and directories currently installed.)
   Preparing to unpack .../0-python3_3.13.2-2_amd64.deb ...
   Unpacking python3 (3.13.2-2) ...
   Selecting previously unselected package openssl.
   Preparing to unpack .../1-openssl_3.4.1-1_amd64.deb ...
   Unpacking openssl (3.4.1-1) ...
   Selecting previously unselected package ca-certificates.
   Preparing to unpack .../2-ca-certificates_20241223_all.deb ...
   Unpacking ca-certificates (20241223) ...
   Selecting previously unselected package libgdbm6t64:amd64.
   Preparing to unpack .../3-libgdbm6t64_1.24-2_amd64.deb ...
   Unpacking libgdbm6t64:amd64 (1.24-2) ...
   Selecting previously unselected package python3-argcomplete.
   Preparing to unpack .../4-python3-argcomplete_3.6.1-1_all.deb ...
   Unpacking python3-argcomplete (3.6.1-1) ...
   Selecting previously unselected package zsh-common.
   Preparing to unpack .../5-zsh-common_5.9-8_all.deb ...
   Unpacking zsh-common (5.9-8) ...
   Selecting previously unselected package zsh.
   Preparing to unpack .../6-zsh_5.9-8+b7_amd64.deb ...
   Unpacking zsh (5.9-8+b7) ...
   Setting up media-types (13.0.0) ...
   Setting up libgdbm6t64:amd64 (1.24-2) ...
   Setting up zsh-common (5.9-8) ...
   Setting up libsqlite3-0:amd64 (3.46.1-2) ...
   Setting up zsh (5.9-8+b7) ...
   Setting up openssl (3.4.1-1) ...
   Setting up readline-common (8.2-6) ...
   Setting up ca-certificates (20241223) ...
   Updating certificates in /etc/ssl/certs...
   152 added, 0 removed; done.
   Setting up libreadline8t64:amd64 (8.2-6) ...
   Setting up libpython3.13-stdlib:amd64 (3.13.2-2) ...
   Setting up libpython3-stdlib:amd64 (3.13.2-2) ...
   Setting up python3.13 (3.13.2-2) ...
   Setting up python3 (3.13.2-2) ...
   running python rtupdate hooks for python3.13...
   running python post-rtupdate hooks for python3.13...
   Setting up python3-argcomplete (3.6.1-1) ...
   Processing triggers for systemd (257.4-3) ...
   Processing triggers for debianutils (5.21) ...
   Processing triggers for libc-bin (2.41-6) ...
   Processing triggers for ca-certificates (20241223) ...
   Updating certificates in /etc/ssl/certs...
   0 added, 0 removed; done.
   Running hooks in /etc/ca-certificates/update.d...
   done.
   root at sacred-mosquito:~# adduser cjwatson
   New password:
   Retype new password:
   passwd: password updated successfully
   Changing the user information for cjwatson
   Enter the new value, or press ENTER for the default
           Full Name []: Colin Watson
           Room Number []:
           Work Phone []:
           Home Phone []:
           Other []:
   Is the information correct? [Y/n] y
   root at sacred-mosquito:~# su - cjwatson
   cjwatson at sacred-mosquito:~$ zsh
   This is the Z Shell configuration function for new users,
   zsh-newuser-install.
   You are seeing this message because you have no zsh startup files
   (the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
   ~).  This function can help you with a few settings that should
   make your use of the shell easier.

   You can:

   (q)  Quit and do nothing.  The function will be run again next time.

   (0)  Exit, creating the file ~/.zshrc containing just a comment.
        That will prevent this function being run again.

   (1)  Continue to the main menu.

   (2)  Populate your ~/.zshrc with the configuration recommended
        by the system administrator and exit (you will need to edit
        the file by hand, if so desired).

   --- Type one of the keys in parentheses --- 2
   /home/cjwatson/.zshrc:15: scalar parameter HISTFILE created globally in function zsh-newuser-install
   cjwatson at sacred-mosquito ~ % rm -f ~/.zcompdump
   cjwatson at sacred-mosquito ~ % mkdir -p testdir
   cjwatson at sacred-mosquito ~ % touch testdir/FOO
   cjwatson at sacred-mosquito ~ % autoload -U compinit
   cjwatson at sacred-mosquito ~ % compinit -D
   cjwatson at sacred-mosquito ~ % zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
   cjwatson at sacred-mosquito ~ % print -z : testdir/f

... and then pressing Tab immediately completes to "testdir/FOO".

What am I missing?

Thanks,

-- 
Colin Watson (he/him)                              [cjwatson at debian.org]



More information about the Pkg-zsh-devel mailing list