Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt
-fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat
-Werror=format-security         -fstack-clash-protection -fcf-protection
      -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
-ffile-prefix-map=/build/bash/src=/usr/src/debug/bash -flto=auto
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS
-std=gnu17
uname output: Linux ryle 6.15.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 02 Aug
2025 01:20:06 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.3
Patch Level: 3
Release Status: release

Description:
    Tab completion with a dollar sign, then a possible variable name, in
the presence of ambiguity completes incorrectly.
    The reproduction instructions below illustrate one example, but another
can be constructed using the following file names
    * [$L.a [$L.b
    Perhaps the original intent was to allow variables inside array
indices, and the code is mis-identifying these filenames as array indices?

Repeat-By:
1. touch '[$L]'a '[$L]'b;
    2. less <tab>
       * The completion is less "[$L].
    3. type "a"
    4. press <tab>
       * The completion is less "[$L]a"
    5. press <enter>
    The following error is shown:   []a: No such file or directory

Fix:
I only found commit, c5c97b371044a44b701b6efa35984a3e1956344e, that may be
implicated, but I'm not smart enough to make anything out of it.

Reply via email to