If user is on Windows and has `FORCE_POSIX_PATHS` set to False, then
trailing backslash will not enter multiline mode as this messed up
directory navigation
Support for the login option is very minimal, but the `XONSH_LOGIN`
variable is set in this case so that scripts may take an appropriate
action.
Fixes#517
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.
Anything stored in `env` is always cast to string so remove
`HIGHLIGHTING_LEXER` variable since it is directly passed to
prompt_toolkit and it is always a string when restoring from `env`
causing `prompt_toolkit` to throw an error because it expects a `Lexer`
instance.