I wouldn't normally do something like this but issue #487 brought to
my attention the fact that too many of the python modules don't have
an encoding comment and of those that do there is a lot of pointless
inconsistency in the style of the comment.
This fixes most of the lint errors in the history code. It also fixes
two bugs that were found by pylint due to misnamed variables. This patch
does not make any functional changes. I'll fix the remaining lint errors
in a subsequent patch when I tackle cross-module issues.
Fix the handling of negative history indexes where a slice specification
is involved. Negative indexes not part of a slice specification worked by
accident because the argparse module (see section "16.4.4.3 Arguments
containing --") treats such values as positional arguments (which is a
misfeature of argparse in my opinion). I've also added unit tests for
"history show" to keep this from being broken in the future.