Various command-line tools, such as gdb, ftp, sftp, etc, use ! to prefix a command to be run in a shell. So (for instance) !mkdir foo
will make a directory called foo. When using these tools inside emacs shell-mode, the shell-mode treats the ! as a history reference, does a history lookup, and expands the result before putting the command in the history ring. So if I have previously typed mkdir bar
, shell-mode puts mkdir bar foo
into the history ring.
Can I easily suppress all special treatment of ! in the shell history? I want the history to contain !mkdir foo
. I don't ever use ! at the shell, so I'd be happy with a way of turning this off entirely, although I suppose it could be made switchable based on the prompt.