Why auto tab completion does not work in nmcli ?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprice Linux 7
  • NetworkManager
  • nmcli

Issue

  • Auto tab completion does not work with nmcli on RHEL7.
  • On pressing tab with nmcli command, it shows list of files available in present directory instead of showing nmcli options.
  • Upon pressing tab, nmcli command should show available options as below.
$ nmcli 
connection  device      general     help        networking  radio

Resolution

  • Install bash-completion package, 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-completion package 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.

Comments