Another attempt at making Bash's history work

See the parent commit's message.