Did you ever wonder why bash in Oracle Linux, Red Hat Enterprise Linux and other recent Linuxes escapes the dollar sign ($) when completing paths with the tabulator (tab) key like that:
[oracle@oratest01 ~]$ (KLM12102) ls -l \$ORACLE_BASE/diag
Answer
In bash >= 4.2.29 you have a “direxpand” option, which is NOT set by default. The bash manual explains it this way:
direxpand
If set, bash replaces directory names with the results of word expansion when performing filename completion. This changes the contents of the readline editing buffer. If not set, bash attempts to preserve what the user typed.
Solution
Set this option with
shopt -s direxpand
For example in your profile or wherever you feel it is useful.
Bye and be careful, as usual
– Martin
Thanks a lot ! This was driving me crazy !