@@ -400,32 +400,29 @@ class Cmd(cmd.Cmd):
400400
401401 Line-oriented command interpreters are often useful for test harnesses, internal tools, and rapid prototypes.
402402 """
403- # Attributes which are NOT dynamically settable at runtime
404- allow_cli_args = True # Should arguments passed on the command-line be processed as commands?
405- allow_redirection = True # Should output redirection and pipes be allowed
403+ # Attributes used to configure the ParserManager (all are not dynamically settable at runtime)
406404 blankLinesAllowed = False
407- commentGrammars = pyparsing .Or (
408- [pyparsing .pythonStyleComment , pyparsing .cStyleComment ]
409- )
405+ case_insensitive = True # Commands recognized regardless of case
406+ commentGrammars = pyparsing .Or ([pyparsing .pythonStyleComment , pyparsing .cStyleComment ])
410407 commentInProgress = pyparsing .Literal ('/*' ) + pyparsing .SkipTo (pyparsing .stringEnd ^ '*/' )
411-
412- default_to_shell = False # Attempt to run unrecognized commands as shell commands
413- excludeFromHistory = '''run r list l history hi ed edit li eof''' .split ()
414- exclude_from_help = ['do_eof' ] # Commands to exclude from the help menu
415-
416- # make sure your terminators are not in legalChars!
417408 legalChars = u'!#$%.:?@_-' + pyparsing .alphanums + pyparsing .alphas8bit
418409 multilineCommands = [] # NOTE: Multiline commands can never be abbreviated, even if abbrev is True
419410 prefixParser = pyparsing .Empty ()
420- redirector = '>' # for sending output to file
421- reserved_words = []
411+ redirector = '>' # for sending output to file
422412 shortcuts = {'?' : 'help' , '!' : 'shell' , '@' : 'load' , '@@' : '_relative_load' }
423- terminators = [';' ]
413+ terminators = [';' ] # make sure your terminators are not in legalChars!
414+
415+ # Attributes which are NOT dynamically settable at runtime
416+ allow_cli_args = True # Should arguments passed on the command-line be processed as commands?
417+ allow_redirection = True # Should output redirection and pipes be allowed
418+ default_to_shell = False # Attempt to run unrecognized commands as shell commands
419+ excludeFromHistory = '''run ru r history histor histo hist his hi h edit edi ed e eof eo''' .split ()
420+ exclude_from_help = ['do_eof' ] # Commands to exclude from the help menu
421+ reserved_words = []
424422
425423 # Attributes which ARE dynamically settable at runtime
426- abbrev = True # Abbreviated commands recognized
424+ abbrev = False # Abbreviated commands recognized
427425 autorun_on_edit = False # Should files automatically run after editing (doesn't apply to commands)
428- case_insensitive = True # Commands recognized regardless of case
429426 colors = (platform .system () != 'Windows' )
430427 continuation_prompt = '> '
431428 debug = False
@@ -448,7 +445,6 @@ class Cmd(cmd.Cmd):
448445 # This starts out as a dictionary but gets converted to an OrderedDict sorted alphabetically by key
449446 settable = {'abbrev' : 'Accept abbreviated commands' ,
450447 'autorun_on_edit' : 'Automatically run files after editing' ,
451- 'case_insensitive' : 'Upper- and lower-case both OK' ,
452448 'colors' : 'Colorized output (*nix only)' ,
453449 'continuation_prompt' : 'On 2nd+ line of input' ,
454450 'debug' : 'Show full error stack on error' ,
0 commit comments