Rename ./bin/hooke's --command-no-exit to --persist.
authorW. Trevor King <wking@drexel.edu>
Thu, 12 Aug 2010 20:11:20 +0000 (16:11 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 12 Aug 2010 20:11:20 +0000 (16:11 -0400)
Inspired by the similar gnuplot option.  Certainly less awkward than
our old option.

hooke/hooke.py

index c4b220044c167aa686ea257631b5f76972ad4fb5..70ca59a594b1cf3e2eb86e60e824525438148961 100644 (file)
@@ -197,8 +197,7 @@ def main():
         action='append', default=[],
         help='Add a command line Hooke command to run.')
     p.add_option(
-        '--command-no-exit', dest='command_exit',
-        action='store_false', default=True,
+        '-p', '--persist', dest='persist', action='store_true', default=False,
         help="Don't exit after running a script or commands.")
     p.add_option(
         '--save-config', dest='save_config',
@@ -231,7 +230,7 @@ def main():
         try:
             hooke = runner.run_lines(hooke, options.commands)
         finally:
-            if options.command_exit == True:
+            if options.persist == False:
                 hooke.close(save_config=options.save_config)
                 sys.exit(0)