[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compgen -d odd symlink behavior

From: Ville Skyttä
Subject: compgen -d odd symlink behavior
Date: Sun, 21 Apr 2019 13:39:55 +0300

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -Wdate-time
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux localhost.localdomain 4.15.0-47-generic #50-Ubuntu SMP
Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.4
Patch Level: 19
Release Status: release


Originally reported in https://github.com/scop/bash-completion/issues/118
This is on Ubuntu's 4.4.19, but reproducible with Fedora development's
5.0.2 as well.


$ ( mkdir -p 1/11 1/x 2/22; ln -sf ../1/x 2/x; cd 2/x; compgen -d ../ )

Only ../x is output, but depending on interpretation, in my opinion either
../22 or ../11 should have been there. Note that this occurs only if I'm in
the "x" dir that is a symlink. If I'm in the "real x", i.e. 1/x, the
problem does not occur, "../11" is in the output as expected:

$ ( mkdir -p 1/11 1/x 2/22; ln -sf ../1/x 2/x; cd 1/x; compgen -d ../ )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]