rapid7/metasploit-framework — pull request #816 by kernelsmith (2012-09-20 20:49:58+00:00)
Title: adds ability to use '!$' in msfconsole just like in bash

usage:
msf > set SRVHOST 192..168.101.102
SRVHOST => 192..168.101.102
msf > set LHOST !$
LHOST => 192..168.101.102
msf > set ReverseListenerBindAddress !$
ReverseListenerBindAddress => 1.1.1.1

History will reflect the replaced value, not the '!$'