RFE - add support for for directory environment variable in bash

Solution Verified - Updated -


  • Red Hat Enterprise Linux 7
  • bash-4.2.46-29.el7_4


  • In bash-4.3, when use tab to auto complete the variable, if the variable is
    a directory, it will append a "/" after the variable.
# ls $HOM    -> click TAB
# ls $HOME/
  • RHEL provides bash-4.2 in RHEL7, it will append a space after the variable.
# ls $HOM    -> click TAB
# ls $HOME<space>


Update to bash-4.2.46-31.el7 shipped with Advisory RHBA-2018:3117 or newer.

Root Cause

This enhancement was backported from bash-4.3, tracked by Bug 1495398.

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.