We're using fake root environment at work. Basically it is a bunch of directories which emulate
dpkg if some environment variables are set. I.e. you run
apt-get install xxx and package
xxx is being installed into this environment but not into the system.
When I used bash, apt-get autocomplete worked perfectly. When I typed
apt-get install <Tab><Tab>, it showed me the list of local packages if I was in a fake root and the global list otherwise.
However, when I switched to zsh weird things happened. Currently only global packages show up in the list, though it was not always the case. Here is the complete story.
- I install Ubuntu and setup the fake root and zsh.
- I reinstall Ubuntu from scratch, saving
/homewhich was on a separate partition.
- Now zsh autocomplete always show me the packages from the fake root, regardless whether I have the env vars set.
- I reinstall zsh and zsh-common. Now completion always work as no fake root exist. At the same moment I realize that after reinstall the folder
/usr/share/zsh/functions/Completion, now apt-get completion rules are taken from
Could you please explain me what could happen here and how can I setup zsh completion work with both system and fake apt-get?
I use Ubuntu 16.04.2.
P.S. My fake root is not related to