I have a custom created script to change my apt sources in /home/USERNAME/Scripts
. I have added this path to the secure_path variable in /etc/sudoers
.
When I use bash
to run my script as sudo
it autocompletes just fine, but when using zsh
it does not.
Advertisement
Answer
Because zsh
doesn’t have autocompletion without adding it to .zshrc
.
Look for a good .zshrc
with autocompletion, on GitHub for example (As a fan of Fish and Zsh, i would recommend this one)…
If .zshrc
is empty/absent, it’s because you probably installed zsh after creating your own user, and then ran chsh /path/to/zsh
which will not give you .zshrc
(in ~/).