I'm running Ubuntu 16.10 with ZFS and ZSH installed.
As the root user, I can press tab to autocomplete zfs commands and paths. It works both in
bash. As a non-root user, I can do so in bash. It works like this:
# zfs snapshot poTab →
# zfs snapshot pool
Actual behaviour in zsh:
While it always works fine in bash, the non-root user (which is in the sudo group) can not tab complete in
zsh. I get a permission error like this:
$ sudo zfs snapshot poTab →
$ sudo zfs snapshot poPermission denied the ZFS utilities must be run as root. Permission denied the ZFS utilities must be run as root. zfs zfs snapshot po
I assume it has problems since the user do not have sufficient permissions by his own to read a particular something. Via
sudo, the user do have permissions to do so, but I guess that the
zsh compinit does not run via
But there is obviously some way to get it to work, since Bash manages it just fine.
How can I get
zsh to autocomplete correctly?