or download this
The cmdhist shell option, if enabled, causes the shell to attempt
to save each line of a multi-line command in the same history entry,
...
embedded newlines instead of semicolons. See the description of the
shopt builtin ... under SHELL BUILTIN COMMANDS for information on
setting and unsetting shell options.