How do I fix tab-completion escaping variables on lsst-dev01?

On lsst-dev01 under bash (4.2.49), if I type

ls ${VALIDATION_DATA_HSC_DIR}

and then press the Tab key, I get this:

ls \$\{VALIDATION_DATA_HSC_DIR\}

which is very much not what I wanted.

How do I turn off this backslash escape behavior and instead get variable expansion and completion?

I’ve been reading a bit about shopt, but I don’t fully get it.

Ah, the answer is

shopt -s direxpand

I added this line to my ~/.bashrc and tab expansion now works on a new login.

@jalt can we get this added to the default .bashrc? Most people will expect this behavior.