File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ def shell_command():
20
20
without having to manually configure the application.
21
21
"""
22
22
from flask .globals import _app_ctx_stack
23
- from ptpython .repl import embed
23
+ from ptpython .repl import embed , run_config
24
+ from ptpython .entry_points .run_ptpython import create_parser , get_config_and_history_file
24
25
25
26
app = _app_ctx_stack .top .app
26
27
ctx = {}
@@ -34,4 +35,15 @@ def shell_command():
34
35
35
36
ctx .update (app .make_shell_context ())
36
37
37
- embed (globals = ctx )
38
+ config_file , history_filename = get_config_and_history_file (
39
+ create_parser ().parse_args ([])
40
+ )
41
+
42
+ def configure (repl ):
43
+ run_config (repl , config_file = config_file )
44
+
45
+ embed (
46
+ globals = ctx ,
47
+ history_filename = history_filename ,
48
+ configure = configure
49
+ )
You can’t perform that action at this time.
0 commit comments