1- from bibleit .command import args as bargs
2- from bibleit import repl
1+ from bibleit .command import args as bargs , set
2+ from bibleit import repl , context , config
33
44_FLAG_PREFIX = "flag_"
55
@@ -16,24 +16,22 @@ def get_active_flags(ctx):
1616 yield flag
1717
1818
19- if args .repl :
20- repl .run ()
21- else :
22- if args .args :
23- from bibleit import context , config
24- from bibleit .command import set
25-
26- for flag in get_active_flags (args ):
27- config .set_flag (flag , True )
19+ ctx = context .Context ()
2820
29- ctx = context .Context ()
21+ if args .bible :
22+ set .bible (ctx , "," .join (args .bible ))
3023
31- if args .bible :
32- set .bible (ctx , "," . join (args .bible ))
24+ if args .linesep is not None :
25+ set .linesep (ctx , str (args .linesep ))
3326
34- if args . linesep is not None :
35- set . linesep ( ctx , str ( args . linesep ) )
27+ for flag in get_active_flags ( args ) :
28+ config . set_flag ( flag , True )
3629
30+ if args .repl :
31+ ctx .__main__ = "__main__"
32+ repl .run (ctx )
33+ else :
34+ if args .args :
3735 repl .eval (ctx , " " .join (args .args ))
3836 else :
3937 bargs .parser .print_help ()
0 commit comments