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