I want to create a bind that executes g++ !$ in the same way that the shell would interpret it if I just typed it.
I tried:
bind '"\ee": "g++ !$"', but it doesn't execute command (just "pastes" it)bind -x '"\ee": "g++ !$"', but it doesn't interpret the!$part correctly
Any way to overcome it without using some custom shell scripts?

bind -x '"\ee": "g++ \!\$"'. Does it work? – Sudhi Mar 10 at 12:08