#773070 zsh: ignore-parents in completion ignores too much with bind mounts

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
Roman Odaisky
Date:
2014-12-13 23:03:07 UTC
Severity:
minor
#773070#5
Date:
2014-12-13 22:19:46 UTC
From:
To:
With zshrc containing the following:

zstyle ':completion:*' ignore-parents parent pwd ..

Try:

cd $some_path
mkdir x y
mount --bind x y
cd x
cd ../<Tab>

Expected:

completion should suggest all directories under $some_path except x

Actually:

y is excluded as well, which is wrong.

Rationale:

There’s no sense in doing `cd x; cd ../x` except cases even more narrow
than the one I’m describing; at the same time, cd ../other-directory
when the other-directory is bind-mounted to the current one does make
sense (in my case, there were further bind mounts in that directory so
it behaved quite differently).