Why auto tab completion does not work in nmcli ?
Environment
- Red Hat Enterprice Linux 7
- NetworkManager
- nmcli
Issue
- Auto tab completion does not work with nmcli on RHEL7.
- On pressing tab with
nmclicommand, it shows list of files available in present directory instead of showingnmclioptions. - Upon pressing tab,
nmclicommand should show available options as below.
$ nmcli
connection device general help networking radio
Resolution
- Install
bash-completionpackage, mostly it should be installed by default. Install it and restart shell.
# yum -y install bash-completion
Root Cause
- As bash-completion tool was missing, auto completion wont work.
Diagnostic Steps
- Check whether
bash-completionpackage is installed.
# rpm -qa | grep bash-completion
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
