##// END OF EJS Templates
Merge pull request #9472 from Carreau/stupid-me...
Thomas Kluyver -
r22339:6ad2eb91 merge
parent child Browse files
Show More
@@ -34,11 +34,13 b' This is an handy alias to `ipython history trim --keep=0`'
34 class HistoryTrim(BaseIPythonApplication):
34 class HistoryTrim(BaseIPythonApplication):
35 description = trim_hist_help
35 description = trim_hist_help
36
36
37 backup = Bool(False).tag(config=True,
37 backup = Bool(False,
38 help="Keep the old history file as history.sqlite.<N>")
38 help="Keep the old history file as history.sqlite.<N>"
39 ).tag(config=True)
39
40
40 keep = Int(1000).tag(config=True,
41 keep = Int(1000,
41 help="Number of recent lines to keep in the database.")
42 help="Number of recent lines to keep in the database."
43 ).tag(config=True)
42
44
43 flags = Dict(dict(
45 flags = Dict(dict(
44 backup = ({'HistoryTrim' : {'backup' : True}},
46 backup = ({'HistoryTrim' : {'backup' : True}},
@@ -118,11 +120,12 b' class HistoryTrim(BaseIPythonApplication):'
118
120
119 class HistoryClear(HistoryTrim):
121 class HistoryClear(HistoryTrim):
120 description = clear_hist_help
122 description = clear_hist_help
121 keep = Int(0).tag(config=False,
123 keep = Int(0,
122 help="Number of recent lines to keep in the database.")
124 help="Number of recent lines to keep in the database.")
123
125
124 force = Bool(False).tag(config=True,
126 force = Bool(False,
125 help="Don't prompt user for confirmation")
127 help="Don't prompt user for confirmation"
128 ).tag(config=True)
126
129
127 flags = Dict(dict(
130 flags = Dict(dict(
128 force = ({'HistoryClear' : {'force' : True}},
131 force = ({'HistoryClear' : {'force' : True}},
@@ -509,10 +509,12 b' class AutocallChecker(PrefilterChecker):'
509
509
510 priority = Integer(1000).tag(config=True)
510 priority = Integer(1000).tag(config=True)
511
511
512 function_name_regexp = CRegExp(re_fun_name).tag(config=True,
512 function_name_regexp = CRegExp(re_fun_name,
513 help="RegExp to identify potential function names.")
513 help="RegExp to identify potential function names."
514 exclude_regexp = CRegExp(re_exclude_auto).tag(config=True,
514 ).tag(config=True)
515 help="RegExp to exclude strings with this start from autocalling.")
515 exclude_regexp = CRegExp(re_exclude_auto,
516 help="RegExp to exclude strings with this start from autocalling."
517 ).tag(config=True)
516
518
517 def check(self, line_info):
519 def check(self, line_info):
518 "Check if the initial word/function is callable and autocall is on."
520 "Check if the initial word/function is callable and autocall is on."
@@ -273,17 +273,19 b' class PromptManager(Configurable):'
273 """)
273 """)
274 def _lazy_evaluate_fields_default(self): return lazily_evaluate.copy()
274 def _lazy_evaluate_fields_default(self): return lazily_evaluate.copy()
275
275
276 in_template = Unicode('In [\\#]: ').tag(config=True,
276 in_template = Unicode('In [\\#]: ',
277 help="Input prompt. '\\#' will be transformed to the prompt number")
277 help="Input prompt. '\\#' will be transformed to the prompt number"
278 in2_template = Unicode(' .\\D.: ').tag(config=True,
278 ).tag(config=True)
279 help="Continuation prompt.")
279 in2_template = Unicode(' .\\D.: ',
280 out_template = Unicode('Out[\\#]: ').tag(config=True,
280 help="Continuation prompt.").tag(config=True)
281 help="Output prompt. '\\#' will be transformed to the prompt number")
281 out_template = Unicode('Out[\\#]: ',
282
282 help="Output prompt. '\\#' will be transformed to the prompt number"
283 justify = Bool(True).tag(config=True, help="""
283 ).tag(config=True)
284
285 justify = Bool(True, help="""
284 If True (default), each prompt will be right-aligned with the
286 If True (default), each prompt will be right-aligned with the
285 preceding one.
287 preceding one.
286 """)
288 """).tag(config=True)
287
289
288 # We actually store the expanded templates here:
290 # We actually store the expanded templates here:
289 templates = Dict()
291 templates = Dict()
@@ -91,8 +91,9 b' class IPythonPTLexer(Lexer):'
91 class TerminalInteractiveShell(InteractiveShell):
91 class TerminalInteractiveShell(InteractiveShell):
92 colors_force = True
92 colors_force = True
93
93
94 space_for_menu = Integer(6).tag(config=True, help='Number of line at the bottom of the screen '
94 space_for_menu = Integer(6, help='Number of line at the bottom of the screen '
95 'to reserve for the completion menu')
95 'to reserve for the completion menu'
96 ).tag(config=True)
96
97
97 def _space_for_menu_changed(self, old, new):
98 def _space_for_menu_changed(self, old, new):
98 self._update_layout()
99 self._update_layout()
@@ -108,36 +109,36 b' class TerminalInteractiveShell(InteractiveShell):'
108 in Unix, Control-Z/Enter in Windows). By typing 'exit' or 'quit',
109 in Unix, Control-Z/Enter in Windows). By typing 'exit' or 'quit',
109 you can force a direct exit without any confirmation.""",
110 you can force a direct exit without any confirmation.""",
110 )
111 )
111 editing_mode = Unicode('emacs').tag(config=True,
112 editing_mode = Unicode('emacs',
112 help="Shortcut style to use at the prompt. 'vi' or 'emacs'.",
113 help="Shortcut style to use at the prompt. 'vi' or 'emacs'.",
113 )
114 ).tag(config=True)
114
115
115 mouse_support = Bool(False).tag(config=True,
116 mouse_support = Bool(False,
116 help="Enable mouse support in the prompt"
117 help="Enable mouse support in the prompt"
117 )
118 ).tag(config=True)
118
119
119 highlighting_style = Unicode('default').tag(config=True,
120 highlighting_style = Unicode('default',
120 help="The name of a Pygments style to use for syntax highlighting: \n %s" % ', '.join(get_all_styles())
121 help="The name of a Pygments style to use for syntax highlighting: \n %s" % ', '.join(get_all_styles())
121 )
122 ).tag(config=True)
122
123
123 def _highlighting_style_changed(self, old, new):
124 def _highlighting_style_changed(self, old, new):
124 self._style = self._make_style_from_name(self.highlighting_style)
125 self._style = self._make_style_from_name(self.highlighting_style)
125
126
126 highlighting_style_overrides = Dict().tag(config=True,
127 highlighting_style_overrides = Dict(
127 help="Override highlighting format for specific tokens"
128 help="Override highlighting format for specific tokens"
128 )
129 ).tag(config=True)
129
130
130 editor = Unicode(get_default_editor()).tag(config=True,
131 editor = Unicode(get_default_editor(),
131 help="Set the editor used by IPython (default to $EDITOR/vi/notepad)."
132 help="Set the editor used by IPython (default to $EDITOR/vi/notepad)."
132 )
133 ).tag(config=True)
133
134
134 term_title = Bool(True).tag(config=True,
135 term_title = Bool(True,
135 help="Automatically set the terminal title"
136 help="Automatically set the terminal title"
136 )
137 ).tag(config=True)
137
138
138 display_completions_in_columns = Bool(False).tag(config=True,
139 display_completions_in_columns = Bool(False,
139 help="Display a multi column completion menu.",
140 help="Display a multi column completion menu.",
140 )
141 ).tag(config=True)
141
142
142 @observe('term_title')
143 @observe('term_title')
143 def _term_title_changed(self, change):
144 def _term_title_changed(self, change):
General Comments 0
You need to be logged in to leave comments. Login now