Well, it is said that directories sometimes harbor more than one item :)
Fabien (of1)
#!/usr/bin/env bash
[[ -e "/tmp/Dir\\A" ]] && exit 2
mkdir -p /tmp/Dir\\A/dirB/ /tmp/Dir\\A/dir\\C/
touch /tmp/Dir\\A/fileA "/tmp/Dir\\A/file\\ B"
f_comp() {
local CP CPR="${1%\/*}" CPO
On 16/12/2022 23:18, Chet Ramey wrote:
Your arguments undergo word expansion, including double-quote processing,
before compgen sees them.
Thank you very much for your thorough explanation. I also take this
opportunity to thank you for
https://lists.gnu.org/archive/html/bug-bash/2022-11/msg0
On 12/14/22 7:55 PM, Fabien Orjollet wrote:
Bash Version: 5.2
Patch Level: 2
Release Status: release
Description:
compgen's behavior regarding backslash processing is altered by
any call to bind.
Therefore, file and directory names containing a backslash are
not completed on
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall
uname output: Linux debtest 6.0.0-5-amd64 #1 SMP PREEMPT_DYNAMIC Debian
6.0.10-2 (2022-12-01)