diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-07-12 20:42:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-12 20:42:59 -0400 |
| commit | 30a3b66e8bc9f2fc65f5ff763841438ecda3a362 (patch) | |
| tree | c8286dc61d1ed0b6baefdd5b3dd8400d801cdcec /cmd2.py | |
| parent | f517ff8e21b7ea861d8907e5302be49829de8b9c (diff) | |
| parent | b6bf292d4746402dff9a40a2df639d0edd238300 (diff) | |
| download | cmd2-git-30a3b66e8bc9f2fc65f5ff763841438ecda3a362.tar.gz | |
Merge pull request #189 from python-cmd2/case_bugs
Fixed case-sensitivity bugs
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -891,13 +891,13 @@ class Cmd(cmd.Cmd): try: line = sm.input(safe_prompt) except EOFError: - line = 'EOF' + line = 'eof' else: self.stdout.write(safe_prompt) self.stdout.flush() line = self.stdin.readline() if not len(line): - line = 'EOF' + line = 'eof' else: line = line.rstrip('\r\n') @@ -1846,6 +1846,10 @@ class ParserManager: if case_insensitive: multilineCommand.setParseAction(lambda x: x[0].lower()) oneline_command.setParseAction(lambda x: x[0].lower()) + else: + multilineCommand.setParseAction(lambda x: x[0]) + oneline_command.setParseAction(lambda x: x[0]) + if blankLinesAllowed: blankLineTerminationParser = pyparsing.NoMatch else: |
