Re: tab completing `/ cause weird errors messages.
On 6/25/22 8:27 PM, Emanuele Torre wrote: 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 -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 uname output: Linux t420 5.15.48-1-lts #1 SMP Thu, 16 Jun 2022 13:32:35 + x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 Patch Level: 16 Release Status: release Description: Tab completing `/ (backtick-slash) causes bash to print lots of weird error messages. Thanks for the report. It's trying to find the end of the directory name to see whether or not to append a slash. You can use $(/ instead, which behaves the way you want. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: tab completing `/ cause weird errors messages.
On Sun, 26 Jun 2022 02:27:59 +0200, Emanuele Torre wrote: > Description: > Tab completing `/ (backtick-slash) causes bash to print lots of > weird error messages. FWIW, this happens for any path, even not terminated by slash, at least on my system: $ cat `/usr/ -l: bad substitution: no closing "`" in `/usr/bin -l: bad substitution: no closing "`" in `/usr/bin bin -l: bad substitution: no closing "`" in `/usr/include -l: bad substitution: no closing "`" in `/usr/include include -l: bad substitution: no closing "`" in `/usr/lib -l: bad substitution: no closing "`" in `/usr/lib lib -l: bad substitution: no closing "`" in `/usr/lib32 -l: bad substitution: no closing "`" in `/usr/lib32 lib32-l: bad substitution: no closing "`" in `/usr/lib64 -l: bad substitution: no closing "`" in `/usr/lib64 lib64-l: bad substitution: no closing "`" in `/usr/local -l: bad substitution: no closing "`" in `/usr/local local-l: bad substitution: no closing "`" in `/usr/sbin -l: bad substitution: no closing "`" in `/usr/sbin sbin -l: bad substitution: no closing "`" in `/usr/share -l: bad substitution: no closing "`" in `/usr/share share-l: bad substitution: no closing "`" in `/usr/src -l: bad substitution: no closing "`" in `/usr/src src $ cat `/u-l: bad substitution: no closing "`" in `/usr sr/ $ cat `/tm-l: bad substitution: no closing "`" in `/tmp p/ $ bash --version GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) -- D.
tab completing `/ cause weird errors messages.
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 -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 uname output: Linux t420 5.15.48-1-lts #1 SMP Thu, 16 Jun 2022 13:32:35 + x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 Patch Level: 16 Release Status: release Description: Tab completing `/ (backtick-slash) causes bash to print lots of weird error messages. Repeat-By: Repoduce interactively: bash-5.1$ `/ binbash: bad substitution: no closing "`" in `/bin devbash: bad substitution: no closing "`" in `/dev homebash: bad substitution: no closing "`" in `/home lib64bash: bad substitution: no closing "`" in `/lib64 mntbash: bad substitution: no closing "`" in `/mnt procbash: bad substitution: no closing "`" in `/proc runbash: bad substitution: no closing "`" in `/run srvbash: bad substitution: no closing "`" in `/srv tmpbash: bad substitution: no closing "`" in `/tmp varbash: bad substitution: no closing "`" in `/var bootbash: bad substitution: no closing "`" in `/boot etcbash: bad substitution: no closing "`" in `/etc libbash: bad substitution: no closing "`" in `/lib lost+foundbash: bad substitution: no closing "`" in `/lost+found optbash: bad substitution: no closing "`" in `/opt rootbash: bad substitution: no closing "`" in `/root sbinbash: bad substitution: no closing "`" in `/sbin sysbash: bad substitution: no closing "`" in `/sys usrbash: bad substitution: no closing "`" in `/usr bash-5.1$ `/ Reproduce with a command line: bash-5.1$ printf '`/\t\t' | PS1='$ ' bash --norc --noprofile -i |& sed -n l $ `/\a$ binbash: bad substitution: no closing "`" in `/bin$ devbash: bad substitution: no closing "`" in `/dev$ homebash: bad substitution: no closing "`" in `/home$ lib64bash: bad substitution: no closing "`" in `/lib64$ mntbash: bad substitution: no closing "`" in `/mnt$ procbash: bad substitution: no closing "`" in `/proc$ runbash: bad substitution: no closing "`" in `/run$ srvbash: bad substitution: no closing "`" in `/srv$ tmpbash: bad substitution: no closing "`" in `/tmp$ varbash: bad substitution: no closing "`" in `/var$ $ bootbash: bad substitution: no closing "`" in `/boot$ etcbash: bad substitution: no closing "`" in `/etc$ libbash: bad substitution: no closing "`" in `/lib$ lost+foundbash: bad substitution: no closing "`" in `/lost+f\ optbash: bad substitution: no closing "`" in `/opt$ rootbash: bad substitution: no closing "`" in `/root$ sbinbash: bad substitution: no closing "`" in `/sbin$ sysbash: bad substitution: no closing "`" in `/sys$ usrbash: bad substitution: no closing "`" in `/usr$ $ $ `/$ > bash: unexpected EOF while looking for matching ``'$ bash: syntax error: unexpected end of file$ $ exit$ I was able to reproduce this bug in bash5 and bash4. but not in bash3, in which it behaves correctly (suggesting the files in / as completion options).