Check your /root/.bashrc file for these lines

if [ -f /etc/bash_completion ]; then
  . /etc/bash_completion
fi

If they do not exist add them to the end of the file using your favorite text editor.

ZSH

相比之下,zsh 就比较容易设置了,直接编辑 .zshrc,添加 sudo 插件即可。

Reference