Okay, here me out.. I want to create some kind of mapping for the dollar sign $ in Bash. Its the most used special character for me and not in the least difficult place. Yes, I could create an AutoHotKey or Linux equivalent for the Capslock. But within Bash, using an alais wont work because they dont expand more than the first position $0, and arent really designed to. Which is essential because I use $var_name all the time as arguments. Functions can only be shown with the 'type' command.
I would use a key like xx or , and then expand the alias, or other similar operation, to replace that with $. The ',' key is an arithmetic character and is reserved, although I was able to create an alias with it that does expand (only in the first position).
Any solutions or suggestions? Thanks..
Related thread about alias expansion: how to expand aliases inline in bash?
Here is the answer from below using ',,' exportable into bash, plus one for last arg and the help flag:
bind '",,": "$"'
echo "bind '\",,\": \"\$\"'">>~/.bashrc
echo "bind '\",l\": \"\$_\"'">>~/.bashrc
echo "bind '\",h\": \"--help\"'">>~/.bashrc
echo "function helpany { \$1 --help || help \$1 || man \$1 || info \$1; }">>~/.bashrc
And my list of aliases, functions and binds in a public Gist: https://gist.github.com/auwsom/804b4470d22ae00d113cbf5b4eaba73c