I'd like Bash to stop removing variable names from paths and replacing them by their values. I tried several 'shopts' settings in various bash versions but was not successful in keeping a variable unsubstituted after applying path auto-completion. After entering $APPSERVER and hitting TAB I would like the following result:$APPSERVER/foo/barinstead of/terribly-long-path-to-desired-appserver-instance/foo/barThe latter one makes extraction of a script afterwards cumbersome. Does anybody know how to set up BASH to auto-complete but leave the variable name in place?
Bash: How to avoid variable name substitution when using auto-completion?
bash;environment variables